This package has been deprecated

Author message:

Development of this module has been stopped.

easyline

1.1.0 • Public • Published

easyline

NPM version License Code style

simple promise readline wrapper

Installation

$ npm install --save easyline

...or:

$ yarn add easyline

Usage

const easyline = require('easyline')
 
;(async function main () {
  // question
  const name = await easyline.question('Name?')
 
  // question with default value
  const greeting = await easyline.question('Greeting?', 'hello')
 
  // yes or no
  const greet = await easyline.yesNo('Greet?')
 
  if (greet) {
    console.log(`${greeting} ${name}`)
  }
 
  process.exit()
}())
 

Example

Readme

Keywords

Package Sidebar

Install

npm i easyline

Weekly Downloads

1

Version

1.1.0

License

MIT

Last publish

Collaborators

  • roryrjb