# @arkecosystem/utils

> Performance oriented implementations of commonly used functions in TypeScript.

Latest version **1.3.1** (published 2022-01-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @arkecosystem/utils
pnpm add @arkecosystem/utils
yarn add @arkecosystem/utils
bun add @arkecosystem/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.3.1 |
| Published | 2022-01-06 |
| First published | 2019-01-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=10.x |
| Dependencies | 6 |
| Unpacked size | 202.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | alexbarnsley, faustbrian |

## Links

- npm: https://www.npmjs.com/package/@arkecosystem/utils
- npm.io page: https://npm.io/package/@arkecosystem/utils

## Dependencies (6)

- [deepmerge](https://npm.io/package/deepmerge.md) ^4.2.2
- [fast-copy](https://npm.io/package/fast-copy.md) ^2.1.0
- [fast-sort](https://npm.io/package/fast-sort.md) ^2.2.0
- [type-fest](https://npm.io/package/type-fest.md) ^0.17.0
- [@hapi/bourne](https://npm.io/package/@hapi/bourne.md) ^2.0.0
- [fast-deep-equal](https://npm.io/package/fast-deep-equal.md) ^3.1.3

## Recent versions

- 1.3.1 (latest) — 2022-01-06
- 1.3.0 — 2021-02-15
- 1.2.1 — 2020-11-16
- 1.2.0 — 2020-08-03
- 1.1.8 — 2020-04-28
- 1.1.7 — 2019-11-20
- 1.1.6 — 2019-10-25
- 1.1.5 — 2019-10-25
- 1.1.4 — 2019-10-25
- 1.1.0 — 2019-10-14
- 1.0.34 — 2019-10-14
- 1.0.31 — 2019-10-14
- 1.0.30 — 2019-10-14
- 1.0.0 — 2019-10-10
- 0.9.9 — 2019-10-10
- … 26 more at https://npm.io/package/@arkecosystem/utils/versions

## README

# Utilities

<p align="center">
    <img src="./banner.png" />
</p>

[![Codecov](https://badgen.now.sh/codecov/c/github/arkecosystem/utils)](https://codecov.io/gh/arkecosystem/utils)
[![License: MIT](https://badgen.now.sh/badge/license/MIT/green)](https://opensource.org/licenses/MIT)

> Lead Maintainer: [Brian Faust](https://github.com/faustbrian)

## Caveats

-   The native `map`, `filter`, `reduce` and `forEach` will generally be faster when used on arrays that contain nothing but numerical values.
-   If you plan to use `formatCurrency` method with node.js for anything else then the `en-US` locale you'll have to make sure to properly setup https://github.com/unicode-org/full-icu-npm as node.js itself only ships with the `en-US` locale by default unless specifically build with more locales.
-   Do not use the `is*` methods of this package inside the [Node.js VM](https://nodejs.org/api/vm.html) as the results could be misleading.
-   The `pluralize` method does not support irregular plurals. Check [blakeembrey/pluralize](https://github.com/blakeembrey/pluralize) if you need support for those.

## Installation

### npm

```sh
npm install @arkecosystem/utils
```

### yarn

```sh
yarn add @arkecosystem/utils
```

### pnpm

```sh
pnpm add @arkecosystem/utils
```

## Test

### npm

```sh
npm run test -- --coverage
```

### yarn

```sh
yarn test --coverage
```

### pnpm

```sh
pnpm run test -- --coverage
```

## Benchmark

### Clone

```sh
git clone git@github.com:ArkEcosystem/utils.git
```

### Run

#### npm

```sh
npm install
npm run bench
```

#### yarn

```sh
yarn install
yarn bench
```

#### pnpm

```sh
pnpm install
pnpm run bench
```

## Security

If you discover a security vulnerability within this package, please send an e-mail to security@ark.io. All security vulnerabilities will be promptly addressed.

## Credits

This project exists thanks to all the people who [contribute](../../contributors).

## License

[MIT](LICENSE) © [ARK Ecosystem](https://ark.io)

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