Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
stripe-money-format
Advanced tools
Readme
A simple js utility to format numbers to Stripe's smallest common currency unit format
Supports most International Curriences.
import StripeMoneyFormat from "stripe-money-format";
const number = 86753.09;
console.log(StripeMoneyFormat.toStripeFormat(number)); // 8675309
const {toStripeFormat} = require("stripe-money-format");
const number = 86753.09;
console.log(toStripeFormat(number)); // 8675309
Should support any currency available to the node Intl package: Intl.NumberFormat
import StripeMoneyFormat from "stripe-money-format";
const number = 123456.789;
const currency = "EUR";
const language = "de-DE";
console.log(toStripeFormatCustomCurrency(currency, language, number)); // 12345679
const {toStripeCustomCurrency} = require("stripe-money-format");
const number = 123456.789;
const currency = "EUR";
const language = "de-DE";
console.log(toStripeCustomCurrency(currency, language, number)); // 12345679
FAQs
A simple utility to format numbers to stripe's smallest common currency unit format
The npm package stripe-money-format receives a total of 0 weekly downloads. As such, stripe-money-format popularity was classified as not popular.
We found that stripe-money-format demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.