inputline
v0.1.4
Published
An EASY way to read from console.
Downloads
17
Readme
Inputline
A easy console input library
Installing
- Type
npm i -s inputline
into your terminal/console.
Examples
Import
Import inputline after installing it.
const inputline = require("inputline");
Await input from terminal
Note that this is async/await and you can't use it in top-level currently in node js.
let input = await inputline.get();
Get every input from terminal
Use a callback to get all inputs from console without needing too block the thread.
inputline.getAll((input) => {
// Log it
console.log(`New input: ${input}`);
});