has-currency-code
v1.0.0
Published
Check if given string has currency code
Downloads
3
Maintainers
Readme
has-currency-code
Check if given string has currency code
Install
$ yarn add has-currency-code
Usage
const hasCurrencyCode = require('has-currency-code')
hasCurrencyCode('I have USD300') // true
hasCurrencyCode('I do not have money') // false
API
hasCurrencyCode(input, [options])
returns a boolean
or object
.
input
Type: string
Required
options
Type: object
toObject
Type: boolean
Default: false
If set to true
it will return an object
.
Related
- transform-currency — Transform currency code to symbol
- currenci — List of currencies and get random currency
- find-currency-code — Find currency code from given string
License
MIT © Bu Kinoshita