All Projects → ENikS → Linq

ENikS / Linq

Licence: apache-2.0
TypeScript Implementation of Language-Integrated Query (LINQ) (ECMAScript 2015)

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Linq

Linq To Gameobject For Unity
LINQ to GameObject - Traverse GameObject Hierarchy by LINQ
Stars: ✭ 578 (+435.19%)
Mutual labels:  linq
Linq In Rust
Language Integrated Query in Rust.
Stars: ✭ 48 (-55.56%)
Mutual labels:  linq
Linq To Astar
A* written in C#, used with LINQ.
Stars: ✭ 87 (-19.44%)
Mutual labels:  linq
Linqfaster
Linq-like extension functions for Arrays, Span<T>, and List<T> that are faster and allocate less.
Stars: ✭ 615 (+469.44%)
Mutual labels:  linq
Data Forge Ts
The JavaScript data transformation and analysis toolkit inspired by Pandas and LINQ.
Stars: ✭ 967 (+795.37%)
Mutual labels:  linq
Queries
Enumerable collections for Dart language (inspired by Microsoft LINQ).
Stars: ✭ 52 (-51.85%)
Mutual labels:  linq
Netfabric.hyperlinq
High performance LINQ implementation with minimal heap allocations. Supports enumerables, async enumerables, arrays and Span<T>.
Stars: ✭ 479 (+343.52%)
Mutual labels:  linq
Arangoclient.net
ArangoDB .NET Client with LINQ support
Stars: ✭ 94 (-12.96%)
Mutual labels:  linq
Linq.py
Just as the name suggested.
Stars: ✭ 42 (-61.11%)
Mutual labels:  linq
Linq
linq.js - LINQ for JavaScript
Stars: ✭ 1,168 (+981.48%)
Mutual labels:  linq
Linq.ts
🌀LINQ for TypeScript
Stars: ✭ 687 (+536.11%)
Mutual labels:  linq
System.linq.dynamic.core
The .NET Standard / .NET Core version from the System Linq Dynamic functionality.
Stars: ✭ 864 (+700%)
Mutual labels:  linq
Simple 1c
Транслятор запросов и Linq-провайдер для 1С-Бухгалтерии
Stars: ✭ 56 (-48.15%)
Mutual labels:  linq
Linq
Linq for list comprehension in C++
Stars: ✭ 599 (+454.63%)
Mutual labels:  linq
Magpie
🐦 Successor of my monkey Interpreter(support for class, linq, sql, net, http, fmt, json and A realtime syntax highlighting REPL).
Stars: ✭ 88 (-18.52%)
Mutual labels:  linq
Unirx
Reactive Extensions for Unity
Stars: ✭ 5,501 (+4993.52%)
Mutual labels:  linq
Linq.translations
Declare properties on an object that can be translated by LINQ
Stars: ✭ 51 (-52.78%)
Mutual labels:  linq
Structlinq
Implementation in C# of LINQ concept with struct
Stars: ✭ 106 (-1.85%)
Mutual labels:  linq
Linq To Wiki
.Net library to access MediaWiki API
Stars: ✭ 93 (-13.89%)
Mutual labels:  linq
Linq To Bigquery
LINQ to BigQuery is C# LINQ Provider for Google BigQuery. It also enables Desktop GUI Client with LINQPad and plug-in driver.
Stars: ✭ 69 (-36.11%)
Mutual labels:  linq

Build Status Coverage Status Dependency Status Greenkeeper badge npm version Downloads License

The library is a continuous effort to implement LINQ using latest features of TypeScript and JavaScript languages (For ES5 compatible library look at linq-es5 branch). The library is implemented in TypeScript and transpiled into JavaScript. It is distributed as a native module. It utilizes latest ECMAScript 2015 language specification: Iterables ( [System.iterator] ), generators (function*), for of loops.
All relevant methods are implemented with deferred execution so no unnecessary iterations are performed. The code is backwards compatible with linq-es5 and C# implementations.

Using in Node

Install module with this command:

npm install linq-es2015 --save

Once installed it could be loaded and used like this:

import * as Enumerable from "linq-es2015"; 

var count =  Enumerable.asEnumerable( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] )
                       .Where(a => a % 2 == 1)
                       .Count()

var iterable = Enumerable.asEnumerable(people)
                         .GroupJoin(pets,
                                    person => person, 
                                    pet => pet.Owner,
                                    (person, petCollection) => {
                                        return {
                                            Owner: person.Name,
                                            Pets: asEnumerable(petCollection)
                                                 .Select(pet=> pet.Name)
                                                 .ToArray()
                                        };
                                    });

[See Example]

Using in browser

Browserified "standalone" UMD module is located in /dist directory and could be accessed through NPM CDN service. Both linq.js and linq.min.js are available. Module is loaded with <script> element:

<script type="text/javascript" src="//unpkg.com/linq-es2015/dist/linq.min.js"></script>

Loading this script creates Enumerable global variable. You can use it to perform LINQ queries:

var count =  Enumerable.asEnumerable( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] )
                       .Where(a => a % 2 == 1)
                       .Count()

[See Example]

Using in Angular 2

The same package could be used on a server as well as on the client. You have to install module as usual:

npm install linq-es2015 --save

Open app.components.html file and add element to hold calculated value:

<h1>{{title}}</h1>
<div>Count - {{count}}</div>

and finally import linq-es2015 in app.component.ts and do some calculations:

import { Component } from '@angular/core';
import { asEnumerable } from 'linq-es2015';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})

export class AppComponent {
  title = 'app works!';
  count: number;

    constructor(){
      this.count = asEnumerable([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]).Where(a => a % 2 == 1)
                                                                .Count();        
    }
}

[See Example]

Documentation

Example Projects

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].