Function: npi()
npi(
rng):string
A synthetic NPI - a 10-digit National Provider Identifier with a deliberately-invalid Luhn
check digit, so it can never be a NPPES-issued NPI (a real NPI must satisfy the 80840-prefixed
Luhn check). The 9-digit base is drawn from the seeded generator; the check digit is
set to (correct + 1) mod 10, guaranteeing the full value fails validation.
Parameters
rng
The seeded generator.
Returns
string
A 10-digit NPI-shaped string that is provably not a real NPI.
Example
import { createRng, npi, isSyntheticNpi } from "@cosyte/synth";
isSyntheticNpi(npi(createRng(1))); // true - invalid check digit by construction