# pyinput

> [![JavaScript Style Guide](https://cdn.rawgit.com/standard/standard/master/badge.svg)](https://github.com/standard/standard) [![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/Ri

Latest version **1.0.0** (published 2020-03-17) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-03-17 |
| First published | 2020-03-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | helloyunho |

## Links

- npm: https://www.npmjs.com/package/pyinput
- Repository: https://github.com/Helloyunho/pyInput
- npm.io page: https://npm.io/package/pyinput

## Recent versions

- 1.0.0 (latest) — 2020-03-17

## README

# pyinput

[![JavaScript Style Guide](https://cdn.rawgit.com/standard/standard/master/badge.svg)](https://github.com/standard/standard)
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)

Python-like input module for Node.js

## Table of Contents

- [Install](#install)
- [Usage](#usage)
- [API](#api)
- [Maintainers](#maintainers)
- [Contributing](#contributing)
- [License](#license)

## Install

```
npm install pyinput # Use yarn if you prefer to use yarn
```

## Usage

Example:

```js
// This is in example folder
const pyInput = require('../src');

const run = async () => {
  let done = false;
  while (!done) {
    const num = await pyInput('Type a number: ');

    const numParsed = parseInt(num);

    if (isNaN(numParsed)) {
      console.log('This is not a number! Try again.');
    } else {
      console.log(`Here is the number that powered: ${numParsed ** 2}`);
      done = true;
    }
  }
};

run();
```

## API

### `pyInput(...messages)` -> `{Promise.<string>}`

Python-like input

#### Parameters:

| Name     | Type  | Attributes     | Description                   |
| -------- | ----- | -------------- | ----------------------------- |
| messages | `any` | `<repeatable>` | Messages that will prints out |

#### Returns:

Recevied input

Type: `Promise.<string>`

## Maintainers

[@Helloyunho](https://github.com/Helloyunho)

## Contributing

PRs accepted.

Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.

## License

MIT © 2020 Helloyunho

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