JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 39764
  • Score
    100M100P100Q167779F

linq.js - LINQ for JavaScript library packaged for node.js

Package Exports

  • linq
  • linq/linq

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (linq) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

linq

This is a javascript implementation of the .NET LINQ library.

It contains all the origial .NET methods plus additional ones.

Installation

npm install linq

Examples

// C# LINQ - delegate
Enumerable.Range(1, 10)
    .Where(delegate(int i) { return i % 3 == 0; })
    .Select(delegate(int i) { return i * 10; });

// linq.js - anonymous function
Enumerable.Range(1, 10)
    .Where(function(i) { return i % 3 == 0; })
    .Select(function(i) { return i * 10; });
// C# LINQ  - lambda
Enumerable.Range(1, 10).Where(i => i % 3 == 0).Select(i => i * 10);

// linq.js - lambda expression
Enumerable.Range(1, 10).Where("i => i % 3 == 0").Select("i => i * 10");
// C# LINQ - anonymous type
array.Select((val, i) => new { Value = val, Index = i });

// linq.js - object literal
Enumerable.From(array).Select("val,i=>{Value:val, Index:i}");

See sample/tutorial.js for more examples.

People

Yoshifumi Kawai developed the original version of this library, currently no longer maintained.

License

MIT License