# @nits.frontend/number-utils

> With npm

Latest version **1.1.8** (published 2022-09-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install @nits.frontend/number-utils
pnpm add @nits.frontend/number-utils
yarn add @nits.frontend/number-utils
bun add @nits.frontend/number-utils
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.8 |
| Published | 2022-09-06 |
| First published | 2022-08-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | xikmatilla, temurbekh, oybek_kamolov, invuln, furqat, akbar_1909 |
| Keywords | number, utils, formatted, format, money format |

## Links

- npm: https://www.npmjs.com/package/@nits.frontend/number-utils
- Repository: https://github.com/Akbar1909/nits-number-utils
- Homepage: https://github.com/Akbar1909/nits-number-utils#readme
- Issues: https://github.com/Akbar1909/nits-number-utils/issues
- npm.io page: https://npm.io/package/@nits.frontend/number-utils

## Dependencies (1)

- [typescript](https://npm.io/package/typescript.md) ^4.7.4

## 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

- 1.1.8 (latest) — 2022-09-06
- 1.1.7 — 2022-09-06
- 1.1.6 — 2022-08-09
- 1.1.5 — 2022-08-05
- 1.1.4 — 2022-08-05
- 1.1.3 — 2022-08-05
- 1.1.2 — 2022-08-04
- 1.1.1 — 2022-08-04
- 1.1.0 — 2022-08-04
- 1.0.1 — 2022-08-04

## README

With npm

```shell
 npm install @nits.frontend/number-utils --save

```

With yarn

```shell
yarn add @nits.frontend/number-utils

```

#EXAMPLE

```js
const { addSpaceEvery3Char } = require("@nits.frontend/number-utils");

ES2015;

import { addSpaceEvery3Char } from "@nits.frontend/number-utils";

const result = addSpaceEvery3Char({ num: 1234567, count: 2 });

console.log(result);

// 1 234 567,00

const result = addSpaceEvery3Char({ num: 1234567, count: 3 });

console.log(result);

// 1 234 567,000

const result = addSpaceEvery3Char({ num: 1234567, separator: "_" });

console.log(result);

// 1_234_567,00

const result = addSpaceEvery3Char({
  num: 1234567,
  separator: "_",
  decimal: ".",
});

console.log(result);

// 1_234_567.00

const result = addSpaceEvery3Char({
  num: [],
  defaultValue: "this is not I want",
});

// this is not I want
```

#EXAMPLE

```js
const { createRangeAndDoSomething } = require("@nits.frontend/number-utils");

ES2015;

import { createRangeAndDoSomething } from "@nits.frontend/number-utils";

createRangeAndDoSomething(4, 5, (i) => {
  console.log(i);
});

// 4,5
```

DEFINITION

| Parameter    |           Value           |
| ------------ | :-----------------------: |
| num          |         required          |
| count        |        default: 2         |
| separator    |       default: " "        |
| decimal      |       default: ","        |
| defaultValue | default: "invalid number" |

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