@kaelyx/ts-kit / string / RandomStringCharset
Variable: RandomStringCharset
constRandomStringCharset:object
Defined in: string/random-string/random-string.types.ts:14
Preset character sets for RandomStringOptions.charset. Each preset is a string, so you can join presets with + or add your own characters.
Type Declaration
alphanumeric
readonlyalphanumeric:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
Uppercase letters, lowercase letters and digits.
digits
readonlydigits:"0123456789"='0123456789'
0 to 9.
hex
readonlyhex:"0123456789abcdef"='0123456789abcdef'
0 to 9 and a to f.
lowercase
readonlylowercase:"abcdefghijklmnopqrstuvwxyz"='abcdefghijklmnopqrstuvwxyz'
a to z.
symbols
readonlysymbols: "!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~" = '!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~'
All printable ASCII symbols.
symbolsSimple
readonlysymbolsSimple:"-_."='-_.'
Symbols that are safe in URLs and file names: -, _ and ..
uppercase
readonlyuppercase:"ABCDEFGHIJKLMNOPQRSTUVWXYZ"='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
A to Z.
Example
const { uppercase, digits } = RandomStringCharset
randomString({ charset: uppercase + digits })