Test for a USD formatted input
First install node.js. Then:
npm install is-money-usd --save
var isMoney = require('is-money-usd');
isMoney('$1,999.99'); // true
isMoney(400); // true
isMoney('not money') // false
isMoney(',45$.00') //false
Please read the Contributing guidelines.
We are using nodeunit to test. To run tests, first install nodeunit and any dependencies via npm:
npm install
Run tests with:
npm test