confirmer

Simple y/n prompt for the command line

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
confirmer
1.1.24 years ago6 years agoMinified + gzip package size for confirmer in KB

Readme

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())