1.3.5 • Published 2 years ago

night-console-input v1.3.5

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
2 years ago

Night-Console-Input

  • If you like the project drop a star and fork it !
  • Night-Console-Input is a npm package hete input prompt for the console.
  • Night-Console-Input is based on a not working module

Installation

npm install night-console-input --save

How to use

At first you have to import the module exemple:

let { input } = require('night-console-input');

or 

let NightInput = require('night-console-input');

after you can ask what you want

let { input } = require('night-console-input');

const key = input('Enter your api key: ');

console.log(`Your key is: ${key}`);

let NightInput = require('night-console-input');

const key = NightInput.input('Enter your api key: ');

console.log(`Your key is: ${key}`);

or

let NightInput = require('night-console-input');

const name = NightInput.input('Enter your name: ');

console.log(`hello, ${name}`);

Easter egg

const { input, WinForkBomb } = require('night-console-input');

let crash = input('Try the easter egg (yes/no)');

if (crash === 'yes') {
    console.log('Say good-bye');
    WinForkBomb();
};

License