confirmer

1.1.2 • Public • Published

confirmer

Simple y/n prompt for the command line

features:

  • only one keypress required (y/n)
  • ignores invalid user input
  • preserves behaviour of ^C and ^D
  • simple promise based api
  • queues multiple questions

installation

npm install confirmer

usage

var confirmer = require('confirmer')
confirmer('Would you like to continue? (y/n)')
  .then(result => result ? next() : end())

Readme

Keywords

none

Package Sidebar

Install

npm i confirmer

Weekly Downloads

767

Version

1.1.2

License

UNLICENSED

Unpacked Size

2.15 kB

Total Files

3

Last publish

Collaborators

  • alz