commerce-kit
Version:
`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
12 lines (10 loc) • 432 B
TypeScript
type Money = {
amount: number;
currency: string;
};
declare const getStripeAmountFromDecimal: ({ amount: major, currency }: Money) => number;
declare const getDecimalFromStripeAmount: ({ amount: minor, currency }: Money) => number;
declare const formatMoney: ({ amount: minor, currency, locale, }: Money & {
locale?: string;
}) => string;
export { formatMoney, getDecimalFromStripeAmount, getStripeAmountFromDecimal };