confirm.js 275 B

12345678910111213
  1. 'use strict';
  2. const BooleanPrompt = require('../types/boolean');
  3. class ConfirmPrompt extends BooleanPrompt {
  4. constructor(options) {
  5. super(options);
  6. this.default = this.options.default || (this.initial ? '(Y/n)' : '(y/N)');
  7. }
  8. }
  9. module.exports = ConfirmPrompt;