A tiny library for blocking stdin keypresses, except for Ctrl+C. Useful while displaying animations.
npm install stdin-blocker
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
MIT © Fabio Spampinato