Validation function for National Provider Identifier (NPI) numbers. Works for healthcare physicians and organizations in the United States or other countries that use the NPI standard.
This is an implementation of the Luhn formula (mod 10 double add double) check digit, see the CMS.gov specification for more information.
npm install npi-validator
import npiValid from 'npi-validator';
const npi = 1234567893;
const valid = npiValid(npi);
console.log(valid);
//=> true
import npiValid from 'npi-validator';
const npi = 1234567893;
const valid = npiValid(npi);
console.log(valid);
//=> true