A simple and lightweight library of utilities for working with arrays
Explore the docs »
Report Bug
·
Request Feature
The Arops npm package is a simple and lightweight library designed to provide utility functions for efficient array manipulation. It includes a range of functionalities to perform common operations on arrays, helping developers manage and transform array data with ease. The library is designed to be easy to use, making it a great addition to any JavaScript or Node.js project that requires straightforward and effective handling of array-related tasks.
- Toolbox to apply a basic math operations on array
- Comparison operations
- Statistic methods
npm
npm i @slauva/arops
yarn
yarn add @slauva/arops
import { condition } from "@slauva/arops";
const array = [0, 1, 2, 3, 4, 3, 2, 1, 0];
const out = condition(array, "1 <= x, x < 3");
console.log(out);
>> [false, true, true, false, false, false, true, true, false]
import { power, sqrt } from "@slauva/arops";
const array = [1, 2, 3, 4];
const out = power(array, 2);
console.log(out);
>> [1, 4, 9, 16]
const out_sqrt = sqrt(out);
console.log(out_sqrt);
>> [1, 2, 3, 4]
- Fork it (https://github.com/Slauva/arops/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'feat: Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request