# @za-utils/input-number

> Simple number input

Latest version **0.0.10** (published 2021-04-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install @za-utils/input-number
pnpm add @za-utils/input-number
yarn add @za-utils/input-number
bun add @za-utils/input-number
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.10 |
| Published | 2021-04-27 |
| First published | 2021-04-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 16 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ZA |
| Maintainers | zaycevdev |
| Keywords | input, number, input-number |

## Links

- npm: https://www.npmjs.com/package/@za-utils/input-number
- Repository: https://github.com/ZaycevNet/input-number
- Homepage: https://github.com/ZaycevNet/input-number#readme
- Issues: https://github.com/ZaycevNet/input-number/issues
- npm.io page: https://npm.io/package/@za-utils/input-number

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 0.0.10 (latest) — 2021-04-27
- 0.0.9 — 2021-04-27
- 0.0.8 — 2021-04-21
- 0.0.7 — 2021-04-21
- 0.0.6 — 2021-04-19
- 0.0.5 — 2021-04-05
- 0.0.4 — 2021-04-05
- 0.0.3 — 2021-04-05
- 0.0.2 — 2021-04-05
- 0.0.1 — 2021-04-05

## README

# Simple number input

## Install

```
npm install @za-utils/input-number
```

## Usage

```js
import InputNumber from '@za-utils/input-number';

const input = document.querySelector('input'); // your input node

const instance = new InputNumber(input); // creating instance

instance.setFixed(8); // can set max decimals precision
instance.setMin(0); // can set min amount value
instance.setMax(1000000000); // can set max amount value

// '12345' => amount (string or number)
// null => caret position (array of 2 items: [0, 1])
// true => save caret position (if current value 1234567890 and your set caret after 5, you can set value 1234567.890 caret will be seted after 5 )
instance.setValue('12345', null, true);

// graceful down
instance.destroy();
```

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