@thi.ng/transducers 9.2.16 → 9.2.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 +1 -1
- package/README.md +1 -1
- package/choices.d.ts +1 -1
- package/curve.d.ts +2 -2
- package/filter-fuzzy.d.ts +2 -2
- package/interpolate-hermite.d.ts +1 -0
- package/interpolate-linear.d.ts +1 -0
- package/interpolate.d.ts +1 -0
- package/keys.d.ts +1 -0
- package/line.d.ts +1 -1
- package/multiplex.d.ts +1 -1
- package/package.json +13 -14
- package/pairs.d.ts +2 -0
- package/partition-time.d.ts +2 -1
- package/peek.d.ts +1 -1
- package/push-sort.d.ts +1 -1
- package/sorted-keys.d.ts +2 -2
- package/stream-shuffle.d.ts +1 -1
- package/swizzle.d.ts +1 -1
- package/sync-tuples.d.ts +1 -0
- package/throttle-time.d.ts +2 -1
- package/tween.d.ts +1 -1
- package/vals.d.ts +1 -0
- package/wrap-sides.d.ts +1 -0
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 201 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
package/choices.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { IRandom } from "@thi.ng/random";
|
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
8
|
* Internally uses
|
|
9
|
-
* [`weightedRandom
|
|
9
|
+
* [`weightedRandom`](https://docs.thi.ng/umbrella/random/functions/weightedRandom.html).
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```ts tangle:../export/choices.ts
|
package/curve.d.ts
CHANGED
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
* the `num+1`th step.
|
|
9
9
|
*
|
|
10
10
|
* The curvature can be controlled via the logarithmic `rate` param. Recommended
|
|
11
|
-
* range [0.0001
|
|
11
|
+
* range `[0.0001,10000]` (curved -> linear). Default: 0.1
|
|
12
12
|
*
|
|
13
13
|
* Similar functionality (w/ more options) is availble here:
|
|
14
|
-
* [`curve
|
|
14
|
+
* [`curve`](https://docs.thi.ng/umbrella/dsp/functions/curve.html).
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* ```ts tangle:../export/curve.ts
|
package/filter-fuzzy.d.ts
CHANGED
|
@@ -12,14 +12,14 @@ export interface FilterFuzzyOpts<A, B> {
|
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Returns transducer which calls
|
|
15
|
-
* [`fuzzyMatch
|
|
15
|
+
* [`fuzzyMatch`](https://docs.thi.ng/umbrella/arrays/functions/fuzzyMatch.html)
|
|
16
16
|
* for each value and discards all non-matching values.
|
|
17
17
|
*
|
|
18
18
|
* @remarks
|
|
19
19
|
* The `key` option function can be used to extract/produce the actual value
|
|
20
20
|
* used for the search. The `equiv` option predicate can be used to customize
|
|
21
21
|
* item equality checking. Uses
|
|
22
|
-
* [`equiv
|
|
22
|
+
* [`equiv`](https://docs.thi.ng/umbrella/equiv/functions/equiv.html) by
|
|
23
23
|
* default.
|
|
24
24
|
*
|
|
25
25
|
* @example
|
package/interpolate-hermite.d.ts
CHANGED
package/interpolate-linear.d.ts
CHANGED
package/interpolate.d.ts
CHANGED
package/keys.d.ts
CHANGED
package/line.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* iteration).
|
|
9
9
|
*
|
|
10
10
|
* Similar functionality (w/ more options) is availble here:
|
|
11
|
-
* [`line
|
|
11
|
+
* [`line`](https://docs.thi.ng/umbrella/dsp/functions/line.html).
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* ```ts tangle:../export/line.ts
|
package/multiplex.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MultiplexTxLike, Transducer } from "./api.js";
|
|
2
2
|
/**
|
|
3
3
|
* Yields a new transducer which applies given transducers in parallel (using
|
|
4
|
-
* [`juxt
|
|
4
|
+
* [`juxt`](https://docs.thi.ng/umbrella/compose/functions/juxt.html) &
|
|
5
5
|
* {@link step}) and produces tuples of results.
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/transducers",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.18",
|
|
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",
|
|
@@ -37,26 +37,25 @@
|
|
|
37
37
|
"build:esbuild": "esbuild --format=esm --platform=neutral --target=es2022 --tsconfig=tsconfig.json --outdir=. src/**/*.ts",
|
|
38
38
|
"clean": "bun ../../tools/src/clean-package.ts",
|
|
39
39
|
"doc": "typedoc --options ../../typedoc.json --out doc src/index.ts",
|
|
40
|
-
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
|
|
41
40
|
"doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
|
|
42
41
|
"pub": "yarn npm publish --access public",
|
|
43
42
|
"test": "bun test",
|
|
44
43
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
45
44
|
},
|
|
46
45
|
"dependencies": {
|
|
47
|
-
"@thi.ng/api": "^8.11.
|
|
48
|
-
"@thi.ng/arrays": "^2.10.
|
|
49
|
-
"@thi.ng/checks": "^3.6.
|
|
50
|
-
"@thi.ng/compare": "^2.4.
|
|
51
|
-
"@thi.ng/compose": "^3.0.
|
|
52
|
-
"@thi.ng/errors": "^2.5.
|
|
53
|
-
"@thi.ng/math": "^5.11.
|
|
54
|
-
"@thi.ng/random": "^4.1.
|
|
55
|
-
"@thi.ng/timestamp": "^1.1.
|
|
46
|
+
"@thi.ng/api": "^8.11.20",
|
|
47
|
+
"@thi.ng/arrays": "^2.10.15",
|
|
48
|
+
"@thi.ng/checks": "^3.6.23",
|
|
49
|
+
"@thi.ng/compare": "^2.4.12",
|
|
50
|
+
"@thi.ng/compose": "^3.0.23",
|
|
51
|
+
"@thi.ng/errors": "^2.5.26",
|
|
52
|
+
"@thi.ng/math": "^5.11.20",
|
|
53
|
+
"@thi.ng/random": "^4.1.11",
|
|
54
|
+
"@thi.ng/timestamp": "^1.1.5"
|
|
56
55
|
},
|
|
57
56
|
"devDependencies": {
|
|
58
|
-
"esbuild": "^0.
|
|
59
|
-
"typedoc": "^0.27.
|
|
57
|
+
"esbuild": "^0.25.0",
|
|
58
|
+
"typedoc": "^0.27.7",
|
|
60
59
|
"typescript": "^5.7.3"
|
|
61
60
|
},
|
|
62
61
|
"keywords": [
|
|
@@ -604,5 +603,5 @@
|
|
|
604
603
|
],
|
|
605
604
|
"year": 2016
|
|
606
605
|
},
|
|
607
|
-
"gitHead": "
|
|
606
|
+
"gitHead": "9a0b33253fef092aaf301decf6ecd54317874d4c\n"
|
|
608
607
|
}
|
package/pairs.d.ts
CHANGED
package/partition-time.d.ts
CHANGED
|
@@ -7,7 +7,8 @@ import type { Transducer } from "./api.js";
|
|
|
7
7
|
* @remarks
|
|
8
8
|
* Only to be used in async contexts, NOT with {@link transduce} directly.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* See also:
|
|
11
|
+
*
|
|
11
12
|
* - [`thi.ng/transducers-async`](https://thi.ng/transducers-async).
|
|
12
13
|
* - [`thi.ng/rstream`](https://thi.ng/rstream)
|
|
13
14
|
*
|
package/peek.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Transducer } from "./api.js";
|
|
2
2
|
/**
|
|
3
3
|
* Transducer version of
|
|
4
|
-
* [`peek
|
|
4
|
+
* [`peek`](https://docs.thi.ng/umbrella/arrays/functions/peek.html), i.e.
|
|
5
5
|
* extracts the last item of an array.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
package/push-sort.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { Reducer } from "./api.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* Similar to {@link push}, but sorts result array upon completion using
|
|
5
5
|
* optionally given comparator (default
|
|
6
|
-
* [`compare
|
|
6
|
+
* [`compare`](https://docs.thi.ng/umbrella/compare/functions/compare.html)).
|
|
7
7
|
*
|
|
8
8
|
* @param cmp -
|
|
9
9
|
*/
|
package/sorted-keys.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import type { Comparator } from "@thi.ng/api";
|
|
|
2
2
|
/**
|
|
3
3
|
* Syntax sugar for `Object.keys(x).sort()` with support for custom comparator
|
|
4
4
|
* (default:
|
|
5
|
-
* [`compare
|
|
6
|
-
*
|
|
5
|
+
* [`compare`](https://docs.thi.ng/umbrella/compare/functions/compare.html)) and
|
|
6
|
+
* yielding iterator of sorted keys.
|
|
7
7
|
*
|
|
8
8
|
* @param x -
|
|
9
9
|
* @param cmp -
|
package/stream-shuffle.d.ts
CHANGED
package/swizzle.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ import type { Transducer } from "./api.js";
|
|
|
25
25
|
*
|
|
26
26
|
* @remarks
|
|
27
27
|
* Also see
|
|
28
|
-
* [`swizzle
|
|
28
|
+
* [`swizzle`](https://docs.thi.ng/umbrella/arrays/functions/swizzle.html)
|
|
29
29
|
*
|
|
30
30
|
* @param order - key order
|
|
31
31
|
*/
|
package/sync-tuples.d.ts
CHANGED
package/throttle-time.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ import type { Transducer } from "./api.js";
|
|
|
6
6
|
* @remarks
|
|
7
7
|
* Only to be used in async contexts and NOT with {@link transduce} directly.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* See also:
|
|
10
|
+
*
|
|
10
11
|
* - [`thi.ng/rstream`](https://thi.ng/rstream)
|
|
11
12
|
* - [`thi.ng/csp`](https://thi.ng/csp).
|
|
12
13
|
*
|
package/tween.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export interface TweenOpts<A, B, C> {
|
|
|
48
48
|
*
|
|
49
49
|
* Depending on the overall `num`ber of samples requested and the distance
|
|
50
50
|
* between keyframes, some keyframes MIGHT be skipped. E.g. if requesting 10
|
|
51
|
-
* samples within [0,1]
|
|
51
|
+
* samples within `[0,1]`, the interval between two successive keyframes at 0.12
|
|
52
52
|
* and 0.19 would be skipped entirely, since samples will only be taken at
|
|
53
53
|
* multiples of `1/num` (i.e. 0.0, 0.1, 0.2... in this example).
|
|
54
54
|
*
|
package/vals.d.ts
CHANGED