@ornstio/ts-linq
TypeScript icon, indicating that this package has built-in type declarations

0.0.11 • Public • Published

@ornstio/ts-linq

Adds LINQ-like typed extensions to Typescript arrays https://ts-linq.ornstio.com/ https://www.npmjs.com/package/@ornstio/ts-linq

Installation

$ npm i @ornstio/ts-linq

Usage

Add the following lines to main.ts:

import { tsLinq } from "@ornstio/ts-linq";
tsLinq();

Examples

any

[0, 1].any((_) =>  _ === 0)
= true

except

const  arr = [{ x:  0 }, { x:  1 }, { x:  2 }];
arr.except([{ x:  0 }, { x:  1 }, { x:  3 }], (a, b) =>  a.x === b.x);
= [{x:2},{x:3}]

Readme

Keywords

Package Sidebar

Install

npm i @ornstio/ts-linq

Weekly Downloads

2

Version

0.0.11

License

MIT

Unpacked Size

254 kB

Total Files

84

Last publish

Collaborators

  • ornstio-development