Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

enquirer-prompt-input

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enquirer-prompt-input

Input prompt plugin for [Enquirer]. This is the only prompt type included in Enquirer by default and does not need to be registered separately.

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

enquirer-prompt-input NPM version NPM downloads

Input prompt plugin for Enquirer. This is the only prompt type included in Enquirer by default and does not need to be registered separately.

input prompt example

Install

Install with npm:

$ npm install --save enquirer-prompt-input

Usage

var Input = require('enquirer-prompt-input');
var input = new Input({
  name: 'first',
  message: 'What is your name?'
});

input.ask(function(answers) {
  console.log(answers);
});

Enquirer usage

This is the only prompt type included in enquirer by default, so you don't need to register this with enquirer. The following is only an example of how custom prompts are registered.

var Enquirer = require('enquirer');
var enquirer = new Enquirer();

// register the prompt type with enquirer
enquirer.register('input', require('enquirer-prompt-input'));
var Enquirer = require('enquirer');
var enquirer = new Enquirer();
enquirer.register('input', require('enquirer-prompt-input'));

var questions = [
  {
    type: 'input',
    name: 'first',
    message: 'First name?',
    default: 'Brian'
  },
  {
    type: 'input',
    name: 'last',
    message: 'Last name?',
    default: 'Woodward'
  }
];

enquirer.ask(questions)
  .then(function(answers) {
    console.log(answers)
  });

Attribution

Based on the input prompt in inquirer.

About

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Running tests

Install dev dependencies:

$ npm install -d && npm test

Author

Jon Schlinkert

License

Copyright © 2016, Jon Schlinkert. Released under the MIT license.


This file was generated by verb-generate-readme, v0.1.30, on August 30, 2016.

Keywords

FAQs

Package last updated on 01 Sep 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc