@thi.ng/oquery 2.1.24 → 2.1.26

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.
Files changed (4) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +8 -11
  3. package/api.d.ts +14 -14
  4. package/package.json +12 -12
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2022-11-23T22:46:54Z
3
+ - **Last updated**: 2022-12-16T12:52:25Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  <!-- This file is generated - DO NOT EDIT! -->
2
2
 
3
- # ![oquery](https://media.thi.ng/umbrella/banners-20220914/thing-oquery.svg?5410c2aa)
3
+ # ![@thi.ng/oquery](https://media.thi.ng/umbrella/banners-20220914/thing-oquery.svg?5410c2aa)
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@thi.ng/oquery.svg)](https://www.npmjs.com/package/@thi.ng/oquery)
6
6
  ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/oquery.svg)
7
- [![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella)
7
+ [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  This project is part of the
10
10
  [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.
@@ -24,7 +24,7 @@ This project is part of the
24
24
 
25
25
  ## About
26
26
 
27
- Datalog-inspired, optimized pattern/predicate query engine for JS objects & arrays.
27
+ Datalog-inspired, optimized pattern/predicate query engine for JS objects & arrays
28
28
 
29
29
  This package provides a single higher-order function `defQuery()`, which takes a
30
30
  number of options to configure query behavior and returns an actual query
@@ -70,14 +70,11 @@ ES module import:
70
70
 
71
71
  For Node.js REPL:
72
72
 
73
- ```text
74
- # with flag only for < v16
75
- node --experimental-repl-await
76
-
77
- > const oquery = await import("@thi.ng/oquery");
73
+ ```js
74
+ const oquery = await import("@thi.ng/oquery");
78
75
  ```
79
76
 
80
- Package sizes (gzipped, pre-treeshake): ESM: 1.26 KB
77
+ Package sizes (brotli'd, pre-treeshake): ESM: 1.15 KB
81
78
 
82
79
  ## Dependencies
83
80
 
@@ -272,7 +269,7 @@ More query examples in [tests](https://github.com/thi-ng/umbrella/blob/develop/p
272
269
 
273
270
  ## Authors
274
271
 
275
- Karsten Schmidt
272
+ - [Karsten Schmidt](https://thi.ng)
276
273
 
277
274
  If this project contributes to an academic publication, please cite it as:
278
275
 
@@ -287,4 +284,4 @@ If this project contributes to an academic publication, please cite it as:
287
284
 
288
285
  ## License
289
286
 
290
- &copy; 2020 - 2022 Karsten Schmidt // Apache Software License 2.0
287
+ &copy; 2020 - 2022 Karsten Schmidt // Apache License 2.0
package/api.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import type { Fn6, IObjectOf, NumOrString, Predicate, Predicate2 } from "@thi.ng/api";
2
- export declare type FTerm = Predicate<any>;
3
- export declare type OTerm = any | null;
4
- export declare type SPTerm = Predicate<string> | NumOrString | null;
5
- export declare type SPInputTerm = SPTerm | NumOrString[] | Set<NumOrString>;
6
- export declare type QueryObj = IObjectOf<any>;
2
+ export type FTerm = Predicate<any>;
3
+ export type OTerm = any | null;
4
+ export type SPTerm = Predicate<string> | NumOrString | null;
5
+ export type SPInputTerm = SPTerm | NumOrString[] | Set<NumOrString>;
6
+ export type QueryObj = IObjectOf<any>;
7
7
  /**
8
8
  * All 27 possible query types.
9
9
  *
@@ -14,15 +14,15 @@ export declare type QueryObj = IObjectOf<any>;
14
14
  *
15
15
  * @internal
16
16
  */
17
- export declare type QueryType = "lll" | "llf" | "lln" | "lfl" | "lff" | "lfn" | "lnl" | "lnf" | "lnn" | "fll" | "flf" | "fln" | "ffl" | "fff" | "ffn" | "fnl" | "fnf" | "fnn" | "nll" | "nlf" | "nln" | "nfl" | "nff" | "nfn" | "nnl" | "nnf" | "nnn";
17
+ export type QueryType = "lll" | "llf" | "lln" | "lfl" | "lff" | "lfn" | "lnl" | "lnf" | "lnn" | "fll" | "flf" | "fln" | "ffl" | "fff" | "ffn" | "fnl" | "fnf" | "fnn" | "nll" | "nlf" | "nln" | "nfl" | "nff" | "nfn" | "nnl" | "nnf" | "nnn";
18
18
  /**
19
19
  * @internal
20
20
  */
21
- export declare type QueryImpl = Fn6<QueryObj, QueryObj, SPTerm, SPTerm, OTerm, QueryOpts, void>;
21
+ export type QueryImpl = Fn6<QueryObj, QueryObj, SPTerm, SPTerm, OTerm, QueryOpts, void>;
22
22
  /**
23
23
  * @internal
24
24
  */
25
- export declare type QueryImpls = Record<QueryType, QueryImpl>;
25
+ export type QueryImpls = Record<QueryType, QueryImpl>;
26
26
  /**
27
27
  * Takes an object of this structure `{ s1: { p1: o, p2: ... }, s2: { p1: o
28
28
  * }...}`, matches all entries using provided `s`(ubject), `p`(redicate) and
@@ -33,7 +33,7 @@ export declare type QueryImpls = Record<QueryType, QueryImpl>;
33
33
  * If `res` is provided, results will be injected in that object. Otherwise
34
34
  * a new result object will be created.
35
35
  */
36
- export declare type ObjQueryFn<T extends QueryObj> = (obj: T, s: SPInputTerm, p: SPInputTerm, o: OTerm, res?: QueryObj) => QueryObj;
36
+ export type ObjQueryFn<T extends QueryObj> = (obj: T, s: SPInputTerm, p: SPInputTerm, o: OTerm, res?: QueryObj) => QueryObj;
37
37
  /**
38
38
  * Takes a source array of objects with this structure: [{p1: o, p2: ...},
39
39
  * ...]`, and matches each item using provided `p`(redicate) and `o`bject terms.
@@ -43,25 +43,25 @@ export declare type ObjQueryFn<T extends QueryObj> = (obj: T, s: SPInputTerm, p:
43
43
  * If `res` is provided, results will be appended to that array. Otherwise a new
44
44
  * result array will be created.
45
45
  */
46
- export declare type ArrayQueryFn<T extends QueryObj[]> = (src: T, p: SPInputTerm, o: OTerm, res?: QueryObj[]) => QueryObj[];
46
+ export type ArrayQueryFn<T extends QueryObj[]> = (src: T, p: SPInputTerm, o: OTerm, res?: QueryObj[]) => QueryObj[];
47
47
  /**
48
48
  * Similar to {@link ObjQueryFn}, but only collects and returns a set of
49
49
  * matching `s` keys.
50
50
  */
51
- export declare type ObjKeyQueryFn<T extends QueryObj> = (obj: T, s: SPInputTerm, p: SPInputTerm, o: OTerm, res?: Set<string>) => Set<string>;
51
+ export type ObjKeyQueryFn<T extends QueryObj> = (obj: T, s: SPInputTerm, p: SPInputTerm, o: OTerm, res?: Set<string>) => Set<string>;
52
52
  /**
53
53
  * Similar to {@link ArrayQueryFn}, but only collects and returns a set of
54
54
  * indices of matching objects.
55
55
  */
56
- export declare type ArrayKeyQueryFn<T extends QueryObj[]> = (src: T, p: SPInputTerm, o: OTerm, res?: Set<number>) => Set<number>;
56
+ export type ArrayKeyQueryFn<T extends QueryObj[]> = (src: T, p: SPInputTerm, o: OTerm, res?: Set<number>) => Set<number>;
57
57
  /**
58
58
  * Conditional return type for {@link defQuery}.
59
59
  */
60
- export declare type QueryFn<T extends QueryObj | QueryObj[]> = T extends QueryObj[] ? ArrayQueryFn<T> : ObjQueryFn<T>;
60
+ export type QueryFn<T extends QueryObj | QueryObj[]> = T extends QueryObj[] ? ArrayQueryFn<T> : ObjQueryFn<T>;
61
61
  /**
62
62
  * Conditional return type for {@link defKeyQuery}.
63
63
  */
64
- export declare type KeyQueryFn<T extends QueryObj | QueryObj[]> = T extends QueryObj[] ? ArrayKeyQueryFn<T> : ObjKeyQueryFn<T>;
64
+ export type KeyQueryFn<T extends QueryObj | QueryObj[]> = T extends QueryObj[] ? ArrayKeyQueryFn<T> : ObjKeyQueryFn<T>;
65
65
  /**
66
66
  * Query behavior options.
67
67
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/oquery",
3
- "version": "2.1.24",
3
+ "version": "2.1.26",
4
4
  "description": "Datalog-inspired, optimized pattern/predicate query engine for JS objects & arrays",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -10,7 +10,7 @@
10
10
  "type": "git",
11
11
  "url": "https://github.com/thi-ng/umbrella.git"
12
12
  },
13
- "homepage": "https://github.com/thi-ng/umbrella/tree/master/packages/oquery#readme",
13
+ "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/oquery#readme",
14
14
  "funding": [
15
15
  {
16
16
  "type": "github",
@@ -21,7 +21,7 @@
21
21
  "url": "https://patreon.com/thing_umbrella"
22
22
  }
23
23
  ],
24
- "author": "Karsten Schmidt <k+npm@thi.ng>",
24
+ "author": "Karsten Schmidt (https://thi.ng)",
25
25
  "license": "Apache-2.0",
26
26
  "scripts": {
27
27
  "build": "yarn clean && tsc --declaration",
@@ -34,18 +34,18 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/api": "^8.5.0",
38
- "@thi.ng/checks": "^3.3.3",
39
- "@thi.ng/defmulti": "^2.1.22",
40
- "@thi.ng/equiv": "^2.1.13"
37
+ "@thi.ng/api": "^8.6.0",
38
+ "@thi.ng/checks": "^3.3.5",
39
+ "@thi.ng/defmulti": "^2.1.24",
40
+ "@thi.ng/equiv": "^2.1.15"
41
41
  },
42
42
  "devDependencies": {
43
- "@microsoft/api-extractor": "^7.33.5",
44
- "@thi.ng/testament": "^0.3.5",
43
+ "@microsoft/api-extractor": "^7.33.7",
44
+ "@thi.ng/testament": "^0.3.7",
45
45
  "rimraf": "^3.0.2",
46
46
  "tools": "^0.0.1",
47
- "typedoc": "^0.23.20",
48
- "typescript": "^4.8.4"
47
+ "typedoc": "^0.23.22",
48
+ "typescript": "^4.9.4"
49
49
  },
50
50
  "keywords": [
51
51
  "array",
@@ -91,5 +91,5 @@
91
91
  ],
92
92
  "year": 2020
93
93
  },
94
- "gitHead": "75ec32ff7f1b7b5e72e7a04ace24732cd5d6c774\n"
94
+ "gitHead": "f445a9cc8022bcdebbf6ff91fd66ced016d72f01\n"
95
95
  }