stdin-blocker
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

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

Dependents (2)

Package Sidebar

Install

npm i stdin-blocker

Weekly Downloads

30,693

Version

2.0.0

License

none

Unpacked Size

7.19 kB

Total Files

12

Last publish

Collaborators

  • fabiospampinato