![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
tin-validator
Advanced tools
Validate and mask a U.S. Taxpayer Identification Number (TIN). A TIN may be an Employer Identification Number (EIN), an Individual Taxpayer Identification Number (ITIN) or a Social Security number (SSN).
Install the package via npm
:
npm install tin-validator --save
isValid(value)
This method validates if the given value is a valid Taxpayer Identification Number
.
value
(*): The value to validate.(boolean): Returns whether the input value is a valid TIN or not.
isValid({});
// => false
isValid('9-0-0700000');
// => false
isValid('900-70-0000');
// => true
isValid('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'.
mask({});
// Throws an Error.
mask('9-0-0700000');
// Throws an Error.
mask('900-70-0000');
// => XXX-XX-0000
mask('900700000');
// => XXXXX0000
sanitize(value)
This method will remove all non numeric characters from the value.
value
(*): The value to sanitize.(string): Returns the sanitized value containing only numeric characters.
sanitize('9-0 0700000');
// => 900700000
sanitize('900a7#$0foobar0000');
// => 900700000
To test using a local installation of node.js
:
npm test
To test using Docker exclusively:
docker-compose run --rm sut
npm version [<newversion> | major | minor | patch] --message "Release %s"
MIT
1.1.0 (2022-11-30)
FAQs
Taxpayer Identification Number validator and masker
The npm package tin-validator receives a total of 9,019 weekly downloads. As such, tin-validator popularity was classified as popular.
We found that tin-validator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.