
Product
Introducing Scala and Kotlin Support in Socket
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
commerce-kit
Advanced tools
`commerce-kit` is a simple TypeScript library designed specifically for e-commerce applications built with Next.js. It provides a range of utilities to interact with products, categories, and orders, seamlessly integrating with Stripe for payment processi
commerce-kit
is a simple TypeScript library designed specifically for e-commerce applications built with Next.js. It provides a range of utilities to interact with products, categories, and orders, seamlessly integrating with Stripe for payment processing.
Built by Your Next Store.
Install the package via npm:
npm install commerce-kit
commerce-kit
is intended for use with Next.js applications. Here's a simple example of how to use it to fetch and display products:
import * as Commerce from "commerce-kit";
import { formatMoney } from "commerce-kit/currencies";
import Image from "next/image";
import Link from "next/link";
export async function ProductList() {
const products = await Commerce.productBrowse({ first: 6 });
return (
<ul>
{products.map((product) => (
<li key={product.id}>
<Link href={`/product/${product.metadata.slug}`}>
<article>
{product.images[0] && (
<Image src={product.images[0]} width={300} height={300} alt={product.name} />
)}
<h2>{product.name}</h2>
{product.default_price.unit_amount && (
<p>
{formatMoney({
amount: product.default_price.unit_amount,
currency: product.default_price.currency,
locale: "en-US",
})}
</p>
)}
</article>
</Link>
</li>
))}
</ul>
);
}
This library uses a custom logger to output debug information. To control the debug output, use the LOG_LEVEL
environment variable. The following levels are supported:
time
and timeEnd
function outputs.This project is licensed under the AGPL Version 3 license – see the LICENSE.md file for details.
FAQs
`commerce-kit` is a simple TypeScript library designed specifically for e-commerce applications built with Next.js. It provides a range of utilities to interact with products, categories, and orders, seamlessly integrating with Stripe for payment processi
The npm package commerce-kit receives a total of 233 weekly downloads. As such, commerce-kit popularity was classified as not popular.
We found that commerce-kit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.