stdask

A simple way to ask the user for command line input

Usage no npm install needed!

<script type="module">
  import stdask from 'https://cdn.skypack.dev/stdask';
</script>

README

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

Installation

npm install stdask

Usage

var ask = require("./stdask").ask;

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