UNPKG

n-digit-token

Version:

Cryptographically secure pseudo-random token of n digits

11 lines (10 loc) 264 B
/** * Calculate largest possible value that avoids modulo bias. * @param {number} byteSize * @param {number} length * @return {bigint} max */ export declare const calculateMax: ({ byteSize, length, }: { byteSize: number; length: number; }) => bigint;