1.0.1 • Published 2 years ago

linq-utils v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

linq-utils - A lightweight and easy-to-use library that provides LINQ-like query capabilities for JavaScript arrays [Discord]

NPM NPM GitHub issues GitHub forks GitHub stars GitHub license Discord server

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]