1.0.0 • Published 3 years ago

ez-inputs v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

ez-inputs v1.0.0


Easy terminal inputs for an Easier time.

Installation


npm install ez-inputs

yarn add ez-inputs

How to use


const ez = require('ez-inputs');

//Text prompt
//Text prompt returns a "String" data type.

var name = ez.text('What is your name?: );

//Number prompt
//Number prompt returns a Number data type

var name = ez.number('What is your age?: );

//Question propmt allows you to get a closed-ended question from the user
//The array needs to be two objects and have a name and value element
//An optional "default" element is applicable to allow the user to continue with a default answer

var dog = ez.question('Are you a dog? [y/N]: ', [
    {
        name: 'y',
        value: true,
    },
    {
        default: true,
        name: 'n',
        value: false,
    }
])