Name: itin-validator
Owner: Uphold
Description: Validate and mask a U.S. Individual Taxpayer Identification Number (ITIN)
Created: 2015-10-06 17:16:17.0
Updated: 2017-07-18 17:15:29.0
Pushed: 2017-07-18 18:24:28.0
Size: 14
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Validate and mask a U.S. Individual Taxpayer Identification Number (ITIN).
Install the package via npm
:
install itin-validator --save
isValid(value)
This method validates if the given value is a valid Individual Taxpayer Identification Number
.
value
(*): The value to validate.(boolean): Returns whether the input value is a valid ITIN or not.
lid({});
> false
lid('9-0-0700000');
> false
lid('900-70-0000');
> true
lid('900700000');
> true
mask(value)
This method will help you protect this sensitive piece of information by obfuscating some digits.
value
(*): The value to mask.(string): Returns the masked value by replacing value certain digits by 'X'.
({});
hrows an Error.
('9-0-0700000');
hrows an Error.
('900-70-0000');
> XXX-XX-0000
('900700000');
> XXXXX0000
To test using a local installation of node.js
:
test
To test using Docker exclusively:
er-compose run --rm sut
version [<newversion> | major | minor | patch] -m "Release %s"
MIT