@thi.ng/transducers 9.2.2 → 9.2.4

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**: 2024-09-05T12:23:14Z
3
+ - **Last updated**: 2024-09-19T21:09:34Z
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
@@ -167,7 +167,7 @@ Note: @thi.ng/api is in _most_ cases a type-only import (not used at runtime)
167
167
 
168
168
  ## Usage examples
169
169
 
170
- 72 projects in this repo's
170
+ 73 projects in this repo's
171
171
  [/examples](https://github.com/thi-ng/umbrella/tree/develop/examples)
172
172
  directory are using this package:
173
173
 
@@ -179,6 +179,7 @@ directory are using this package:
179
179
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/bitmap-font.gif" width="240"/> | Figlet-style bitmap font creation with transducers | [Demo](https://demo.thi.ng/umbrella/bitmap-font/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/bitmap-font) |
180
180
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/canvas-recorder.png" width="240"/> | Self-modifying, animated typographic grid with emergent complex patterns | [Demo](https://demo.thi.ng/umbrella/canvas-recorder/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/canvas-recorder) |
181
181
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/cellular-automata.png" width="240"/> | 2D transducer based cellular automata | [Demo](https://demo.thi.ng/umbrella/cellular-automata/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/cellular-automata) |
182
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/color-contrast.avif" width="240"/> | Tool to interactively compute & visualize color contrasts against WCAG threshold | [Demo](https://demo.thi.ng/umbrella/color-contrast/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/color-contrast) |
182
183
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/commit-heatmap.png" width="240"/> | Heatmap visualization of this mono-repo's commits | | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/commit-heatmap) |
183
184
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/commit-table-ssr.png" width="240"/> | Filterable commit log UI w/ minimal server to provide commit history | [Demo](https://demo.thi.ng/umbrella/commit-table-ssr/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/commit-table-ssr) |
184
185
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/crypto-chart.png" width="240"/> | Basic crypto-currency candle chart with multiple moving averages plots | [Demo](https://demo.thi.ng/umbrella/crypto-chart/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/crypto-chart) |
package/as-iterable.d.ts CHANGED
@@ -4,5 +4,5 @@
4
4
  *
5
5
  * @param src -
6
6
  */
7
- export declare function asIterable<T>(src: Iterable<T>): Generator<T, void, undefined>;
7
+ export declare function asIterable<T>(src: Iterable<T>): Generator<T, void, any>;
8
8
  //# sourceMappingURL=as-iterable.d.ts.map
package/cycle.d.ts CHANGED
@@ -26,5 +26,5 @@
26
26
  * @param input -
27
27
  * @param num -
28
28
  */
29
- export declare function cycle<T>(input: Iterable<T>, num?: number): Generator<T, void, undefined>;
29
+ export declare function cycle<T>(input: Iterable<T>, num?: number): Generator<T, void, unknown>;
30
30
  //# sourceMappingURL=cycle.d.ts.map
package/interpolate.d.ts CHANGED
@@ -2,9 +2,10 @@ import type { Fn2 } from "@thi.ng/api";
2
2
  import type { Transducer } from "./api.js";
3
3
  /**
4
4
  * Higher order interpolation transducer. The resulting transducer forms a
5
- * sliding window and calls `fn` (the given interpolation function) `n` times
6
- * with the current window and a normalized time value to produce the requested
7
- * number of interpolated values per interval.
5
+ * sliding window of input values and calls `fn` (the given interpolation
6
+ * function) `n` times for the current window and a normalized time value to
7
+ * produce the requested number of interpolated values per interval. Yields a
8
+ * sequence of interpolated values.
8
9
  *
9
10
  * @remarks
10
11
  * If the optional `src` iterable is given, `interpolate` returns an iterator of
@@ -25,9 +26,13 @@ import type { Transducer } from "./api.js";
25
26
  * import { interpolate } from "@thi.ng/transducers";
26
27
  *
27
28
  * const res = [...interpolate(
29
+ * // interpolation function
28
30
  * ([a, b], t) => a + (b - a) * t,
31
+ * // window size
29
32
  * 2,
33
+ * // num samples per window
30
34
  * 8,
35
+ * // input values
31
36
  * [0, 1, 0, 2]
32
37
  * )];
33
38
  *
package/norm-range.d.ts CHANGED
@@ -42,7 +42,7 @@ export declare function normRange(n: number, includeLast?: boolean, reverse?: bo
42
42
  * @param includeLastX -
43
43
  * @param includeLastY -
44
44
  */
45
- export declare function normRange2d(nx: number, ny: number, includeLastX?: boolean, includeLastY?: boolean): Generator<number[], void, undefined>;
45
+ export declare function normRange2d(nx: number, ny: number, includeLastX?: boolean, includeLastY?: boolean): Generator<number[], void, any>;
46
46
  /**
47
47
  * 3D version of {@link normRange} in Z-major order (i.e. X being innermost
48
48
  * loop).
@@ -52,5 +52,5 @@ export declare function normRange2d(nx: number, ny: number, includeLastX?: boole
52
52
  * @param includeLastX -
53
53
  * @param includeLastY -
54
54
  */
55
- export declare function normRange3d(nx: number, ny: number, nz: number, includeLastX?: boolean, includeLastY?: boolean, includeLastZ?: boolean): Generator<number[], void, undefined>;
55
+ export declare function normRange3d(nx: number, ny: number, nz: number, includeLastX?: boolean, includeLastY?: boolean, includeLastZ?: boolean): Generator<number[], void, any>;
56
56
  //# sourceMappingURL=norm-range.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/transducers",
3
- "version": "9.2.2",
3
+ "version": "9.2.4",
4
4
  "description": "Collection of ~170 lightweight, composable transducers, reducers, generators, iterators for functional data transformations",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -40,20 +40,20 @@
40
40
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
41
41
  },
