linq-utils
v1.0.1
Published
A lightweight and easy-to-use library that provides LINQ-like query capabilities for JavaScript arrays.
Downloads
503
Maintainers
Readme
linq-utils - A lightweight and easy-to-use library that provides LINQ-like query capabilities for JavaScript arrays [Discord]
A lightweight implementation of LINQ-style operations for JavaScript/TypeScript with support for common array manipulations and data transformations.
Installation
npm install --save linq-utils
Usage
import Linq from 'linq-utils';
const numbers = [1, 2, 3, 4, 5];
const linq = new Linq<number>(numbers);
const result = linq
.Where(x => x % 2 === 0)
.Select(x => x * 2)
.ToArray();
console.log(result); // [4, 8]