# @zolv/array-utilities

> javascript utils library for array operations

Latest version **0.1.3** (published 2024-03-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install @zolv/array-utilities
pnpm add @zolv/array-utilities
yarn add @zolv/array-utilities
bun add @zolv/array-utilities
```

## Health

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

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

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2024-03-10 |
| First published | 2024-02-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Zhivko Nikolov |
| Maintainers | zhivko_nikolov |
| Keywords | array-utils, utils, js, ts, javascript-utils, javascript, array |

## Links

- npm: https://www.npmjs.com/package/@zolv/array-utilities
- Repository: https://github.com/nikolov9996/array-utilities
- Homepage: https://github.com/nikolov9996/array-utilities#readme
- Issues: https://github.com/nikolov9996/array-utilities/issues
- npm.io page: https://npm.io/package/@zolv/array-utilities

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.1.3 (latest) — 2024-03-10
- 0.1.2 — 2024-02-18
- 0.1.1 — 2024-02-18
- 0.1.0 — 2024-02-16
- 0.0.5 — 2024-02-16
- 0.0.4 — 2024-02-16
- 0.0.3 — 2024-02-12
- 0.0.2 — 2024-02-12
- 0.0.1 — 2024-02-09

## README

# Simple Array functions 

## Using only simple arrays of strings, number or mixed (string & numbers)
### Important thing is that the util functions will not modify the original array!
### Simple examples:
|Function Name|Arguments|Result|
|----------------|------------|--------------|
| createArray({ length }) | { length: 4 } | [ 1, 1, 1, 1 ] |
| sortArray({ arr, order }) | { arr: [ 3, 2, "x", "a" ], order: "ASC" } | [ '2', '3', 'a', 'x' ] |
| mergeArrays(arr) | [ [ 1, 1 ], [ 2, 2 ] ] | [ 1, 1, 2, 2 ] |
| randomizeArray(arr) | [ 1, 2, 3, 4, 5, 6] | [ 4, 1, 6, 3, 5, 2 ] |
| removeDuplicates({ arr }) |{ arr: [ "a", 3, 3, "a", "b" ] }| [ 'a', 3, 'b' ] |
| removeValue({ arr, value }) | { arr: [ "a", "b", "c" ], value: "c" } | [ 'a', 'b' ] |
| removeAllValues({ arr, value }) | { arr: [ "a", "b", "a", "c", "a" ], value: "a" } | [ 'b', 'c' ] |
| removeByIndex({ arr, index }) | { arr: [ "a", "b", "c" ], index: 0 } | [ 'b', 'c' ] |

# Complex Array functions - on the way
## will include advanced operations for arrays of objets and 2D arrays

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