• Stars
    star
    117
  • Rank 300,465 (Top 6 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Strongly typed Linq and Collections implementation for Javascript and TypeScript (ECMAScript 5)

Linq-Collections: (IEnumerable, ...) + (List, Dictionary, ...)

npm version npm downloads build status coverage

Strongly typed Linq implementation for Javascript and TypeScript (ES5, ES6, +)
Includes collections (+ readonly versions): List, Dictionary, Stack, ...

Current Stable Version

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

Intellisense friendly

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]

Browser compatibility: 100%

Using ES5, it has 100% compatibility with nodejs and all main browsers (+mobile)
Check your browser now if you don't believe it ->

Performance

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.

Why use it?

If previous reasons aren't enought, here are few more:

  • Javascript && TypeScript compatible - You can use it with JS or TypeScript (contains .d.ts definitions)
  • No dependencies - Pure and lightweight
  • 100% browser/nodejs support - Stop caring about compatibility, it works everywhere!
  • Strongly typed - Developed in TypeScript, it uses no 'any' or dirty code. Everything is based in generics and strongly typed
  • Best performance - Deferred execution with custom iterators make the difference. Currently the fastest library.
  • Works out of the box - 'npm install linq-collections' is the hardest thing you'll need to do
  • Collections - Provides many type of collections (list, dictionary, ... + readonly) with linq integrated inside. As in C#
  • Strict standard - Strictly implementing microsoft's official linq definition (you can check it for exceptions, behavior, etc)
  • Deeply tested - Each new version is passing tons of quality tests before being released

Using the package

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.*"
}

Features

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");

How to run tests

This library uses mocha with custom assertion helper for testing.
Use nyc mocha to run the tests and coverage.

Hall of fame

More Repositories

1

blazor-analytics

Blazor extensions for Analytics: Google Analytics, GTAG, ...
C#
123
star
2

blazor-lazy-loading

Automatic Lazy Loading support for Blazor (Server and WebAssembly)
C#
91
star
3

xlnt-wasm

WebAssembly bindings for XLNT library
C++
24
star
4

recycle-tray

Adds the recycle bin to the tray
C#
9
star
5

IscEngine

Pure C++ and OpenGL-based 3D Game engine
C++
5
star
6

generic_optional

enables reference types for std::optional
C++
3
star
7

wasm-imasiengine

C++
3
star
8

noneim-framework

High performance, strongly typed, modular and microservice oriented web framework written from scratch. MVC, task scheduler, cache system, reflection, constructor-based dependency injection, custom ORM for MySQL, yielded responses (event-stream), mappings, routing, …
PHP
3
star
9

blazor-canvas

Canvas Components for easy graphic rendering (WASM+ServerSide)
C#
2
star
10

instant-blazor

Instantaneous Blazor Applications
HTML
2
star
11

ignaciusBros

HTML5 game created from scratch in less than 24h for the Euskal Encounter
JavaScript
2
star
12

eMulerr

Radarr/Sonarr integration for eD2k/KAD networks (eMule)
TypeScript
2
star
13

docker-php7

php7 + nginx + traefik support
PHP
2
star
14

SmsBomber

Result of live streaming. Simple SMS bomber based on adds platforms
PHP
1
star
15

buscaplan.com

buscaplan, oh yeah!
HTML
1
star
16

messagebus

A simple MessageBus implementation for .NET Standard 2.0
C#
1
star
17

dotnet-core-async-console

dotnet-core ConsoleApplication with ThreadPools
C#
1
star
18

cpp-starter

Project template for modern CMake, GoogleTest and multiple projects/libraries
CMake
1
star
19

rpi-traefik

traefik proxy + let's encrypt
Shell
1
star
20

blog.codeisc.com

JavaScript
1
star
21

expressive

C#
1
star
22

wasm-pong

WASM (emscripten, C++14) + WebGL2 (3D) + SDL2 (2D)
HTML
1
star
23

eMysqli

Extended Mysqli class that allows calling PROCEDURES, FUNCTIONS and VIEWS
PHP
1
star