@putout/cli-keypress

2.0.0 • Public • Published

@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

/@putout/cli-keypress/

    Package Sidebar

    Install

    npm i @putout/cli-keypress

    Weekly Downloads

    18,293

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    4.03 kB

    Total Files

    4

    Last publish

    Collaborators

    • coderaiser