stdask

0.0.3 • Public • Published

stdask gives a simple interface for asking the user for command line inputs

Installation

npm install stdask

API The second argument is an optional regex filter with which the users input will be processed

ask( questionString, optionalRegexFilter, callback )

Usage

var ask = require("./stdask").ask;
 
ask("Enter your name", function(name) {
    ask("Enter your email", /^.+@.+$/, function(email) {
        console.log("Your name is: ", name);
        console.log("Your email is:", email);
     
        process.exit();
   });
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    1
  • 0.0.2
    0

Package Sidebar

Install

npm i stdask

Weekly Downloads

1

Version

0.0.3

License

none

Last publish

Collaborators

  • mvegeto