Strongly typed Linq implementation for Javascript and TypeScript (ES5, ES6, +)
Includes collections (+ readonly versions): List, Dictionary, Stack, ...
https://github.com/isc30/linq-collections
This project was developed by Ivan Sanz (isc30)
The project is already finished, yet some features are missing. If you want to contribute with any of these, please check the Development status and missing features list
I will be happy to accept pull requests :D
Every single method has complete type definitions available.
If you use TypeScript, its purely is based in generics.
[Insert motivational GIF with intellisense in action]
Using ES5, it has 100% compatibility with nodejs and all main browsers (+mobile)
Check your browser now if you don't believe it ->
Linq-Collections uses custom iterators and deferred execution mechanisms that ensure BLAZING FAST operations, outperforming any other popular library. Its also optimized to work with minimal CPU and RAM usage.
If previous reasons aren't enought, here are few more:
Interfaces for this library are already designed. New versions won't break any old code.
We strongly recommend using *
for version selector
dependencies {
"linq-collections": "1.*"
}
Complete Linq to Objects implementation (deferred execution)
toArray, toList, toDictionary, toLookup, aggregate, all, any, average, concat, contains, count, defaultIfEmpty, distinct, elementAt, elementAtOrDefault, except, first, firstOrDefault, forEach, groupBy, groupJoin, intersect, join, last, lastOrDefault, longCount, max, min, orderBy, orderByDescending, reverse, select, selectMany, sequenceEquals, single, single, singleOrDefault, skip, skipWhile, sum, take, takeWhile, union, where, zip, ...
Collections (+ readonly versions)
List, Dictionary, Stack, Queue, ...
All Collections are Queryable
const list = new List<string>([
"Hello",
"Bye",
"Thanks",
]);
const notHello = list.where(e => e !== "Hello");
This library uses mocha
with custom assertion helper for testing.
Use nyc mocha
to run the tests and coverage.