@justinc/choices

1.0.0 • Public • Published

NPM

Inquirer.js wrapper for asking user to select from a list of choices.

Installation

npm install @justinc/choices

Usage

require('@justinc/choices')({ message: 'Make your selection' }).then(answer => {
  console.log('You chose:', answer.choice);
});
require('@justinc/choices')({ message: 'Make your selection', choices: ['blue pill', 'red pill'] }).then(answer => {
  console.log('You chose:', answer.choice);
});

Object Argument:

  • type: See type here. (default: 'list')
  • name: See name here. (default: 'choice')
  • message: See message here. (default: 'Select one of the following')
  • default: See default here. (default: `['yes', 'no', 'skip'])

Readme

Keywords

none

Package Sidebar

Install

npm i @justinc/choices

Weekly Downloads

1

Version

1.0.0

License

ISC

Last publish

Collaborators

  • justinc