0.0.2 • Published 6 years ago

of-course v0.0.2

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

of-course

npm Node.js Build Status Coverage Dependencies Status devDependencies Status MIT licensed

Promise-based input prompting in the terminal.

Installation

npm install --save of-course

Usage

const prompt = require('of-course');

(async () => {
  let username = await prompt.string('Username: ');
  let password = await prompt.password('Password: ');
  let verify   = await prompt.password('Password (check): ');

  console.log({ username, password, verify });
})();

API

#string

Prompts for a string.

prompt.string('Username: ').then((username) => {
  console.log(username);
});

#password

Prompts for a string, obscuring input.

prompt.password('Password: ').then((password) => {
  console.log(password);
});
0.0.2

6 years ago

0.0.1

6 years ago

0.0.0

6 years ago