3.0.0 • Published 9 months ago

@putout/cli-keypress v3.0.0

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

@putout/cli-keypress NPM version

putout keypress handler.

Install

npm i @putout/cli-keypress

Examples

import {keypress} from '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