Socket
Socket
Sign inDemoInstall

async-prompt

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    async-prompt

simple terminal user input 'co'


Version published
Maintainers
1
Install size
25.0 kB
Created

Readme

Source

async-prompt

Sane terminal user-input for nodejs that return thunks for Promise.

Installation

$ npm install async-prompt

Examples

const name = await prompt('username: ');
const pass = await password('password: ');
const desc = await multiline('description: ');
const ok = await confirm('are you sure? ');

API

prompt(msg)

Prompt for user input with msg.

prompt.password(msg, [mask])

Prompt for password input with msg and optional mask defaulting to "*".

if run without tty, will use prompt(msg) instead

prompt.multiline(msg)

Prompt for multi-line input with msg.

prompt.confirm(msg)

Prompt for confirmation with msg.

License

MIT

Forked from co-prompt

Keywords

FAQs

Last updated on 24 Jan 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc