Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

getchar

KrzysztofSzewczyk15Unlicense1.0.1

getchar is JavaScript library working as polyfill to supply basic input function to NodeJS.

getchar, C, libc, api, polyfill, javascript, library, basic, input, stdin, function, nodejs

readme

getchar 💻

getchar is simple native library bringing C-style getchar() function to Node, allowing to read from standard input character by character, synchronously, without callbacks!

npm version npm license Dependency Status

NPM

Install

npm install --save getchar

Usage

const glib = require("getchar");
let c = glib.getchar(true); 
// typeof(c) === 'string'
// getchar(boolean) - default: false, if true skip newlines.

console.log(c);