Createdby[jonschlinkert](https://github.com/jonschlinkert) and [doowb](https://github.com/doowb), Enquirer is fast, easy to use, and lightweight enough for small projects, while also being powerful and customizable enough for the most advanced use cases.
***Fast**-[Loadsin~4ms](#-performance)(that'sabout_3-4timesfasterthana[singleframeofaHDmovie](http://www.endmemo.com/sconvert/framespersecondframespermillisecond.php) at 60fps_)
***Lightweight**-Onlyonedependency,theexcellent[ansi-colors](https://github.com/doowb/ansi-colors) by [Brian Woodward](https://github.com/doowb).
|`skip` | no | `boolean\|function` | If `true`itwillnotaskthatprompt.|
|`initial` | no | `string\|function`|Thedefaultvaluetoreturniftheuserdoesnotsupplyavalue.|
|`format` | no | `function`|Functiontoformatuserinputintheterminal.|
|`result` | no | `function`|Functiontoformatthefinalsubmittedvaluebeforeit'sreturned.|
|`validate` | no | `function`|Functiontovalidatethesubmittedvaluebeforeit'sreturned.Thisfunctionmayreturnabooleanorastring.Ifastringisreturneditwillbeusedasthevalidationerrormessage.|
Promptthatasksforusernameandpasswordtoauthenticatetheuser.Thedefaultimplementationof`authenticate` function in `BasicAuth` prompt is to compare the username and password with the values supplied while running the prompt. The implementer is expected to override the `authenticate`functionwithacustomlogicsuchasmakinganAPIrequesttoaservertoauthenticatetheusernameandpasswordenteredandexpectatokenback.
Youcanuse[data-store](https://github.com/jonschlinkert/data-store) to store [input history](https://github.com/enquirer/enquirer/blob/master/examples/input/option-history.js) that the user can cycle through (see [source](https://github.com/enquirer/enquirer/blob/8407dc3579123df5e6e20215078e33bb605b0c37/lib/prompts/input.js)).
Optionally,passa`result` function and use the `.map`methodtoreturnanobjectofkey-valuepairsoftheselectednamesandvalues:[example](./examples/multiselect/option-result.js)
Inthis[example](https://github.com/enquirer/enquirer/raw/master/examples/sort/prompt.js), custom styling is applied to the returned values to make it easier to see what's happening.
|`pointer()` | Returns the visual symbol to use to identify the choice that currently has focus. The `❯` symbol is often used for this. The pointer is not always visible, as with the `autocomplete`prompt.|
|`role` | `string` | Determines how the choice will be displayed. Currently the only role supported is `separator`. Additional roles may be added in the future (like `heading`,etc).Pleasecreatea[featurerequest]|
|`enabled` | `boolean` | Enabled a choice by default. This is only supported when `options.multiple`istrueoronpromptsthatsupportmultiplechoices,like[MultiSelect](#-multiselect).|
|`disabled` | `boolean\|string` | Disable a choice so that it cannot be selected. This value may either be `true`, `false`,oramessagetodisplay.|
The`AuthPrompt` is used to create prompts to log in user using any authentication method. For example, Enquirer uses this class as the basis for the [BasicAuth Prompt](#basicauth-prompt). You can also find prompt examples in `examples/auth/` folder that utilizes `AuthPrompt`tocreateOAuthbasedauthenticationpromptorapromptthatauthenticatesusingtime-basedOTP,amongothers.
`AuthPrompt` has a factory function that creates an instance of `AuthPrompt` class and it expects an `authenticate` function, as an argument, which overrides the `authenticate` function of the `AuthPrompt`class.
|`authenticate()` | Contain all the authentication logic. This function should be overridden to implement custom authentication logic. The default `authenticate`functionthrowsanerrorifnootherfunctionisprovided.|
_(Thisproject'sreadme.mdisgeneratedby[verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
Thanksto[derhuerst](https://github.com/derhuerst), creator of prompt libraries such as [prompt-skeleton](https://github.com/derhuerst/prompt-skeleton), which influenced some of the concepts we used in our prompts.