Arachnea is a JavaScript library for fluent and efficient array operations β inspired by the agility and precision of spiders πΈοΈ.
It provides a chainable, expressive API for transforming, filtering, and processing arrays with clarity and speed.
π Arachnea is participating in Hacktoberfest 2025!
This is a great project for both first-time and experienced contributors who love JavaScript and clean, expressive APIs.
Weβve labeled issues with:
good first issue
β beginner-friendlyhelp wanted
β community support neededhacktoberfest
β counts toward Hacktoberfest contributions
π‘ All merged, approved, or
hacktoberfest-accepted
PRs will count for Hacktoberfest!
- Star this repo π
- Fork and clone it locally
- Pick an issue labeled
good first issue
orhelp wanted
- Create a feature branch
- Implement your change (bug fix, new feature, or doc update)
- Open a Pull Request β and link it to the related issue if applicable
Please ensure your code is formatted and tested before submission!
If youβre looking for where to begin:
- π§ͺ Add unit tests for
map
,filter
, orreduce
- βοΈ Add new methods:
sort
,flatMap
, orgroupBy
- πͺΆ Improve chaining performance
- π Enhance documentation and examples
- π§ Add type definitions (TypeScript support)
- π¦ Improve error handling for invalid input
- π§ Fluent API β Chainable, expressive operations
- β‘ Map / Filter / Reduce / Find / Remove β Core array utilities
- π§Ή Efficient Iteration β Lazy evaluation for composable performance
- π§ Extendable Design β Plug in your own terminal operations
npm install arachnea
# or
yarn add arachnea
import arachnea from "arachnea";
const numbers = [1, 2, 3, 4, 5];
arachnea(numbers).forEach((num) => {
console.log(num * 2); // Example of using forEach
});
const sumOfSquares = arachnea(numbers)
.map((num) => num * num)
.reduce((acc, num) => acc + num, 0);
console.log(sumOfSquares); // Output: 55
const oddNumbers = arachnea(numbers)
.filter((num) => num % 2 !== 0)
.collect();
console.log(oddNumbers); // Output: [1, 3, 5]
const remove4 = arachnea(numbers)
.map((num) => num * num)
.remove(4)
.collect();
console.log(remove4); // Output: [1, 9, 16, 25]
const greaterThanTwentyFour = arachnea(numbers)
.map((num) => num * num)
.find((num) => num > 24);
console.log(greaterThanTwentyFour); // Output: 25
const result = arachnea(numbers)
.filter((num) => num > 2)
.map((num) => num * 3)
.reduce((acc, num) => acc + num, 0);
console.log(result); // Output: 39
Transforms each element of the array using the provided transformer function.
Filters elements based on the provided condition.
Reduces the array to a single value using the provided reducer and initial value.
Removes the first element in the array that meets the condition or equals the parameter.
Finds the first element that matches the condition or equals the given parameter.
Executes a provided function once per array element.
Collects and returns the resulting array after all transformations.
- Combine successive filter operations for efficiency
- Document
actionsLoop
for custom terminating operation injection - Improve atomic operation performance
- Add sorting and flattening functions
- Add better error handling for invalid input
- Introduce TypeScript definitions
We welcome contributions of all kinds β from docs and examples to performance optimizations and new features.
Please fork the repo, make your changes, and open a pull request.
Licensed under the MIT License.