Skip to content

JakeJohnson05/InquirerExitListener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InquirerExitListener

Adds listeners for exit events. Most commonly needed for inquirer prompts.

Listens for ctrl + c and escape to add necessary new lines in output for next prompt.

Install

$ npm install JakeJohnson05/InquirerExitListener

Usage

require this package before creating any inquiries and before possible long load times

require('inquirer-exit-listener');

// Now listening for close events

or call the exit function programmatically

const exitFunction = require('inquirer-exit-listener');

// Still listening for close events

// Call exitFunction() to programmatically end process
exitFunction();
// (beta) Include exit status code
exitFunction(1);

Windows

If you're on Windows, do yourself a favor and use Windows Terminal instead of cmd.exe.

About

Adds listeners for exit events for inquirer prompts

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published