@thi.ng/oquery 2.1.44 → 2.1.46
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 +10 -7
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
[](https://mastodon.thi.ng/@toxi)
|
|
9
9
|
|
|
10
10
|
This project is part of the
|
|
11
|
-
[@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.
|
|
11
|
+
[@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo and anti-framework.
|
|
12
12
|
|
|
13
13
|
- [About](#about)
|
|
14
14
|
- [Status](#status)
|
|
@@ -50,7 +50,7 @@ thi.ng/umbrella packages, but would benefit from a more unified approach.
|
|
|
50
50
|
|
|
51
51
|
## Related packages
|
|
52
52
|
|
|
53
|
-
- [@thi.ng/associative](https://github.com/thi-ng/umbrella/tree/develop/packages/associative) - Alternative Map and Set implementations with customizable equality semantics & supporting operations
|
|
53
|
+
- [@thi.ng/associative](https://github.com/thi-ng/umbrella/tree/develop/packages/associative) - Alternative Map and Set implementations with customizable equality semantics & supporting operations, plain object utilities
|
|
54
54
|
- [@thi.ng/csv](https://github.com/thi-ng/umbrella/tree/develop/packages/csv) - Customizable, transducer-based CSV parser/object mapper and transformer
|
|
55
55
|
- [@thi.ng/egf](https://github.com/thi-ng/umbrella/tree/develop/packages/egf) - Extensible Graph Format
|
|
56
56
|
- [@thi.ng/rstream-query](https://github.com/thi-ng/umbrella/tree/develop/packages/rstream-query) - [@thi.ng/rstream](https://github.com/thi-ng/umbrella/tree/develop/packages/rstream) based triple store & reactive query engine
|
|
@@ -122,7 +122,7 @@ Object queries expect an object of the following structure:
|
|
|
122
122
|
|
|
123
123
|
A concrete example:
|
|
124
124
|
|
|
125
|
-
```ts
|
|
125
|
+
```ts tangle:export/readme.ts
|
|
126
126
|
const DB = {
|
|
127
127
|
alice: {
|
|
128
128
|
age: 33,
|
|
@@ -147,15 +147,18 @@ const DB = {
|
|
|
147
147
|
|
|
148
148
|
To find all answers for the question: Who knows Bob?
|
|
149
149
|
|
|
150
|
-
```ts
|
|
150
|
+
```ts tangle:export/readme.ts
|
|
151
|
+
import { defQuery } from "@thi.ng/oquery";
|
|
152
|
+
|
|
151
153
|
// create query w/ custom options
|
|
152
154
|
// (options explained further below...)
|
|
153
155
|
const query = defQuery({ partial: true });
|
|
154
156
|
|
|
155
|
-
query(DB, null, "knows", "bob");
|
|
157
|
+
console.log(query(DB, null, "knows", "bob"));
|
|
156
158
|
// {
|
|
157
|
-
// alice: { knows: [
|
|
158
|
-
// charlie: { knows: [
|
|
159
|
+
// alice: { knows: [ 'bob' ] },
|
|
160
|
+
// charlie: { knows: [ 'bob' ] },
|
|
161
|
+
// dori: { knows: [ 'bob' ] }
|
|
159
162
|
// }
|
|
160
163
|
```
|
|
161
164
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/oquery",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.46",
|
|
4
4
|
"description": "Datalog-inspired, optimized pattern/predicate query engine for JS objects & arrays",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,18 +34,18 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.9.
|
|
38
|
-
"@thi.ng/checks": "^3.4.
|
|
39
|
-
"@thi.ng/defmulti": "^2.1.
|
|
40
|
-
"@thi.ng/equiv": "^2.1.
|
|
37
|
+
"@thi.ng/api": "^8.9.5",
|
|
38
|
+
"@thi.ng/checks": "^3.4.5",
|
|
39
|
+
"@thi.ng/defmulti": "^2.1.44",
|
|
40
|
+
"@thi.ng/equiv": "^2.1.30"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@microsoft/api-extractor": "^7.36.4",
|
|
44
|
-
"@thi.ng/testament": "^0.3.
|
|
44
|
+
"@thi.ng/testament": "^0.3.23",
|
|
45
45
|
"rimraf": "^5.0.1",
|
|
46
46
|
"tools": "^0.0.1",
|
|
47
|
-
"typedoc": "^0.
|
|
48
|
-
"typescript": "^5.
|
|
47
|
+
"typedoc": "^0.25.0",
|
|
48
|
+
"typescript": "^5.2.2"
|
|
49
49
|
},
|
|
50
50
|
"keywords": [
|
|
51
51
|
"array",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
],
|
|
92
92
|
"year": 2020
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "5929dd20497668496af13415cdf784a4d6f69aa3\n"
|
|
95
95
|
}
|