m-readline-promise
v1.0.0
Published
Ultra lightweight promise based input for node.js.
Downloads
12
Maintainers
Readme
Why u should use this package
- Works fine on linux / mac / windows
- Really lightweight
- 0 required packages
- Easy to use
- Works like in python but u need to use async/await
- Begginers friendly
Setup
very easy
var input = require("m-readline-promise")
Usage
var input = require("m-readline-promise")
async function myFunction() {
var name = await input("Whats your name? >")
console.log("Nice! Your name is", name)
}
Usage
If you use python, then you probabbly used input()
function, this package brings python's input to node.js!
Python:
name = input("Your name: ")
Node.js:
var name = await input("Your name: ")