Input prompt plugin for Enquirer. This is the only prompt type included in Enquirer by default and does not need to be registered separately.
Clone or download
Latest commit 02bcb2d Sep 10, 2017
Permalink
Failed to load latest commit information.
examples add/update examples May 28, 2017
.editorconfig first commit Aug 28, 2016
.eslintrc.json run update Jul 8, 2017
.gitattributes first commit Aug 28, 2016
.gitignore run update Jun 21, 2017
.travis.yml run update Jun 21, 2017
.verb.md run verb to generate readme Sep 10, 2017
LICENSE run update Jul 8, 2017
README.md run verb to generate readme Sep 10, 2017
appveyor.yml run update Sep 10, 2017
example.gif update example.gif May 28, 2017
index.js rename Sep 10, 2017
package.json 3.0.0 Sep 10, 2017
test.js update deps Jul 8, 2017

README.md

prompt-input NPM version NPM monthly downloads NPM total downloads Linux Build Status Windows Build Status

Basic text input prompt. This can be used standalone, but it's also included in enquirer by default.

prompt-input example

Install

Install with npm:

$ npm install --save prompt-input

Usage

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

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

// promise
input.run()
  .then(function(answers) {
    console.log(answers);
  });

Enquirer usage

There is no need to register this with enquirer, as this is the only prompt type included in enquirer by default.

About

Related projects

Contributing

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

Running tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm install && npm test

Author

Jon Schlinkert

License

Copyright © 2017, Jon Schlinkert. Released under the MIT License.


This file was generated by verb-generate-readme, v0.6.0, on September 10, 2017.