@berhalak/linq

Typescript linq

Usage no npm install needed!

<script type="module">
  import berhalakLinq from 'https://cdn.skypack.dev/@berhalak/linq';
</script>

README

Gitpod Ready-to-Code

linq

Linq style using generators

npm install @berhalak/linq

const list = new Set([1, 2, 3]);
expect(from(list).where(x => x > 2).first()).toBe(3);

const a = [1, 2, 3];
const b = [3, 4, 5];
let r = from(a).intersect(b);
expect(r.count()).toBe(1);