Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bukinoshita/find-currency-code

Find currency code from given string
https://github.com/bukinoshita/find-currency-code

code currencies currency find javascript money nodejs

Last synced: 9 days ago
JSON representation

Find currency code from given string

Awesome Lists containing this project

README

        

# find-currency-code [![Build Status](https://travis-ci.org/bukinoshita/find-currency-code.svg?branch=master)](https://travis-ci.org/bukinoshita/find-currency-code) [![codecov](https://codecov.io/gh/bukinoshita/find-currency-code/branch/master/graph/badge.svg)](https://codecov.io/gh/bukinoshita/find-currency-code)

> Find currency code from given string

## Install

```
$ yarn add find-currency-code
```

## Usage

```js
const findCurrencyCode = require('find-currency-code')

findCurrencyCode('I have USD300')
// => USD

findCurrencyCode('I do not have money')
// => undefined
```

## API

### findCurrencyCode(input)

Returns a `string`

#### input

Type: `string`

Required

## Related

- [transform-currency](https://github.com/bukinoshita/transform-currency) — Transform currency code to symbol
- [has-currency-code](https://github.com/bukinoshita/has-currency-code) — Check if given string has currency code
- [currenci](https://github.com/bukinoshita/currenci) — List of currencies and get random currency

## License

MIT © [Bu Kinoshita](https://bukinoshita.io)