getpass
getpass for node.js
Last updated 3 years ago by arekinath .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install getpass 
SYNC missed versions from official npm registry.

getpass

Get a password from the terminal. Sounds simple? Sounds like the readline module should be able to do it? NOPE.

Install and use it

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

API

mod_getpass.getPass([options, ]callback)

Gets a password from the terminal. If available, this uses /dev/tty to avoid interfering with any data being piped in or out of stdio.

This function prints a prompt (by default Password:) 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

Current Tags

  • 0.1.7                                ...           latest (3 years ago)

8 Versions

  • 0.1.7                                ...           3 years ago
  • 0.1.6                                ...           4 years ago
  • 0.1.5                                ...           4 years ago
  • 0.1.4                                ...           4 years ago
  • 0.1.3                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
Downloads
Today 714
This Week 100,595
This Month 248,695
Last Day 25,203
Last Week 140,382
Last Month 595,758
Dependencies (1)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |