Discard stdin input except for Ctrl+C

Overview

stdin-discarder

Discard stdin input except for Ctrl+C

This can be useful to prevent stdin input from interfering with stdout output. For example, you are showing a spinner, and if the user presses a key, it would interfere with the spinner, causing visual glitches. This package prevents such problems.

This has no effect on Windows as there is no good way to implement discarding stdin properly there.

This package is used by ora for its discardStdin option.

Work in progress

Install

npm install stdin-discarder

Usage

import stdinDiscarder from 'stdin-discarder';

stdinDiscarder.start();

API

stdinDiscarder.start()

Start discarding stdin.

stdinDiscarder.stop()

Stop discarding stdin.

Related

  • hook-std - Hook and modify stdout and stderr
You might also like...

🛠 Highly customisable, minimalistic input x select field for React.

Insect 🛠 Highly customisable, minimalistic input x select field for React. ⚡️ Features Tiny size (~4kb Gzip) 100% responsive. Highly customisable. Su

Oct 29, 2022

Input with floating label make with tailwindcss 3.0.18

Input with floating label make with tailwindcss 3.0.18

tailwind-floating-label-input Input with floating label make with tailwindcss 3.0.18 Works with input and textarea elements. How to use Input

Feb 10, 2022

State based input library for the browser

Inp State based input library for the browser

Mar 23, 2022

A multi-tag input for sanity studio.

A multi-tag input for sanity studio.

sanity-plugin-tags A multi-tag input for sanity studio. Fully featured with autocomplete capabilities, live updates, predefined tag options, style and

Jul 22, 2022

jQuery tags input plugin based on Twitter Bootstrap.

Bootstrap Tags Input Bootstrap Tags Input is a jQuery plugin providing a Twitter Bootstrap user interface for managing tags. Current stable version: v

Dec 21, 2022

Master your input data like a pro!

⭐ Master your input data like a pro! ⭐ ✔️ Node.js & browser ✔️ Only 1kb! ✔️ Fully typed ✔️ No dependencies Simple helper library which allows you to e

May 13, 2022

🌐 Text Input Component for validating and formatting international phone numbers.

🌐  Text Input Component for validating and formatting international phone numbers.

React Native Intl Phone Field Try the Expo Snack 👏 🕹️ Demo It's a javascript-only (no native code) component that can run in iOS, Android, Expo & Re

Jul 8, 2022

A robust form library for Lit that enriches input components with easy-to-use data validation features.

A robust form library for Lit that enriches input components with easy-to-use data validation features.

EliteForms A robust form library for Lit that enriches input components with easy-to-use data validation features. Installation npm install elite-form

Jun 28, 2022

Generate deterministic fake values: The same input will always generate the same fake-output.

Generate deterministic fake values: The same input will always generate the same fake-output.

import { copycat } from '@snaplet/copycat' copycat.email('foo') // = '[email protected]' copycat.email('bar') // = 'Thurman.Schowalter668@

Dec 30, 2022
Releases(v0.1.0)
Owner
Sindre Sorhus
Full-Time Open-Sourcerer. Focuses on Swift & JavaScript. Makes macOS apps, CLI tools, npm packages. Likes unicorns.
Sindre Sorhus
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Demo running web assembly apps a terminal with blocking stdin/stdout/stderr

Python wasm-terminal Live version here: https://wasm-terminal.firebaseapp.com/ This is a small demo of running Python in the browser with a focus on i

Katie Bell 16 Nov 16, 2022
A JavaScript component that is a date & time range picker, no need to build, no dependencies except Moment.js, that is based on Dan Grossman's bootstrap-daterangepicker.

vanilla-datetimerange-picker Overview. A JavaScript component that is a date & time range picker, no need to build, no dependencies except Moment.js,

null 22 Dec 6, 2022
A minimal typing practice website with no features except typing. Inspired from Monkeytype. Do ⭐ this repository.

SenpaiType Introduction SenpaiType is a minimal typing practice website with no features except typing. Inspired from Monkeytype. Contributing Raise i

Pruthviraj Jadhav 5 Nov 30, 2022
A Bootstrap plugin to create input spinner elements for number input

bootstrap-input-spinner A Bootstrap / jQuery plugin to create input spinner elements for number input. Demo page with examples Examples with floating-

Stefan Haack 220 Nov 7, 2022
A phone input component that uses intl-tel-input for Laravel Filament

Filament Phone Input This package provides a phone input component for Laravel Filament. It uses International Telephone Input to provide a dropdown o

Yusuf Kaya 24 Nov 29, 2022
Free, open-source client or server-side APIs to "lint" user input.

passbird Free, open-source client or server-side APIs to lint user input. Right now, you can check type for an email address i.e., either of disposabl

Vaibhav Pandey 1 Dec 26, 2021
Input a list of Handshake top-level domains, outputs names sorted into 4 arrays: available, registered, reserved, or invalid.

name-check A simple NodeJS package that, given a flat list of top-level domain names, queries the Handshake (HNS) blockchain in order to classify each

Neel Yadav 2 Jan 8, 2022