Module: generateCharCode

Methods

(inner) generateCharCode(charCodeRequest, flagsopt) → {number}

Generates a random integer of a requested type.

Parameters:
NameTypeAttributesDescription
charCodeRequestcharCodeRequest

An object contain the properties that describes the type of character code being requested and restrictions being place on it.

flagscharCodeGenerationFlag<optional>

A flag object used to give more information about what stage of password generation we are at.

Source:
Requires:
Throws:

Will throw an error if the requested character code type is not found within the character code constraints object.

Type
errors.nonGenerableCharacterType
Returns:

An integer representing a UTF-16 character code unit. The integer will be within range of the defined character code request constraints.

Type
number