Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

currency-decimal-places

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

currency-decimal-places

In order to convert easily money amounts in whole integer to their original amounts. The list is based off of [wikipedia](https://en.wikipedia.org/wiki/ISO_4217)

  • 0.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

currency-decimal-places

In order to convert easily money amounts in whole integer to their original amounts. The list is based off of wikipedia

Usage
import {getDecimalPlacesForCurrency} from "@nexapp/currency-decimal-places"


const currency = "CAD" // ISO 4217 currency code (3 letters)
const decimalPlaces = getDecimalPlacesForCurrency(currency)
// decimalPlaces is 2, you can use money libraries like Dinero to convert a cent amount to the desired decimal format

FAQs

Package last updated on 01 Mar 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc