$ npm install @putout/cli-keypress
putout
keypress handler.
npm i @putout/cli-keypress
const keyPress = require('keypress');
const {isStop} = keyPress();
// do some stuff until ctrl+c pressed
async function again() {
if (isStop())
return;
await again();
}
KEYPRESS=1
can be used to force enable keypress
.
MIT
© 2010 - cnpmjs.org x YWFE | Home | YWFE