OptionalbufferInitial buffer size, can grow if needed.
OptionalechoPrint this character when the user types.
May not include codepoints in the range of U+0000 to U+001F (inclusive).
These are things like \t, \n, Escape etc.
OptionalechoDisplay width of echoChar.
If not given it is attempted to determine the display width with this fallback list of libraries:
If none of them are available this fallback method is used:
echoChar.replace(/([^\n])\p{Mn}+/gu, '$1').replace(/\p{Emoji_Presentation}/gu, 'xx').length
OptionalechoA [min, max] tuple of integers.
The echoChar is randomly repeated n times where min <= n
and n <= max. If echoChar is passed but echoRepeat
isn't, then the echoChar is written exactly once by input byte.
This is to obfuscate the password length for anyone snooping.
OptionalencodingParse input to string using this encoding.
OptionalerrorsHow do handle encoding errors.
OptionalescapeMilliseconds to wait for an escape character to be accepted as the user wanting to abort.
A single escape character might be the start of an escape sequence or the user pressing escape in order to abort input. The only way to distinguish between the two is to wait for more input and if none (or a second escape) comes its the user wanting to abort.
OptionalpromptPrompt to display.
OptionalrepeatOptionalsignalAbort prompt (return null) when this signal fires.
OptionalttyTTY device to open.
Options for getPass.