npi-validator
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

npi-validator

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.

Install

npm install npi-validator

Usage

import npiValid from 'npi-validator';

const npi = 1234567893;
const valid = npiValid(npi);

console.log(valid);
//=> true

API

function npiValid(id: string | number, prefix?: string | number): boolean

import npiValid from 'npi-validator';

const npi = 1234567893;
const valid = npiValid(npi);

console.log(valid);
//=> true

Package Sidebar

Install

npm i npi-validator

Weekly Downloads

3

Version

1.0.0

License

none

Unpacked Size

6.29 kB

Total Files

9

Last publish

Collaborators

  • coryasilva