JSPM

  • Created
  • Published
  • Downloads 2164529
  • Score
    100M100P100Q193962F

Synchronous Readline.question

Package Exports

  • readline-sync

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (readline-sync) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

readline-sync

Synchronous Readline.question for interactively running.

Example

var readlineSync = require('readline-sync');

var answer = readlineSync('What is your favorite food? :');
console.log('Oh, so your favorite food is ' + answer);

Installation

npm install -g readline-sync

Usage

answer = readlineSync([prompt[, encoding]])

require('readline-sync') returns a Function. Displays the prompt to the user if it is given, and then returns the user's response after it has been typed.
encoding specify encoding method of input (user's response) and output (prompt). Defaults to 'utf8'.

Release History

  • 2013-08-29 v0.1.0 Initial release.