stdin-blocker
A tiny library for blocking stdin keypresses, except for Ctrl+C. Useful while displaying animations.
Last updated 2 years ago by fabiospampinato .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install stdin-blocker 
SYNC missed versions from official npm registry.

Stdin Blocker

A tiny library for blocking stdin keypresses, except for Ctrl+C. Useful while displaying animations.

Install

npm install stdin-blocker

Usage

import Blocker from 'stdin-blocker';

Blocker.isBlocked (); // => false, stdin input is not blocked

Blocker.block ();

Blocker.isBlocked (); // => true, stdin input is blocked

Blocker.unblock ();

Blocker.isBlocked (); // => false, stdin input is not blocked

Blocker.toggle ();

Blocker.isBlocked (); // => true, stdin input is blocked

License

MIT © Fabio Spampinato

Current Tags

  • 2.0.1                                ...           latest (2 years ago)

3 Versions

  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Total 6
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (4)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE