stdin-blocker
A tiny library for blocking stdin keypresses, except for ctrl+c. Useful while displaying animations.
Last updated 3 years ago by fabiospampinato .
Repository · Bugs · Original npm · Tarball · package.json
$ gnpm 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 --save 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.0                                ...           latest (3 years ago)

2 Versions

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

Copyright 2013 - present © cnpmjs.org | Home |