param { Number } min param { Number } max return { Number } api export const getRandomInt = ( min , max ) => { return Math . floor ( Math . random ( ) * ( max - min + 1 ) ) + min ; } ; param { Number } length return { String } api export const getUid = ( length ) : string => { let uid = "" ; const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" ; const charsLength = chars . length ; for ( let i = 0 ; i < length ; ++ i ) { uid += chars [ getRandomInt ( 0 , charsLength - 1 ) ] ; } return uid ; } ;