askpassword
A password prompt that does print data to the TTY
Last updated 2 months ago by addaleax .
Apache-2.0 · Original npm · Tarball · package.json
$ cnpm install askpassword 
SYNC missed versions from official npm registry.

askpassword

A password prompt that does print data to the TTY.

import askpassword from 'askpassword';

console.log('Please enter a password:');
const password = await askpassword(process.stdin);
console.log('You entered the following password:', password.toString());

The stream passed to askpassword can be any kind of Readable stream. If it is a TTY, askpassword will temporarily remove all other 'data' and 'readable' listeners from it, and set the TTY into raw mode if it has not been in raw mode to begin with.

LICENSE

MIT

Current Tags

  • 1.2.1                                ...           latest (2 months ago)

5 Versions

  • 1.2.1                                ...           2 months ago
  • 1.2.0                                ...           2 months ago
  • 1.1.0                                ...           2 months ago
  • 1.0.1                                ...           3 months ago
  • 1.0.0                                ...           3 months ago

Copyright 2014 - 2016 © taobao.org |