@noeldemartin/faker
Version:
Generate massive amounts of fake contextual data
14 lines (13 loc) • 400 B
TypeScript
/**
* Checks that the given string passes the luhn algorithm.
*
* @param str The string to validate.
*/
export declare function luhnCheck(str: string): boolean;
/**
* Calculates the luhn check value for the given string.
*
* @param str The string to calculate the check value for.
* May contain the `L` placeholder at the end.
*/
export declare function luhnCheckValue(str: string): number;