Package Exports
- linq-js
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-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
LinqJs
use linq and lambda in javascript
在javascript中使用linq与lambda
在1.0.0中使用了字符串的lambda表达式,过于繁琐,并且不支持延迟操作 从2.1.0开始整体代码重新编写,使用全新的ES6的特性,性能更好,同时对数据的操作是延时操作,占用更少
Usage 用法
Usage for English is Coming soon...
Start 开始使用
1. 引入
使用nodejs
npm install --save-dev linq-js
const Enumerable = require('linq-js').default; //ES5
import Enumerable from 'linq-js'; //ES6 (建议)
- 说明:本module依赖于ES6,建议项目在中使用ES6,以下案例中将均使用ES6写法
2. 获取IEnumerable对象
'abc'.asEnumerable();
[1,2,3].asEnumerable();
{a:1,b:2}.asEnumerable();