uniquegen
Version:
uniquegen is an package for Node.js projects, enabling the generation of random numbers and words. It offers flexibility and ease of use, making it a valuable tool for developers.
24 lines • 1.6 kB
TypeScript
type num = number;
type str = string;
type bool = boolean;
/**
* This TypeScript function generates a random string of characters with a specified length and the
* option to make it all uppercase, using an array of possible letters.
* @param {num} [length=1] - The length parameter is a number that determines the length of the
* generated random string of characters. By default, it is set to 1.
* @param {bool} [isCAPITAL=false] - A boolean parameter that determines whether the generated word
* should be in all capital letters or not. If set to true, the generated word will be returned in all
* capital letters. If set to false or not provided, the generated word will be returned in lowercase
* letters.
* @param {str[] | undefined} CustomWords - CustomWords is an optional parameter that allows the user
* to provide their own array of words to be used in generating the random string. If this parameter
* is not provided, the function will use the default array of all possible letters from 'a' to 'z'.
* @returns a string (type `str`) that is a randomly generated sequence of characters of a specified
* length, with the option to make it all uppercase if desired. The string is generated using an array
* of possible characters (`Words`) that includes all lowercase letters of the English alphabet by
* default, but can be customized by passing in a different array of characters as an argument
* (`CustomWords`). The
*/
export default function GenerateWordIDsync(length?: num, isCAPITAL?: bool, CustomWords?: str[]): str;
export {};
//# sourceMappingURL=WordFunction.d.ts.map