
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
arr-toolkit
Advanced tools
arr-toolkit is a comprehensive utility library for array manipulation, offering a range of functions to streamline common array operations such as finding intersections, calculating differences, shuffling elements, chunking arrays, flattening nested structures, ensuring uniqueness, rotating elements, zipping arrays, partitioning based on conditions, and unifying arrays.
Install arr-toolkit via npm:
npm install arr-toolkit
Import the functions you need from arr-toolkit:
| Name | Usage | Output |
|---|---|---|
| Intersection | intersection([1, 2, 3], [2, 3, 4]) | [2, 3] |
| Difference | difference([1, 2, 3], [2, 3, 4]) | [1] |
| Shuffle | shuffle([1, 2, 3, 4, 5]) | [3, 1, 5, 2, 4] (varies) |
| Chunk | chunk([1, 2, 3, 4, 5], 2) | [[1, 2], [3, 4], [5]] |
| Flatten | flatten([1, [2, [3, 4], 5]]) | [1, 2, 3, 4, 5] |
| Unique | unique([1, 2, 2, 3, 4, 4, 5]) | [1, 2, 3, 4, 5] |
| Rotate | rotate([1, 2, 3, 4, 5], 2) | [4, 5, 1, 2, 3] |
| Zip | zip([1, 2, 3], ['a', 'b', 'c']) | [[1, 'a'], [2, 'b'], [3, 'c']] |
| Partition | partition([1, 2, 3, 4, 5], x => x % 2 === 0) | [[2, 4], [1, 3, 5]] |
| Union | union([1, 2, 3], [3, 4, 5]) | [1, 2, 3, 4, 5] |
Contributions are welcome! Please feel free to submit a Pull Request.
When using this package in Visual Studio Code, you can get more information about each method by hovering over it.
This package in under MIT License.
FAQs
A collection of handy array manipulation functions.
The npm package arr-toolkit receives a total of 0 weekly downloads. As such, arr-toolkit popularity was classified as not popular.
We found that arr-toolkit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.