@putout/cli-keypress
handle keypress
Last updated 2 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @putout/cli-keypress 
SYNC missed versions from official npm registry.

@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

Current Tags

  • 4.0.0                                ...           latest (3 months ago)

4 Versions

  • 4.0.0                                ...           3 months ago
  • 3.0.0                                ...           a year ago
  • 2.0.0                                ...           2 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (2)
Dev Dependencies (10)

Copyright 2013 - present © cnpmjs.org | Home |