Skip to content
Node cross-platform password prompt
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.npmignore
.prettierrc
README.hbs
README.md
index.js
package.json
test.js
yarn.lock

README.md

password-prompt

Node cross-platform password prompt.

Supported Environments:

  • Unix
  • TTY or non-TTY
  • cygwin
  • Git Bash
  • cmd.exe
  • PowerShell
  • cmder
  • Console2

API Reference

prompt -- Prompt for a password

Returns: Promise.<string> - input from user

Param Type Default Description
[ask] string prompt output
[options] Object
[options.method] string "mask" mask or hide

Example

let prompt = require('password-prompt')
let password = prompt('password: ')
// password: ******
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.