Skip to content

ucev/get-password

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

getpassword

Install

npm install --save getpassword
const getpass = require('getpassword');

Usage

getpass.getpass([options, ]callback)

Gets a password from the terminal.

This function prints a prompt (by default 请输入密码:) and then accepts input without echoing.

Parameters:

  • options, an Object, with properties:
    • prompt, an optional String
  • callback, a Func(error, password), with arguments:
    • error, either null (no error) or an Error instance
    • password, a String

getpass.getpass([options])

Gets a password from the terminal, return a Promise. If success, you can get your input-password from the then function.

About

getpass for node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published