getchar
v1.0.1
Published
getchar is JavaScript library working as polyfill to supply basic input function to NodeJS.
Downloads
15
Maintainers
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!
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);