0.0.0 • Published 9 years ago

myprompt v0.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

myprompt

A synchronous prompt function for Node, in the tradition of prompt() in the browser. Based on sync-prompt.

Install

npm install myprompt

Usage

var prompt = require('myprompt')

var name = prompt('What\'s your name?')

console.log('Hello, ' + name + '!')
var age = Number(prompt('How old are you?'))
console.log('Next year, you\'ll be ' + (age + 1) + ' years old!')