Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 886 Bytes

README.md

File metadata and controls

37 lines (24 loc) · 886 Bytes

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