getpass

WebJar for getpass

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

getpass
Last Version

Last Version

0.1.7
Release Date

Release Date

Type

Type

jar
Description

Description

getpass
WebJar for getpass
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/arekinath/node-getpass

Download getpass

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/getpass/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>getpass</artifactId>
    <version>0.1.7</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/getpass/
implementation 'org.webjars.npm:getpass:0.1.7'
// https://jarcasting.com/artifacts/org.webjars.npm/getpass/
implementation ("org.webjars.npm:getpass:0.1.7")
'org.webjars.npm:getpass:jar:0.1.7'
<dependency org="org.webjars.npm" name="getpass" rev="0.1.7">
  <artifact name="getpass" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='getpass', version='0.1.7')
)
libraryDependencies += "org.webjars.npm" % "getpass" % "0.1.7"
[org.webjars.npm/getpass "0.1.7"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : assert-plus jar [1.0.0,2)

Project Modules

There are no modules declared in this project.

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

Versions

Version
0.1.7