# currency-map-symbol

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

Latest version **4.0.5** (published 2017-12-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install currency-map-symbol
pnpm add currency-map-symbol
yarn add currency-map-symbol
bun add currency-map-symbol
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.5 |
| Published | 2017-12-13 |
| First published | 2017-03-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Zak Zubair |
| Maintainers | zakzubair |
| Keywords | currency, currencies, symbols, symbol |

## Links

- npm: https://www.npmjs.com/package/currency-map-symbol
- Repository: https://github.com/ZakZubair/currency-map-symbol
- Homepage: https://github.com/ZakZubair/currency-map-symbol#readme
- Issues: https://github.com/ZakZubair/currency-map-symbol/issues
- npm.io page: https://npm.io/package/currency-map-symbol

## Recent versions

- 4.0.5 (latest) — 2017-12-13
- 4.0.4 — 2017-12-13
- 4.0.3 — 2017-10-20
- 4.0.2 — 2017-10-18
- 4.0.1 — 2017-10-18
- 4.0.0 — 2017-10-18
- 3.1.6 — 2017-03-30
- 3.1.5 — 2017-03-29
- 3.1.4 — 2017-03-29
- 3.1.3 — 2017-03-28
- 3.1.2 — 2017-03-28

## README

<h1 align="left">
  currency-map-symbol
  
  [![Build Status](https://travis-ci.org/ZakZubair/currency-map-symbol.svg?branch=master)](https://travis-ci.org/ZakZubair/currency-map-symbol)
  ![](https://img.shields.io/badge/licence-MIT-blue.svg?style=flat-square)
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
  [![Known Vulnerabilities](https://snyk.io/test/github/zakzubair/currency-map-symbol/badge.svg)](https://snyk.io/test/github/zakzubair/currency-map-symbol)
</h1>

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

## Installation

    npm install currency-map-symbol

## Test

#### Simple test

    npm run test
    
#### Test with watch  
  
    npm run test:watch 
    
#### Test coverage    
    npm run test:coverage  
         
 
## Usage

### Get symbol from currency code
```js
// 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
```js
// ES5
const getSymbolFromCurrency = require('currency-map-symbol')

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

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

## Credits

Currency symbols originally sourced from [xe](http://www.xe.com/symbols.php)

---
_Source: https://npm.io/package/currency-map-symbol · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
