{"_id":"npi-checksum","_rev":"3-6208485d32ad6f625e45eefe62ded826","name":"npi-checksum","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"npi-checksum","version":"1.0.0","keywords":["npi","healthcare","medical","validation","validator","checksum","luhn","luhn-checksum","typescript"],"author":{"url":"https://getlemma.com","name":"Lemma"},"license":"0BSD","_id":"npi-checksum@1.0.0","maintainers":[{"name":"lemma-technologies","email":"npm@getlemma.com"}],"homepage":"https://github.com/Lemma-Banking/npi-checksum#readme","bugs":{"url":"https://github.com/Lemma-Banking/npi-checksum/issues"},"dist":{"shasum":"95544308ec3351cf6f57cd078fadf0b2ab1fc391","tarball":"https://registry.npmjs.org/npi-checksum/-/npi-checksum-1.0.0.tgz","fileCount":4,"integrity":"sha512-bj3qiP6MQYY6bXoVuz+LjQcEAV9n5ygfMO+0wZmuR4zMU7lNiuhBvgM76PZF1mIQUjevCBjs4k5c9ocnCMsujg==","signatures":[{"sig":"MEQCIB4anaPin+E8Hm0vXLjCRLpVG1glgRxwHSIlwr+52WWIAiAOcO6/rKdg6kkxoll7bhvPtqvehMqIKqnlmK8krsdx8A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5684},"type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"58f18b03f83b09b9d40739b21f0c5d81a7802b61","scripts":{"test":"node --test test/*.test.js","build":"tsc -p tsconfig.json","prepack":"npm run build","pretest":"npm run build","prepublishOnly":"npm test"},"_npmUser":{"name":"lemma-technologies","email":"npm@getlemma.com"},"repository":{"url":"git+https://github.com/Lemma-Banking/npi-checksum.git","type":"git"},"_npmVersion":"11.17.0","description":"Fast, dependency-free NPI (National Provider Identifier) Luhn checksum validator for Node.js and TypeScript.","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/npi-checksum_1.0.0_1789325136327_0.6659356354989145","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"npi-checksum","version":"1.1.0","keywords":["npi","healthcare","medical","validation","validator","checksum","luhn","luhn-checksum","typescript"],"author":{"url":"https://getlemma.com","name":"Lemma"},"license":"0BSD","_id":"npi-checksum@1.1.0","maintainers":[{"name":"lemma-technologies","email":"npm@getlemma.com"}],"homepage":"https://github.com/Lemma-Banking/npi-checksum#readme","bugs":{"url":"https://github.com/Lemma-Banking/npi-checksum/issues"},"dist":{"shasum":"0a13e0995de9ee3c3e8e86ee8f07d71c413f1563","tarball":"https://registry.npmjs.org/npi-checksum/-/npi-checksum-1.1.0.tgz","fileCount":7,"integrity":"sha512-CkChIPNmrpAK6fja+KCXwCnYvJ0cycukQ/d+B5CDnJcT2tYOSIuS+nnplsHuZv6e6axwpa9RqDJmAkXUujhtrA==","signatures":[{"sig":"MEYCIQDdL6YGwuK0HIqbC93wbw4zWcC7K6JRVrwDx8kFgV/xJAIhAIxh5B0yOYKf3xGiPIn32f/tmxD/koxGBBqkKiCloNTN","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7636},"main":"./dist/cjs/index.js","type":"module","types":"./dist/esm/index.d.ts","engines":{"node":">=22"},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.js"}}},"gitHead":"58f18b03f83b09b9d40739b21f0c5d81a7802b61","scripts":{"test":"node --test","build":"npm run build:esm && npm run build:cjs","prepack":"npm run build","pretest":"npm run build","build:cjs":"tsc -p tsconfig.cjs.json && node scripts/finalize-cjs.mjs","build:esm":"tsc -p tsconfig.json","prepublishOnly":"npm test"},"_npmUser":{"name":"lemma-technologies","email":"npm@getlemma.com"},"repository":{"url":"git+https://github.com/Lemma-Banking/npi-checksum.git","type":"git"},"_npmVersion":"11.17.0","description":"Fast, dependency-free NPI (National Provider Identifier) Luhn checksum validator for Node.js and TypeScript.","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/npi-checksum_1.1.0_1789327262228_0.8456011102250969","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"npi-checksum","version":"1.2.0","description":"Fast, dependency-free NPI (National Provider Identifier) Luhn checksum validator for Node.js and TypeScript.","type":"module","engines":{"node":">=22"},"sideEffects":false,"main":"./dist/cjs/index.js","types":"./dist/esm/index.d.ts","exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.js"}}},"scripts":{"build":"npm run build:esm && npm run build:cjs","build:esm":"tsc -p tsconfig.json","build:cjs":"tsc -p tsconfig.cjs.json && node scripts/finalize-cjs.mjs","pretest":"npm run build","test":"node --test","prepack":"npm run build","prepublishOnly":"npm test"},"keywords":["npi","healthcare","medical","validation","validator","checksum","luhn","luhn-checksum","typescript"],"homepage":"https://github.com/Lemma-Banking/npi-checksum#readme","bugs":{"url":"https://github.com/Lemma-Banking/npi-checksum/issues"},"repository":{"type":"git","url":"git+https://github.com/Lemma-Banking/npi-checksum.git"},"author":{"name":"Lemma","url":"https://getlemma.com"},"license":"0BSD","devDependencies":{"typescript":"^5.9.3"},"gitHead":"e736ac6d0099b8bd0b9847a420b00a5095befc92","_id":"npi-checksum@1.2.0","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-NI5cGnO0+XLCDjRQMnNgryGn2Hklw7IK5ixDcL+IfmIRRI/1HFKAsuoGpALM01iz4hFvO1eFR+I5HNcBh/GY/A==","shasum":"4c91e0d823b309a9db4703e8e0bcdce1d6e64a24","tarball":"https://registry.npmjs.org/npi-checksum/-/npi-checksum-1.2.0.tgz","fileCount":7,"unpackedSize":7693,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBodvO6cXKX75B4xNotfS3xNTSfhzSVmykCsswDQ4WeLAiEAipkH7JcNyUQwPsz/oOnwiIUnzA5vq7zTv3RVpW6FXvQ="}]},"_npmUser":{"name":"lemma-technologies","email":"npm@getlemma.com"},"directories":{},"maintainers":[{"name":"lemma-technologies","email":"npm@getlemma.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/npi-checksum_1.2.0_1789327823973_0.7834534476631747"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-13T18:45:36.251Z","modified":"2026-09-13T19:30:24.244Z","1.0.0":"2026-09-13T18:45:36.467Z","1.1.0":"2026-09-13T19:21:02.383Z","1.2.0":"2026-09-13T19:30:24.111Z"},"bugs":{"url":"https://github.com/Lemma-Banking/npi-checksum/issues"},"author":{"name":"Lemma","url":"https://getlemma.com"},"license":"0BSD","homepage":"https://github.com/Lemma-Banking/npi-checksum#readme","keywords":["npi","healthcare","medical","validation","validator","checksum","luhn","luhn-checksum","typescript"],"repository":{"type":"git","url":"git+https://github.com/Lemma-Banking/npi-checksum.git"},"description":"Fast, dependency-free NPI (National Provider Identifier) Luhn checksum validator for Node.js and TypeScript.","maintainers":[{"name":"lemma-technologies","email":"npm@getlemma.com"}],"readme":"# npi-checksum\n\nTiny, dependency-free TypeScript validator for U.S. **national provider identifier (NPI)** checksums.\n\n- Node.js 22+\n- Ships both ESM and CommonJS builds\n- Zero runtime dependencies\n- Tree-shakeable named exports\n\n> This validator only verifies the NPI checksum. It does not prove that an identifier was issued, is active, or belongs to a particular person or organization. We designed this package for fast UI feedback, not identity verification.\n\n## Install\n\n```sh\nnpm install npi-checksum\n```\n\n## Usage\n\n```ts\nimport { passesNpiChecksum } from \"npi-checksum\";\n\npassesNpiChecksum(\"1234567893\"); // true\n```\n\n## API\n\n### `passesNpiChecksum(value: string | null | undefined): boolean`\n\nChecks that the value:\n\n1. contains exactly 10 digits,\n2. starts with `1` or `2` (the range CMS reserves for NPIs), and\n3. satisfies the NPI Luhn check-digit calculation with the `80840` healthcare-provider prefix.\n\nThe NPI checksum is defined by the U.S. Centers for Medicare & Medicaid Services (CMS): [Requirements for National Provider Identifier (NPI) and NPI Check Digit](https://www.cms.gov/regulations-and-guidance/administrative-simplification/nationalprovidentstand/downloads/npicheckdigit.pdf).\n\n```ts\npassesNpiChecksum(\"1234567893\"); // true\npassesNpiChecksum(\"1234567890\"); // false\n```\n\n## Build\n\n`dist/` is compiled from `src/index.ts` by the TypeScript compiler. That is a development dependency only: installing the package pulls down nothing but `dist/`, and there are no runtime dependencies.\n\n```sh\nnpm run build\n```\n\n`npm test` and `npm pack` run the build automatically, so `dist/` is never stale or missing.\n\n## Tests\n\nTests use Node's built-in `node:test` runner, so no test framework is required. The published package contains standard ESM JavaScript plus TypeScript declarations, compiled from `src/index.ts` in this repository.\n\n```sh\nnpm test\n```\n\n## Authors\n\n[Lemma](https://getlemma.com) provides banking solutions for healthcare companies. Many of our customers build healthcare apps that work with NPIs, so we open sourced this package to help them ship faster.\n\n## 0BSD License\n\nPermission to use, copy, modify, and/or distribute this software for\nany purpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL\nWARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES\nOF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE\nFOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY\nDAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN\nAN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT\nOF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n","readmeFilename":"README.md"}