Skip to content

A tiny library for blocking stdin keypresses, except for ctrl+c. Useful while displaying animations.

License

Notifications You must be signed in to change notification settings

fabiospampinato/stdin-blocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A tiny library for blocking stdin keypresses, except for ctrl+c. Useful while displaying animations.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published