Socket
Socket
Sign inDemoInstall

inquirer-promise

Package Overview
Dependencies
32
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    inquirer-promise

Promise wrapper for inquirer


Version published
Weekly downloads
16K
decreased by-23.5%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

inquirer-promise

Promise wrapper around inquirer.

prompt

inquirer = require("inquirer-promise");

inquirer.prompt([{type: "input",
                  name: "animal",
                  message: "Favorite animal?",
                  default: "wapiti"}])
  .then(results => console.log(results.animal));

question

Ask one question.

inquirer.question({type: "input",
                   message: "Favorite animal?",
                   default: "wapiti"})
  .then(animal => console.log(animal));

input

inquirer.input("Favorite animal?", {default: "wapiti"})
  .then(animal => console.log(animal));

confirm

inquirer.confirm("Is the wapiti your favorite animal?")
  .then(answer => console.log(answer));

list

inquirer.list("Favorite animal?", ["cat", "dog", "wapiti"])
  .then(animal => console.log(animal));

rawlist

inquirer.rawlist("Favorite animal?", ["cat", "dog", "wapiti"])
  .then(animal => console.log(animal));

expand

inquirer.expand("Favorite animal?",
                [{key: "c", name: "cat"}
                 {key: "d", name: "dog"}
                 {key: "w", name: "wapiti"}])
  .then(animal => console.log(animal));

checkbox

inquirer.checkbox("Favorite animals?", ["cat", "dog", "wapiti"])
  .then(animals => console.log(animals));

password

inquirer.password("Enter password.")
  .then(password => console.log("Don't print passwords!"));

FAQs

Last updated on 25 Jan 2016

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