pnpm add validation-algorithms
npm install validation-algorithms --save
yarn add validation-algorithms
import { luhn } from 'validation-algorithms/luhn';
if (luhn('4000000000001000')) {
// passed validation
}
Run pnpm bench
to run the benchmarks.