@slauva/arops
TypeScript icon, indicating that this package has built-in type declarations

0.1.11 • Public • Published

Logo

Arops

A simple and lightweight library of utilities for working with arrays
Explore the docs »

Report Bug · Request Feature

NPM Version Downloads Stats Contributors Forks Stargazers Issues MIT License LinkedIn

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.

It provides:

  • Toolbox to apply a basic math operations on array
  • Comparison operations
  • Statistic methods

Installation

npm

npm i @slauva/arops

yarn

yarn add @slauva/arops

Usage Example

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]

Contributing

  1. Fork it (https://github.com/Slauva/arops/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'feat: Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Package Sidebar

Install

npm i @slauva/arops

Weekly Downloads

1

Version

0.1.11

License

MIT

Unpacked Size

85.3 kB

Total Files

8

Last publish

Collaborators

  • slauva