declarray

Tools for working with arrays in LINQ style


Keywords
collections, where, select, LINQ, sort, group, zip, union, except, join, arrays
License
ISC
Install
npm install declarray@6.0.0-beta-1.3

Documentation

What is Declarray?

Declarray is my own linq like library for manipulations with collections. I did it just for improve my skills at my free time. This lib allows filter, sort, change and etc. collection in declarative style. Declarray supports lazy computations. Your expression will computed once and only when you will call one of Materializing Methods or one of Aggregation Methods.

Installation

$npm install declarray

Usage

import _ from 'declarray'
...
const result = _([1, 2, 3, 4]).where(item => !(item % 2)).toArray();
// result is [2, 4]

const anotherResult = _([1, 2, 3, 4]).select(item => item ** 2).toArray();
// [1, 4, 9, 16]

Wiki

You may see full information about methods at my github wiki.

Technologies

Project is created with:

  • benchmark 2.1.4
  • chai 4.2.0
  • mocha 8.1.1
  • typescript 3.9.7