Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A simple way to ask the user for command line input
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
LICENSE
README.md
package.json
stdask.js
test.js

README.md

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();
    });
});
Something went wrong with that request. Please try again.