UNPKG

ts-randomstring

Version:

A library used for generating random strings, written in TypeScript and based on Node.

29 lines (28 loc) 939 B
/** * Enumerates through every supported character set type for random string generation. */ export declare enum CharacterSetType { Alphanumeric = 0, Alphabetic = 1, Numeric = 2, Hex = 3, Binary = 4, Octal = 5 } /** * Enumerates through every supported capitalisation style for random string generation. */ export declare enum Capitalisation { Mixed = 0, Uppercase = 1, Lowercase = 2 } export { Capitalisation as Capitalization }; /** * Gets the character set by virtue of the passed character set type and capitalisation style. * * @param charSetType The character set type to pull characters from. * @param capitalisation The character capitalisation style. * @returns Returns a string of unique characters which represent the character set. */ export declare const getCharacterSet: (charSetType: CharacterSetType, capitalisation: Capitalisation) => string;