of-course

0.0.2 • Public • Published

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);
});

Readme

Keywords

Package Sidebar

Install

npm i of-course

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

6.59 kB

Total Files

6

Last publish

Collaborators

  • connorwiseman