# has-currency-code

> Check if given string has currency code

Latest version **1.0.0** (published 2019-06-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install has-currency-code
pnpm add has-currency-code
yarn add has-currency-code
bun add has-currency-code
```

## 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 | 1.0.0 |
| Published | 2019-06-19 |
| First published | 2017-07-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Bu Kinoshita |
| Maintainers | bukinoshita |
| Keywords | currenci, currency, code, symbol, convert, transform, money, transform-currency |

## Links

- npm: https://www.npmjs.com/package/has-currency-code
- Repository: https://github.com/bukinoshita/has-currency-code
- npm.io page: https://npm.io/package/has-currency-code

## Dependencies (1)

- [find-currency-code](https://npm.io/package/find-currency-code.md) ^1.0.0

## 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

- 1.0.0 (latest) — 2019-06-19
- 0.0.2 — 2017-07-07
- 0.0.1 — 2017-07-05

## README

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

> Check if given string has currency code

## Install

```
$ yarn add has-currency-code
```

## Usage

```js
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`<br/>
Required

#### options

Type: `object`

##### toObject

Type: `boolean`<br/>
Default: `false`

If set to `true` it will return an `object`.

## Related

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

## License

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

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