UNPKG

@halloverden/number-utilities-ts

Version:

Typescript library with utility functions for a bunch of numbers

16 lines (15 loc) 521 B
/** * Returns a single control digit for the given input * * @param input */ export declare function getLuhnControlDigit(input: string): number; /** * Returns an array of control digits for the given input * * @param input * @param numberOfDigits */ export declare function getLuhnControlDigits(input: string, numberOfDigits: number): number[]; export declare function checkLuhnControlDigit(input: string): boolean; export declare function checkLuhnControlDigits(input: string, numberOfDigits: number): boolean;