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

Package detail

m-readline-promise

miftikcz17ISC1.0.0

Ultra lightweight promise based input for node.js.

readline, promise, miftikcz, lightweight

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: ")