@thi.ng/resolve-map 7.1.16 → 7.1.18

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2022-11-30T22:27:38Z
3
+ - **Last updated**: 2022-12-20T16:33:11Z
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
- # ![resolve-map](https://media.thi.ng/umbrella/banners-20220914/thing-resolve-map.svg?8522d906)
3
+ # ![@thi.ng/resolve-map](https://media.thi.ng/umbrella/banners-20220914/thing-resolve-map.svg?8522d906)
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@thi.ng/resolve-map.svg)](https://www.npmjs.com/package/@thi.ng/resolve-map)
6
6
  ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/resolve-map.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.
@@ -25,7 +25,7 @@ This project is part of the
25
25
 
26
26
  ## About
27
27
 
28
- DAG resolution of vanilla objects & arrays with internally linked values.
28
+ DAG resolution of vanilla objects & arrays with internally linked values
29
29
 
30
30
  This is useful for expressing complex configurations with
31
31
  derived values or computing interrelated values without having to
@@ -69,11 +69,8 @@ ES module import:
69
69
 
70
70
  For Node.js REPL:
71
71
 
72
- ```text
73
- # with flag only for < v16
74
- node --experimental-repl-await
75
-
76
- > const resolveMap = await import("@thi.ng/resolve-map");
72
+ ```js
73
+ const resolveMap = await import("@thi.ng/resolve-map");
77
74
  ```
78
75
 
79
76
  Package sizes (brotli'd, pre-treeshake): ESM: 1.01 KB
@@ -336,7 +333,7 @@ resolve({ a: "@c", b: ({a}) => a, c: 42 }, { onlyFnRefs: true })
336
333
 
337
334
  ## Authors
338
335
 
339
- Karsten Schmidt
336
+ - [Karsten Schmidt](https://thi.ng)
340
337
 
341
338
  If this project contributes to an academic publication, please cite it as:
342
339
 
@@ -351,4 +348,4 @@ If this project contributes to an academic publication, please cite it as:
351
348
 
352
349
  ## License
353
350
 
354
- &copy; 2018 - 2022 Karsten Schmidt // Apache Software License 2.0
351
+ &copy; 2018 - 2022 Karsten Schmidt // Apache License 2.0
package/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import type { Fn, IDeref, NumOrString } from "@thi.ng/api";
2
- export declare type Unresolved<T> = {
2
+ export type Unresolved<T> = {
3
3
  [K in keyof T]: Unresolved<T[K]> | Resolved<T[K]> | Fn<T, T[K]> | Fn<ResolveFn, T[K]> | Function | string;
4
4
  };
5
- export declare type ResolveFn = (path: string) => any;
6
- export declare type LookupPath = NumOrString[];
5
+ export type ResolveFn = (path: string) => any;
6
+ export type LookupPath = NumOrString[];
7
7
  export interface ResolveOpts {
8
8
  /**
9
9
  * Prefix for auto-recognizing & interpreting embedded string values as
@@ -141,8 +141,9 @@ export declare class Resolved<T> implements IDeref<T> {
141
141
  /**
142
142
  * Factory function for {@link Resolved} to wrap & protect values from further
143
143
  * resolution attempts. The wrapped value can be later obtained via the standard
144
- * {@link @thi.ng/api#IDeref} interface/mechanism. In lookup functions, the
145
- * unwrapped value will be supplied, no `.deref()` necessary there.
144
+ * [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html)
145
+ * interface/mechanism. In lookup functions, the unwrapped value will be
146
+ * supplied, no `.deref()` necessary there.
146
147
  *
147
148
  * @param val
148
149
  */
package/index.js CHANGED
@@ -224,16 +224,18 @@ export class Resolved {
224
224
  /**
225
225
  * Factory function for {@link Resolved} to wrap & protect values from further
226
226
  * resolution attempts. The wrapped value can be later obtained via the standard
227
- * {@link @thi.ng/api#IDeref} interface/mechanism. In lookup functions, the
228
- * unwrapped value will be supplied, no `.deref()` necessary there.
227
+ * [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html)
228
+ * interface/mechanism. In lookup functions, the unwrapped value will be
229
+ * supplied, no `.deref()` necessary there.
229
230
  *
230
231
  * @param val
231
232
  */
232
233
  export const resolved = (val) => new Resolved(val);
233
234
  /**
234
- * Special version of {@link @thi.ng/paths#getInUnsafe} with extra support for
235
- * intermediate wrapped {@link Resolved} values and returning tuple of:
236
- * `[val,isResolved]`.
235
+ * Special version of
236
+ * [`getInUnsafe()`](https://docs.thi.ng/umbrella/paths/functions/getInUnsafe.html)
237
+ * with extra support for intermediate wrapped {@link Resolved} values and
238
+ * returning tuple of: `[val,isResolved]`.
237
239
  *
238
240
  * @param obj
239
241
  * @param path
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/resolve-map",
3
- "version": "7.1.16",
3
+ "version": "7.1.18",
4
4
  "description": "DAG resolution of vanilla objects & arrays with internally linked values",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -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.1",
38
- "@thi.ng/checks": "^3.3.4",
39
- "@thi.ng/errors": "^2.2.5",
40
- "@thi.ng/paths": "^5.1.24"
37
+ "@thi.ng/api": "^8.6.1",
38
+ "@thi.ng/checks": "^3.3.5",
39
+ "@thi.ng/errors": "^2.2.6",
40
+ "@thi.ng/paths": "^5.1.26"
41
41
  },
42
42
  "devDependencies": {
43
- "@microsoft/api-extractor": "^7.33.5",
44
- "@thi.ng/testament": "^0.3.6",
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
  "configuration",
@@ -76,5 +76,5 @@
76
76
  ],
77
77
  "year": 2018
78
78
  },
79
- "gitHead": "1fe40da507070653f420156d91e6b27cf682004f\n"
79
+ "gitHead": "7b2af448da8a63fb21704a79cc4cdf1f3d7d7a64\n"
80
80
  }