data-inputjs

1.0.21 • Public • Published

Build Status

data-inputjs

simple text input per terminal

npm i data-inputjs

Select exemple

const colorSelector = async () => {
    const select = await input.select(["red", 'blue', 'orange', 'pink'],'select a color')
    console.log(`your color is ${select}`)


    // select a color

    //    red
    //  -> blue
    //    orange
    //    pink

    // your color is blue

}

Input exemple

const addName = async () => {
    const name = await input.text("add your name: ")
    console.log(name)

    // add your name: jorge
    // jorge

}

Input exemple numeric

const addNumber = async () => {
    const number = await input.numeric("add a number: ")
    console.log(number)

    // add a number: 10
    // 10

}

Input exemple password

const addPassword = async () => {
    const password = await input.password("add a password: ")
    console.log(password)

    // add a password: test
    // test

}

Package Sidebar

Install

npm i data-inputjs

Weekly Downloads

15

Version

1.0.21

License

MIT

Unpacked Size

13.6 kB

Total Files

12

Last publish

Collaborators

  • lucasulcas
  • jorge_snk