JSPM

@shahata/inquirer-timeout-confirm-prompt

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q47405F
  • License MIT

Inquirer timeout confirm prompt

Package Exports

  • @shahata/inquirer-timeout-confirm-prompt
  • @shahata/inquirer-timeout-confirm-prompt/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@shahata/inquirer-timeout-confirm-prompt) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Timeout Confirm Prompt

Inquirer Confirmation prompt, automatic confirmation after timeout

Based on https://github.com/zonday/inquirer-timeout-confirm-prompt

Install

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

Use

import timeoutConfirm from '@shahata/inquirer-timeout-confirm-prompt';

const answer = await timeoutConfirm({
  message: 'Are you sure you want to delete?', 
  timeout: 5, 
  timeoutTips: (t) => `(Automatic confirmation in ${t} seconds)`
});

console.log(answer);