1.0.7 • Published 5 years ago
stdin-prompt v1.0.7
Prompt
What is prompt?
Prompt is an extremely lightweight prompter for the CLI.
Installation
Run the command
npm i stdin-prompt
to install Prompt.
Require
Require with this code:
var prompt = require('stdin-prompt');
Syntax
prompt.once(prompt, callback);
Where prompt
is a string containing the name of the prompt.
Where callback
is a function with an argument data
, the prompt data from the CLI.
prompt.interface(prompt, callback);
Where prompt
is a string containing the text to output each time the callback is complete.
Where callback
is a function with an argument data
, the prompt data from the CLI.