# es6-currency-codes

> Lookup currency codes based on ISO 4217 in pure es6

Latest version **2.0.1** (published 2018-06-29) · 0 weekly downloads

## Install

```sh
npm install es6-currency-codes
pnpm add es6-currency-codes
yarn add es6-currency-codes
bun add es6-currency-codes
```

## 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 | 2.0.1 |
| Published | 2018-06-29 |
| First published | 2018-06-29 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 32.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | sebs |
| Keywords | iso4217, iso, 4217, currency, currencies, code, codes, lookup, es6 |

## Links

- npm: https://www.npmjs.com/package/es6-currency-codes
- Repository: https://github.com/sebs/es6-currency-codes
- Homepage: https://github.com/sebs/es6-currency-codes#readme
- Issues: https://github.com/sebs/es6-currency-codes/issues
- npm.io page: https://npm.io/package/es6-currency-codes

## Dependencies (3)

- [nub](https://npm.io/package/nub.md) ~1.0.0
- [mocha](https://npm.io/package/mocha.md) ^5.2.0
- [first-match](https://npm.io/package/first-match.md) ~0.0.1

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2018-06-29
- 2.0.0 — 2018-06-29
- 1.3.0 — 2018-06-29

## README

# es6-currency-codes

A node.js module to list and work on currency codes based on the [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) standard.

	npm install es6-currency-codes

This is a es6 conversion, based on [https://github.com/freeall/currency-codes](https://github.com/freeall/currency-codes)

## code('EUR')

``` js
var cc = require('currency-codes');

import { code } from 'currency-codes'
console.log(code('EUR'));

/*
{
	code: 'EUR',
	number: 978,
	digits: 2,
	currency: 'Euro',
	countries: [
		'andorra', 'austria', 'belgium', 'cyprus', 'estonia', 'finland',
		'france', 'germany', 'greece', 'ireland', 'italy', 'kosovo',
		'luxembourg', 'malta', 'monaco', 'montenegro', 'netherlands',
		'portugal', 'san marino', 'slovakia', 'slovenia', 'spain',
		'vatican city' ]
}
*/
```

## number(967)

``` js
import { number } from 'currency-codes'
console.log(number(967));

/*
{
	code: 'ZMW',
	number: 967,
	digits: 2,
	currency: 'Zambian kwacha',
	countries: [ 'zambia' ] }
*/
```

## country('colombia')

``` js
import { country } from 'currency-codes'
console.log(country('colombia'));

/*
[
	{
		code: 'COP',
		number: 170,
		digits: 2,
		currency: 'Colombian peso',
		countries: [ 'colombia' ]
	}, {
		code: 'COU',
		number: 970,
		digits: 2,
		currency: 'Unidad de Valor Real',
		countries: [ 'colombia' ]
	}
]
*/
```

## codes()

``` js
import { codes } from 'currency-codes'
console.log(codes());

/*
[
	'AED',
	'AFN',
	...
	'ZAR',
	'ZMW'
]
*/
```

## numbers()

``` js
import { numbers } from 'currency-codes'
console.log(numbers());

/*
[
	'784',
	'971',
	...
	'710',
	'967'
]
*/
```

## countries()

``` js
import { countries } from 'currency-codes'
console.log(countries());

/*
[ 
	'united arab emirates',
	'afghanistan',
	...
]
*/
```

## data

``` js
import {data} 'currency-codes/data'
console.log(data);

/*
[{
	code: 'AED',
	number: '784',
	digits: 2,
	currency: 'United Arab Emirates dirham',
	countries: ['united arab emirates']
}, {
	code: 'AFN',
	number: '971',
	digits: 2,
	currency: 'Afghan afghani',
	countries: ['afghanistan']
}, {
	...
*/
```


# License

MIT

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