
Security News
Node.js TSC Votes to Stop Distributing Corepack
Corepack will be phased out from future Node.js releases following a TSC vote.
currencies-map
Advanced tools
Currency codes mapping to currency names and symbols using native javascript API to get local currency names and symbols.
It contains type declarations for Typescript.
It uses navigator.language
to show the correct currency symbol or name.
USD
If your device language is es-ES
you will get:
dólares estadounidenses
US$
If your device language is en-GB
you will get:
US dollars
US$
yarn add currencies-map
or
npm install currencies-map
import {Currencies} from 'currencies-map';
const currencyCode = 'EUR';
console.info(currencyCode + ': ' + Currencies.names.get(currencyCode));
Output (device language es-ES)
"EUR: euros"
const currencyCode = 'EUR';
console.info(currencyCode + ': ' + Currencies.symbols.get(currencyCode));
Output
"EUR: €"
console.info([...Currencies.names.values()]);
Output (device language es-ES)
["euros", "dólares estadounidenses", "kiats" ...]
console.info([...Currencies.symbols.values()]);
Output
["€", "US$", "MMK" ...]
When the currency doesn't have symbol it will show currency code.
import {CODES} from 'currencies-map';
console.info(CODES);
Output
["EUR", "USD", "MMK" ...]
FAQs
Map from currency codes to currency names and symbols
The npm package currencies-map receives a total of 429 weekly downloads. As such, currencies-map popularity was classified as not popular.
We found that currencies-map 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.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.
Research
Security News
Research uncovers Black Basta's plans to exploit package registries for ransomware delivery alongside evidence of similar attacks already targeting open source ecosystems.
Security News
Oxlint's beta release introduces 500+ built-in linting rules while delivering twice the speed of previous versions, with future support planned for custom plugins and improved IDE integration.