Skip to content

zonday/inquirer-timeout-confirm-prompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Timeout Confirm Prompt

Inquirer 确认提示,超时自动确认

安装

npm install --save @zonda/inquirer-timeout-confirm-prompt

使用

const inquirer = require('inquirer');
const TimeoutConfirm = require('@zonda/inquirer-time-confirm-prompt');

inquirer.registerPrompt('timeout-confirm', TimeoutConfirm);
inquirer
  .prompt({
    type: 'timeout-confirm',
    name: 'test',
    message: '是否确定要删除',
    timeout: 5,
    timeoutTips: (t) => `(${t}秒后自动确认)`
  }).then(answers => {
     // ...
  });

About

Inquirer timeout confirm prompt

Resources

Stars

Watchers

Forks

Packages

No packages published