npm.io
1.0.0 • Published 7 years ago

has-currency-code

Licence
MIT
Version
1.0.0
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Stars
1

has-currency-code Build Status codecov

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.

License

MIT Bu Kinoshita

Keywords