An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# 💰 is-currency
[![npm](https://img.shields.io/npm/v/is-currency.svg?maxAge=2592000)](https://www.npmjs.com/package/is-currency) [![Build Status](https://travis-ci.org/hugomd/is-currency.svg?branch=master)](https://travis-ci.org/hugomd/is-currency/builds) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](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)