@thi.ng/oquery 2.3.35 → 2.3.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/README.md +1 -1
- package/package.json +9 -9
- package/query.js +4 -4
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/oquery",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.37",
|
|
4
4
|
"description": "Datalog-inspired, optimized pattern/predicate query engine for JS objects & arrays of objects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -39,15 +39,15 @@
|
|
|
39
39
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@thi.ng/api": "^8.12.
|
|
43
|
-
"@thi.ng/checks": "^3.7.
|
|
44
|
-
"@thi.ng/compare": "^2.4.
|
|
45
|
-
"@thi.ng/defmulti": "^3.0.
|
|
46
|
-
"@thi.ng/equiv": "^2.1.
|
|
42
|
+
"@thi.ng/api": "^8.12.2",
|
|
43
|
+
"@thi.ng/checks": "^3.7.18",
|
|
44
|
+
"@thi.ng/compare": "^2.4.28",
|
|
45
|
+
"@thi.ng/defmulti": "^3.0.76",
|
|
46
|
+
"@thi.ng/equiv": "^2.1.92"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"esbuild": "^0.25.
|
|
50
|
-
"typedoc": "^0.28.
|
|
49
|
+
"esbuild": "^0.25.9",
|
|
50
|
+
"typedoc": "^0.28.12",
|
|
51
51
|
"typescript": "^5.9.2"
|
|
52
52
|
},
|
|
53
53
|
"keywords": [
|
|
@@ -99,5 +99,5 @@
|
|
|
99
99
|
],
|
|
100
100
|
"year": 2020
|
|
101
101
|
},
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "b7ede4f099767e0175ea8e09257208f73970b220\n"
|
|
103
103
|
}
|
package/query.js
CHANGED
|
@@ -278,7 +278,7 @@ const DEFAULT_OPTS = {
|
|
|
278
278
|
};
|
|
279
279
|
const defQuery = (opts) => {
|
|
280
280
|
const $opts = { ...DEFAULT_OPTS, ...opts };
|
|
281
|
-
return (src, ...args) => {
|
|
281
|
+
return ((src, ...args) => {
|
|
282
282
|
if (isArray(src)) {
|
|
283
283
|
const out = args[2] || [];
|
|
284
284
|
__arrayQuery(src, $opts, args[0], args[1], (x) => out.push(x));
|
|
@@ -286,11 +286,11 @@ const defQuery = (opts) => {
|
|
|
286
286
|
} else {
|
|
287
287
|
return __objQuery(src, $opts, args);
|
|
288
288
|
}
|
|
289
|
-
};
|
|
289
|
+
});
|
|
290
290
|
};
|
|
291
291
|
const defKeyQuery = (opts) => {
|
|
292
292
|
const $opts = { ...DEFAULT_OPTS, ...opts };
|
|
293
|
-
return (src, ...args) => {
|
|
293
|
+
return ((src, ...args) => {
|
|
294
294
|
if (isArray(src)) {
|
|
295
295
|
const out = args[2] || /* @__PURE__ */ new Set();
|
|
296
296
|
__arrayQuery(src, $opts, args[0], args[1], (_, i) => out.add(i));
|
|
@@ -302,7 +302,7 @@ const defKeyQuery = (opts) => {
|
|
|
302
302
|
for (let k in res) out.add(k);
|
|
303
303
|
return out;
|
|
304
304
|
}
|
|
305
|
-
};
|
|
305
|
+
});
|
|
306
306
|
};
|
|
307
307
|
const query = (db, terms, opts = {}) => {
|
|
308
308
|
for (let term of terms) {
|