2.0.0 • Published 6 months ago

@putout/cli-keypress v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

@putout/cli-keypress NPM version

putout keypress handler.

Install

npm i @putout/cli-keypress

Examples

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

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

Env Variables

KEYPRESS=1 can be used to force enable keypress.

License

MIT