42
42
  "dependencies": {
43
- "@thi.ng/api": "^8.11.9",
44
- "@thi.ng/arrays": "^2.10.0",
45
- "@thi.ng/checks": "^3.6.11",
46
- "@thi.ng/compare": "^2.4.1",
47
- "@thi.ng/compose": "^3.0.12",
48
- "@thi.ng/errors": "^2.5.15",
49
- "@thi.ng/math": "^5.11.9",
50
- "@thi.ng/random": "^4.0.3"
43
+ "@thi.ng/api": "^8.11.10",
44
+ "@thi.ng/arrays": "^2.10.1",
45
+ "@thi.ng/checks": "^3.6.12",
46
+ "@thi.ng/compare": "^2.4.2",
47
+ "@thi.ng/compose": "^3.0.13",
48
+ "@thi.ng/errors": "^2.5.16",
49
+ "@thi.ng/math": "^5.11.10",
50
+ "@thi.ng/random": "^4.0.4"
51
51
  },
52
52
  "devDependencies": {
53
- "@microsoft/api-extractor": "^7.47.5",
54
- "esbuild": "^0.23.0",
55
- "typedoc": "^0.26.5",
56
- "typescript": "^5.5.4"
53
+ "@microsoft/api-extractor": "^7.47.9",
54
+ "esbuild": "^0.23.1",
55
+ "typedoc": "^0.26.7",
56
+ "typescript": "^5.6.2"
57
57
  },
58
58
  "keywords": [
59
59
  "1d",
@@ -599,5 +599,5 @@
599
599
  ],
600
600
  "year": 2016
601
601
  },
602
- "gitHead": "9f71f7f82fed2a980078a96bdafd2e706f526c75\n"
602
+ "gitHead": "b52baa3750ddd1256892df966ab7ac9b4806a9ef\n"
603
603
  }
package/sorted-keys.d.ts CHANGED
@@ -8,5 +8,5 @@ import type { Comparator } from "@thi.ng/api";
8
8
  * @param x -
9
9
  * @param cmp -
10
10
  */
11
- export declare function sortedKeys(x: any, cmp?: Comparator<string>): Generator<string, void, undefined>;
11
+ export declare function sortedKeys(x: any, cmp?: Comparator<string>): Generator<string, void, unknown>;
12
12
  //# sourceMappingURL=sorted-keys.d.ts.map