fabiospampinato / stdin-blocker

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

License:MIT License


Languages

Language:TypeScript 64.5%Language:JavaScript 35.5%