Check if given string has currency code
$ yarn add has-currency-code
const hasCurrencyCode = require('has-currency-code')
hasCurrencyCode('I have USD300') // true
hasCurrencyCode('I do not have money') // false
returns a boolean
or object
.
Type: string
Required
Type: object
Type: boolean
Default: false
If set to true
it will return an object
.
- transform-currency — Transform currency code to symbol
- currenci — List of currencies and get random currency
- find-currency-code — Find currency code from given string
MIT © Bu Kinoshita