$ gnpm install stdin-blocker
A tiny library for blocking stdin keypresses, except for ctrl+c. Useful while displaying animations.
npm install --save 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
Copyright 2013 - present © cnpmjs.org | Home |