1.2.2 • Published 3 years ago

@putout/keypress v1.2.2

Weekly downloads
1,124
License
MIT
Repository
github
Last release
3 years ago

@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