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

2.0.1 • Public • Published

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

Package Sidebar

Install

npm i stdin-blocker

Weekly Downloads

28,309

Version

2.0.1

License

MIT

Unpacked Size

4.57 kB

Total Files

7

Last publish

Collaborators

  • fabiospampinato