UNPKG

turkish-id-checker

Version:

A package which checks if a number or string is a valid Turkish ID or not and generates a random valid Turkish ID.

7 lines (5 loc) 231 B
export const getRandomNumberBetween = (min: number, max: number): number => { min = Math.ceil(min) // Minimum is inclusive max = Math.floor(max) // Maximum is exclusive return Math.floor(Math.random() * (max - min) + min) }