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

currency-map-symbol

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

currency-map-symbol

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

  • 4.0.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

currency-map-symbol

Build Status PRs Welcome code style

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

Installation

npm install currency-map-symbol

Usage

Get symbol from currency code

// ES5
const getSymbolFromCurrency = require('currency-map-symbol')

// ES6
import getSymbolFromCurrency from 'currency-map-symbol'

getSymbolFromCurrency('GBP') //=> '£'
getSymbolFromCurrency('EUR') //=> '€'
getSymbolFromCurrency('USD') //=> '$'
getSymbolFromCurrency('NOT A VALID CODE') //=> undefined

Exposed map for other processing

// ES5
const getSymbolFromCurrency = require('currency-map-symbol')

// ES6
import getSymbolFromCurrency from 'currency-map-symbol'

/* =>
{
 "USD" : "$",
 "GBP" : "£",
 …
}
*/

Tests

npm test

Credits

Currency symbols originally sourced from xe

Keywords

FAQs

Package last updated on 18 Oct 2017

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