Add linq.js 4.0.2

This commit is contained in:
Namhyeon Go 2024-04-06 15:17:59 +09:00
parent 3f07d2355d
commit 6591ee7074
5 changed files with 3099 additions and 3 deletions

View File

@ -38,7 +38,8 @@ Dual license notice: The default license for this project is GPL 3.0. However, i
- [jQuery UI](https://jqueryui.com/)
- [github.com/kamranahmedse/jquery-toast-plugin](https://github.com/kamranahmedse/jquery-toast-plugin)
- [github.com/hiddentao/squel](https://github.com/hiddentao/squel)
- [github.com/BorisMoore/jsrender](https://github.com/BorisMoore/jsrender)
- [github.com/BorisMoore/jsrender](https://github.com/BorisMoore/jsrender) - Templating engine
- [github.com/mihaifm/linq](https://github.com/mihaifm/linq) - LINQ for JavaScript
- [Includes binaries](https://github.com/gnh1201/welsonjs/blob/master/bin/README.MD)
- [module.exports](https://nodejs.org/en/knowledge/getting-started/what-is-require/), CommonJS, UMD compatibility
- [NPM](https://www.npmjs.com/) compatibility

3
app.js
View File

@ -560,6 +560,9 @@ var is = require("app/assets/js/is-0.9.0.min");
//var Intl = require("app/assets/js/Intl-1.2.5-e93b114.min");
//console.log(new Intl.NumberFormat().format(1234567890.123456));
// linq.js - LINQ for JavaScript
var Enumerable = require("app/assets/js/linq-4.0.2.wsh.js")._default;
// Dive into entrypoint
function __main__() {
console.log("");

File diff suppressed because it is too large Load Diff

View File

@ -36,7 +36,7 @@
"tests": [
{
"id": "gtkserver_test",
"description": "GTK Server를 이용한 GUI(그래픽 사용자 인터페이스) 구현 가능 여부 확인",
"description": "Graphical User Interface (GUI) test with GTK server",
"tags": ["GTK", "GTK"]
},
{
@ -71,8 +71,13 @@
},
{
"id": "string_split",
"description": "String.split test",
"description": "String.split() test",
"tags": ["Assertion"]
},
{
"id": "linqjs",
"description": "linq.js (LINQ for JavaScript) test",
"tags": ["Library"]
}
]
}

View File

@ -934,6 +934,23 @@ var test_implements = {
console.log(c);
console.log(d);
}
},
"linqjs": function() {
var a = Enumerable.range(1, 10)
.where(function(i) { return i % 3 == 0; })
.select(function(i) { return i * 10; })
;
console.log(a.toArray().join(','));
var array = "monkey:red:apple:delicious:banana:long:train:fast:airplane:high:everest:sharp:seringue:painful".split(':');
var b = Enumerable.from(array).select(function(val, i) {
return {
value: val,
index: i
}
});
console.log(JSON.stringify(b.toArray()));
}
};