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

currency-symbol-map

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

currency-symbol-map

A function to lookup the currency symbol for a given currency code

  • 5.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
271K
decreased by-0.39%
Maintainers
2
Weekly downloads
 
Created

What is currency-symbol-map?

The currency-symbol-map npm package provides a simple way to get the currency symbol for a given currency code or country. It is useful for applications that need to display currency symbols dynamically based on user input or locale settings.

What are currency-symbol-map's main functionalities?

Get currency symbol by currency code

This feature allows you to get the currency symbol for a given currency code. For example, passing 'USD' will return the dollar symbol '$'.

const currencySymbolMap = require('currency-symbol-map');
const symbol = currencySymbolMap('USD');
console.log(symbol); // Output: $

Get currency symbol by country name

This feature allows you to get the currency symbol for a given country name. For example, passing 'United States' will return the dollar symbol '$'.

const currencySymbolMap = require('currency-symbol-map');
const symbol = currencySymbolMap('United States');
console.log(symbol); // Output: $

Get currency code by currency symbol

This feature allows you to get the currency code for a given currency symbol. For example, passing '€' will return the currency code 'EUR'.

const currencySymbolMap = require('currency-symbol-map');
const code = currencySymbolMap.symbolToCurrency('€');
console.log(code); // Output: EUR

Other packages similar to currency-symbol-map

Keywords

FAQs

Package last updated on 29 May 2022

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