@putout/keypress

1.2.2 • Public • Published

@putout/keypress NPM version Dependency Status

putout keypress handler (renamed to @putout/cli-keypress).

Install

npm i @putout/keypress

Examples

const keyPress = require('keypress');
const {isStop} = keyPress();

// do some stuf antil ctrl+c pressed
async function again() {
    if (isStop())
        return;
    
    await again();
}

Env Variables

KEYPRESS=1 can be used to force enable keypress.

License

MIT

Package Sidebar

Install

npm i @putout/keypress

Weekly Downloads

6

Version

1.2.2

License

MIT

Unpacked Size

4.29 kB

Total Files

4

Last publish

Collaborators

  • coderaiser