mirror of
https://github.com/fluencelabs/jsonpath
synced 2025-05-04 13:42:13 +00:00
build wasm
This commit is contained in:
parent
75c28fc73d
commit
c1d4c78da9
File diff suppressed because one or more lines are too long
BIN
docs/2de294fccdc5d36ccd36.module.wasm
Normal file
BIN
docs/2de294fccdc5d36ccd36.module.wasm
Normal file
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
docs/bench/2de294fccdc5d36ccd36.module.wasm
Normal file
BIN
docs/bench/2de294fccdc5d36ccd36.module.wasm
Normal file
Binary file not shown.
Binary file not shown.
20
docs/bench/bootstrap.js
vendored
20
docs/bench/bootstrap.js
vendored
@ -55,21 +55,21 @@
|
||||
/******/ "../all_pkg/jsonpath_wasm_bg.wasm": function() {
|
||||
/******/ return {
|
||||
/******/ "./jsonpath_wasm": {
|
||||
/******/ "__wbindgen_cb_forget": function(p0i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_cb_forget"](p0i32);
|
||||
/******/ },
|
||||
/******/ "__wbindgen_json_parse": function(p0i32,p1i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_json_parse"](p0i32,p1i32);
|
||||
/******/ },
|
||||
/******/ "__wbindgen_json_serialize": function(p0i32,p1i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_json_serialize"](p0i32,p1i32);
|
||||
/******/ },
|
||||
/******/ "__wbg_error_bb0b0e541b3bff31": function(p0i32,p1i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbg_error_bb0b0e541b3bff31"](p0i32,p1i32);
|
||||
/******/ "__wbg_error_0ade5a1300347156": function(p0i32,p1i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbg_error_0ade5a1300347156"](p0i32,p1i32);
|
||||
/******/ },
|
||||
/******/ "__wbindgen_object_drop_ref": function(p0i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_object_drop_ref"](p0i32);
|
||||
/******/ },
|
||||
/******/ "__wbindgen_cb_forget": function(p0i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_cb_forget"](p0i32);
|
||||
/******/ },
|
||||
/******/ "__wbindgen_string_new": function(p0i32,p1i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_string_new"](p0i32,p1i32);
|
||||
/******/ },
|
||||
@ -94,11 +94,11 @@
|
||||
/******/ "__wbindgen_rethrow": function(p0i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_rethrow"](p0i32);
|
||||
/******/ },
|
||||
/******/ "__wbindgen_closure_wrapper115": function(p0i32,p1i32,p2i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_closure_wrapper115"](p0i32,p1i32,p2i32);
|
||||
/******/ "__wbindgen_closure_wrapper23": function(p0i32,p1i32,p2i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_closure_wrapper23"](p0i32,p1i32,p2i32);
|
||||
/******/ },
|
||||
/******/ "__wbindgen_closure_wrapper117": function(p0i32,p1i32,p2i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_closure_wrapper117"](p0i32,p1i32,p2i32);
|
||||
/******/ "__wbindgen_closure_wrapper25": function(p0i32,p1i32,p2i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_closure_wrapper25"](p0i32,p1i32,p2i32);
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ };
|
||||
@ -198,7 +198,7 @@
|
||||
/******/ promises.push(installedWasmModuleData);
|
||||
/******/ else {
|
||||
/******/ var importObject = wasmImportObjects[wasmModuleId]();
|
||||
/******/ var req = fetch(__webpack_require__.p + "" + {"../all_pkg/jsonpath_wasm_bg.wasm":"33fd09cf53124f20b1e8"}[wasmModuleId] + ".module.wasm");
|
||||
/******/ var req = fetch(__webpack_require__.p + "" + {"../all_pkg/jsonpath_wasm_bg.wasm":"2de294fccdc5d36ccd36"}[wasmModuleId] + ".module.wasm");
|
||||
/******/ var promise;
|
||||
/******/ if(importObject instanceof Promise && typeof WebAssembly.compileStreaming === 'function') {
|
||||
/******/ promise = Promise.all([WebAssembly.compileStreaming(req), importObject]).then(function(items) {
|
||||
|
20
docs/bootstrap.js
vendored
20
docs/bootstrap.js
vendored
@ -55,21 +55,21 @@
|
||||
/******/ "../all_pkg/jsonpath_wasm_bg.wasm": function() {
|
||||
/******/ return {
|
||||
/******/ "./jsonpath_wasm": {
|
||||
/******/ "__wbindgen_cb_forget": function(p0i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_cb_forget"](p0i32);
|
||||
/******/ },
|
||||
/******/ "__wbindgen_json_parse": function(p0i32,p1i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_json_parse"](p0i32,p1i32);
|
||||
/******/ },
|
||||
/******/ "__wbindgen_json_serialize": function(p0i32,p1i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_json_serialize"](p0i32,p1i32);
|
||||
/******/ },
|
||||
/******/ "__wbg_error_bb0b0e541b3bff31": function(p0i32,p1i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbg_error_bb0b0e541b3bff31"](p0i32,p1i32);
|
||||
/******/ "__wbg_error_0ade5a1300347156": function(p0i32,p1i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbg_error_0ade5a1300347156"](p0i32,p1i32);
|
||||
/******/ },
|
||||
/******/ "__wbindgen_object_drop_ref": function(p0i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_object_drop_ref"](p0i32);
|
||||
/******/ },
|
||||
/******/ "__wbindgen_cb_forget": function(p0i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_cb_forget"](p0i32);
|
||||
/******/ },
|
||||
/******/ "__wbindgen_string_new": function(p0i32,p1i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_string_new"](p0i32,p1i32);
|
||||
/******/ },
|
||||
@ -94,11 +94,11 @@
|
||||
/******/ "__wbindgen_rethrow": function(p0i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_rethrow"](p0i32);
|
||||
/******/ },
|
||||
/******/ "__wbindgen_closure_wrapper115": function(p0i32,p1i32,p2i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_closure_wrapper115"](p0i32,p1i32,p2i32);
|
||||
/******/ "__wbindgen_closure_wrapper23": function(p0i32,p1i32,p2i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_closure_wrapper23"](p0i32,p1i32,p2i32);
|
||||
/******/ },
|
||||
/******/ "__wbindgen_closure_wrapper117": function(p0i32,p1i32,p2i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_closure_wrapper117"](p0i32,p1i32,p2i32);
|
||||
/******/ "__wbindgen_closure_wrapper25": function(p0i32,p1i32,p2i32) {
|
||||
/******/ return installedModules["../all_pkg/jsonpath_wasm.js"].exports["__wbindgen_closure_wrapper25"](p0i32,p1i32,p2i32);
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ };
|
||||
@ -198,7 +198,7 @@
|
||||
/******/ promises.push(installedWasmModuleData);
|
||||
/******/ else {
|
||||
/******/ var importObject = wasmImportObjects[wasmModuleId]();
|
||||
/******/ var req = fetch(__webpack_require__.p + "" + {"../all_pkg/jsonpath_wasm_bg.wasm":"33fd09cf53124f20b1e8"}[wasmModuleId] + ".module.wasm");
|
||||
/******/ var req = fetch(__webpack_require__.p + "" + {"../all_pkg/jsonpath_wasm_bg.wasm":"2de294fccdc5d36ccd36"}[wasmModuleId] + ".module.wasm");
|
||||
/******/ var promise;
|
||||
/******/ if(importObject instanceof Promise && typeof WebAssembly.compileStreaming === 'function') {
|
||||
/******/ promise = Promise.all([WebAssembly.compileStreaming(req), importObject]).then(function(items) {
|
||||
|
@ -935,4 +935,70 @@ describe('ISSUE test', () => {
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
it('Failure to match "$..[\'$ref\']", "$..[\'ref\']", but succeeds on "$..ref" #43', (done) => {
|
||||
|
||||
function select(json, expected, paths) {
|
||||
for (var i = 0 ; i < paths.length ; i++) {
|
||||
let result = jsonpath.select(json, paths[i]);
|
||||
if (JSON.stringify(result) !== JSON.stringify(expected)) {
|
||||
throw Error("Error: " + paths[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let json = {
|
||||
"Junk1": "This is a test to illustrate use of '$' in the attr for the expression $..['$ref'] ",
|
||||
"$ref": "Match Root",
|
||||
"Subset1":[
|
||||
{"Junk2": "Data...",
|
||||
"$ref": "Match Subset1"
|
||||
}
|
||||
],
|
||||
"hierachy1":{
|
||||
"hierachy2.1":{
|
||||
"hierachy2.1.1":{ "$ref":"Match 2.1.1"},
|
||||
"hierachy2.1.2":{ "ref":"Match 2.1.2"},
|
||||
"hierachy2.1.3":{ "ref":"No Match 2.1.3"},
|
||||
"hierachy2.1.4":{ "$ref":"Match 2.1.4"},
|
||||
"hierachy2.1.5":{ "ref":"No Match 2.1.5"}
|
||||
},
|
||||
"hierachy2.2":{
|
||||
"hierachy2.2.1":{ "ref":"No Match 2.2.1"},
|
||||
"hierachy2.2.2":{ "$ref":"Match 2.2.2"},
|
||||
"hierachy2.2.3":{ "ref":"No Match 2.2.3"},
|
||||
"hierachy2.2.4":{ "ref":"No Match 2.2.5"},
|
||||
"hierachy2.2.5":{ "$ref":"Match 2.2.5"}
|
||||
},
|
||||
"hierachy2.3":{
|
||||
"hierachy2.3.1":{ "ref":"No Match 2.3.1"},
|
||||
"hierachy2.3.2":{ "ref":"No Match 2.3.2"},
|
||||
"hierachy2.3.3":{ "ref":"No Match 2.3.3"},
|
||||
"hierachy2.3.4":{ "ref":"No Match 2.3.4"},
|
||||
"hierachy2.3.5":{ "ref":"No Match 2.3.5"},
|
||||
"hierachy2.3.6":{
|
||||
"hierachy2.3.6.1":{ "$ref":"Match 2.3.6.1"},
|
||||
"hierachy2.3.6.2":{ "ref":"No Match 2.3.6.2"},
|
||||
"hierachy2.3.6.3":{ "ref":"No Match 2.3.6.3"},
|
||||
"hierachy2.3.6.4":{ "ref":"No Match 2.3.6.4"},
|
||||
"hierachy2.3.6.5":{ "ref":"No Match 2.3.6.5"}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let expected = [
|
||||
"Match Root",
|
||||
"Match Subset1",
|
||||
"Match 2.1.1",
|
||||
"Match 2.1.4",
|
||||
"Match 2.2.2",
|
||||
"Match 2.2.5",
|
||||
"Match 2.3.6.1"
|
||||
];
|
||||
|
||||
select(json, expected, ['$..$ref', '$..["$ref"]'] );
|
||||
|
||||
done();
|
||||
});
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user