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