# questo

> Get multiple input from users with a array

Latest version **1.0.0** (published 2021-10-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install questo
pnpm add questo
yarn add questo
bun add questo
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-10-05 |
| First published | 2021-10-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Gabens Colas |
| Maintainers | bokbok |

## Links

- npm: https://www.npmjs.com/package/questo
- Repository: https://github.com/colasgabens/questo
- Homepage: https://github.com/colasgabens/questo#readme
- Issues: https://github.com/colasgabens/questo/issues
- npm.io page: https://npm.io/package/questo

## Recent versions

- 1.0.0 (latest) — 2021-10-05

## README

# What is this ?

its a package that help you get mutiple input from the user 
with the possibility to check there answers with a function 
that can return a boolean or a string after the check 

# Note 

get a array as input and return a arry at the end

# Installation

`npm i questo`

# Use 

```
import { questo } from 'questo';
import {stdin,stdout} from 'process';


const Data_List =
[
    {
        Question: "What color you want to use ?
         \n 1 :- blue \n 2 :- red \n",
        Error_Question : "Wrong answer it should be between (1) or (2)",
        On_Close_Response : " thanks",

        Check : (Input )  =>{
           
            let language = false;
            switch (parseInt(Input)) {
                case 1:
                    return "red";
                case 2:
                    return "blue";
            }
            return language

        } 
    },
        {
        Question: "What is 1 + 1 ?,
        Error_Question : "Wrong answer ",
        On_Close_Response : " thanks",

        Check : (Input )  =>{
           
            let addition = false;
              
              if (parseInt(Input) === 2){
                 return true;
              }
           
            return addition

        } 
    },
];

const quest = new questo({array : Data_List , stdin: stdin , stdout: stdout });


quest.main().on("end",data=>{
    console.log(data)
});


```
or ...

```
const questo = require('questo');

const stdin = require("process").stdin;

const stdout = require("process").stdout;

const Data_List =
[
    {
        Question: "What color you want to use ?
         \n 1 :- blue \n 2 :- red \n",
        Error_Question : "Wrong answer it should be between (1) or (2)",
        On_Close_Response : " thanks",

        Check : (Input )  =>{
           
            let language = false;
            switch (parseInt(Input)) {
                case 1:
                    return "red";
                case 2:
                    return "blue";
            }
            return language

        } 
    },
        {
        Question: "What is 1 + 1 ?,
        Error_Question : "Wrong answer ",
        On_Close_Response : " thanks",

        Check : (Input )  =>{
           
            let addition = false;
              
              if (parseInt(Input) === 2){
                 return true;
              }
           
            return addition

        } 
    },
];

const quest = new questo({array : Data_List , stdin: stdin , stdout: stdout });


quest.main().on("end",data=>{
    console.log(data) // ["red",true]
});

```

---
_Source: https://npm.io/package/questo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
