declarray
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

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

Package Sidebar

Install

npm i declarray

Weekly Downloads

0

Version

0.4.0

License

ISC

Unpacked Size

101 kB

Total Files

99

Last publish

Collaborators

  • afferenslucem