UNPKG

cdigit

Version:

Collection of check digit algorithms implemented in JavaScript

19 lines (18 loc) 423 B
/** * cdigit * * @copyright 2018-2021 LiosK * @license (MIT OR Apache-2.0) */ import { Algo } from "./common"; /** Luhn algorithm implementation */ declare class Luhn implements Algo { name: string; longName: string; compute(num: string): string; generate(num: string): string; validate(num: string): boolean; parse(num: string): [string, string]; } export declare const luhn: Luhn; export {};