https://github.com/hugomd/is-currency
💰 Validates whether a given string is a currency, according to ISO 4217.
https://github.com/hugomd/is-currency
currency magic module nodejs validation
Last synced: about 1 year ago
JSON representation
💰 Validates whether a given string is a currency, according to ISO 4217.
- Host: GitHub
- URL: https://github.com/hugomd/is-currency
- Owner: hugomd
- Created: 2017-06-02T07:34:17.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-11-04T02:50:30.000Z (over 7 years ago)
- Last Synced: 2025-05-15T10:39:42.413Z (about 1 year ago)
- Topics: currency, magic, module, nodejs, validation
- Language: JavaScript
- Homepage:
- Size: 37.1 KB
- Stars: 14
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# 💰 is-currency
[](https://www.npmjs.com/package/is-currency) [](https://travis-ci.org/hugomd/is-currency/builds) [](https://github.com/sindresorhus/xo)
> Validates whether a given input is a valid currency code, according to ISO 4217.
# Installation
```javascript
npm install is-currency
```
# Usage
```javascript
const isCurrency = require('is-currency');
isCurrency('usd'); // true
isCurrency('fake-currency'); // false
```
# Contributing
* `git clone git@github.com:hugomd/is-currency.git`
* `npm install`
* Make your changes
* Open a pull request and ask for review ✌️
* Optional: use emoji in your commits 🔥
# Related Repositories
* [`joi-is-currency`](https://github.com/hugomd/joi-currency-code)
* [`is-currency-code`](https://github.com/hugomd/is-currency-code)
* [`is-currency-symbol`](https://github.com/hugomd/is-currency-symbol)