Using C# Linq from TypeScript/Js

Hi all, my personal experience when using ES5 javascript can be summarized to this:

if only I had groupby… or strongly typed dictionary… if only I had generators and iterators… if only .map and .filter weren’t using that much RAM… etc etc

This is why I started writing my own version, ES5 compatible, with deferred iterators, lazy Enumerables, Collections (List, Dictionary, etc + readonly interfaces) and full LinQ to Objects support.

This is how Linq-Collections was born!

https://github.com/isc30/linq-collections

http://blog.codeisc.com/linq-collections/mocha

From the documentation:

Complete implementation of LinqToObjects + Collections (List, Dictionary, … + readonly versions) in TypeScript. It works everywhere (ES5). Strictly following Microsoft’s standard, uses deferred execution mechanisms with custom iterators (ES5) for minimal CPU and RAM usage. 100% coverage in unit + integration tests.

In case some .NET developer needs to switch to TypeScript, I consider this library a helpful one

Also check “why use it”: https://github.com/isc30/linq-collections#why-use-it

I hope you like it!

submitted by /u/isc30
[link] [comments]

Leave a Reply