@thi.ng/transducers 8.3.26 → 8.3.28

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 (57) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +1 -1
  3. package/cat.d.ts +9 -9
  4. package/cat.js +9 -9
  5. package/choices.d.ts +4 -4
  6. package/choices.js +4 -4
  7. package/conj.d.ts +1 -1
  8. package/converge.d.ts +9 -9
  9. package/curve.d.ts +8 -8
  10. package/curve.js +8 -8
  11. package/deep-transform.d.ts +8 -9
  12. package/deep-transform.js +8 -9
  13. package/delayed.d.ts +3 -4
  14. package/delayed.js +3 -4
  15. package/fill.d.ts +4 -5
  16. package/filter-fuzzy.d.ts +8 -6
  17. package/group-binary.d.ts +13 -15
  18. package/group-binary.js +13 -15
  19. package/interpolate-hermite.d.ts +9 -9
  20. package/interpolate-linear.d.ts +4 -4
  21. package/interpolate.d.ts +12 -12
  22. package/line.d.ts +6 -6
  23. package/line.js +6 -6
  24. package/map-indexed.d.ts +2 -2
  25. package/map-nth.d.ts +4 -5
  26. package/map-vals.d.ts +7 -7
  27. package/mapcat-indexed.d.ts +3 -3
  28. package/mapcat.d.ts +4 -4
  29. package/match-first.d.ts +1 -1
  30. package/moving-average.d.ts +6 -7
  31. package/moving-median.d.ts +4 -4
  32. package/multiplex-obj.d.ts +1 -1
  33. package/multiplex.d.ts +5 -5
  34. package/noop.d.ts +3 -3
  35. package/noop.js +3 -3
  36. package/package.json +11 -11
  37. package/page.d.ts +4 -5
  38. package/pairs.d.ts +3 -3
  39. package/pairs.js +3 -3
  40. package/partition-sort.d.ts +2 -2
  41. package/partition-time.d.ts +6 -7
  42. package/peek.d.ts +3 -2
  43. package/push-sort.d.ts +3 -3
  44. package/range.d.ts +3 -3
  45. package/range.js +3 -3
  46. package/sample.d.ts +1 -1
  47. package/scan.d.ts +1 -1
  48. package/select-keys.d.ts +4 -4
  49. package/some.d.ts +3 -3
  50. package/sorted-keys.d.ts +4 -3
  51. package/sorted-keys.js +4 -3
  52. package/stream-sort.d.ts +3 -3
  53. package/swizzle.d.ts +5 -4
  54. package/throttle-time.d.ts +5 -6
  55. package/throttle.d.ts +9 -9
  56. package/tween.d.ts +24 -26
  57. package/tween.js +24 -26
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2022-12-16T12:52:25Z
3
+ - **Last updated**: 2022-12-22T21:47:08Z
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
@@ -59,7 +59,7 @@ This project is part of the
59
59
 
60
60
  ## About
61
61
 
62
- Lightweight transducer implementations for ES6 / TypeScript
62
+ Lightweight transducer implementations for ES6 / TypeScript.
63
63
 
64
64
  This library provides altogether ~130 transducers, reducers, sequence
65
65
  generators (ES6 generators/iterators) and additional supporting
package/cat.d.ts CHANGED
@@ -1,20 +1,20 @@
1
1
  import type { Nullable } from "@thi.ng/api";
2
2
  import type { Transducer } from "./api.js";
3
3
  /**
4
- * Transducer to concatenate iterable values. Iterates over each input
5
- * and emits individual values down stream, therefore removing one level
6
- * of nesting from the input.
4
+ * Transducer to concatenate iterable values. Iterates over each input and emits
5
+ * individual values down stream, therefore removing one level of nesting from
6
+ * the input.
7
7
  *
8
8
  * @remarks
9
- * If, during processing, the transducer is given a wrapped reduced
10
- * input iterable, it will still be processed as normal, but then
11
- * immediately triggers early termination by wrapping its own result in
12
- * {@link reduced}. E.g. this behavior allows a {@link (mapcat:1)} user
13
- * functions to benefit from reduced results.
9
+ * If, during processing, the transducer is given a wrapped reduced input
10
+ * iterable, it will still be processed as normal, but then immediately triggers
11
+ * early termination by wrapping its own result in {@link reduced}. E.g. this
12
+ * behavior allows a {@link mapcat} user functions to benefit from reduced
13
+ * results.
14
14
  *
15
15
  * Also see:
16
16
  * - {@link concat}
17
- * - {@link (mapcat:1)}
17
+ * - {@link mapcat}
18
18
  *
19
19
  * @example
20
20
  * ```ts
package/cat.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import { compR } from "./compr.js";
2
2
  import { ensureReduced, isReduced, unreduced } from "./reduced.js";
3
3
  /**
4
- * Transducer to concatenate iterable values. Iterates over each input
5
- * and emits individual values down stream, therefore removing one level
6
- * of nesting from the input.
4
+ * Transducer to concatenate iterable values. Iterates over each input and emits
5
+ * individual values down stream, therefore removing one level of nesting from
6
+ * the input.
7
7
  *
8
8
  * @remarks
9
- * If, during processing, the transducer is given a wrapped reduced
10
- * input iterable, it will still be processed as normal, but then
11
- * immediately triggers early termination by wrapping its own result in
12
- * {@link reduced}. E.g. this behavior allows a {@link (mapcat:1)} user
13
- * functions to benefit from reduced results.
9
+ * If, during processing, the transducer is given a wrapped reduced input
10
+ * iterable, it will still be processed as normal, but then immediately triggers
11
+ * early termination by wrapping its own result in {@link reduced}. E.g. this
12
+ * behavior allows a {@link mapcat} user functions to benefit from reduced
13
+ * results.
14
14
  *
15
15
  * Also see:
16
16
  * - {@link concat}
17
- * - {@link (mapcat:1)}
17
+ * - {@link mapcat}
18
18
  *
19
19
  * @example
20
20
  * ```ts
package/choices.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import type { IRandom } from "@thi.ng/random";
2
2
  /**
3
- * Returns an infinite iterator of random choices and their (optional)
4
- * weights. If `weights` is given, it must have at least the same size
5
- * as `choices`. If omitted, each choice will have same probability.
3
+ * Returns an infinite iterator of random choices and their (optional) weights.
4
+ * If `weights` is given, it must have at least the same size as `choices`. If
5
+ * omitted, each choice will have same probability.
6
6
  *
7
7
  * @example
8
8
  * ```ts
@@ -10,7 +10,7 @@ import type { IRandom } from "@thi.ng/random";
10
10
  * // Map { 'c' => 132, 'a' => 545, 'b' => 251, 'd' => 72 }
11
11
  * ```
12
12
  *
13
- * {@link @thi.ng/random#weightedRandom}
13
+ * [`weightedRandom()`](https://docs.thi.ng/umbrella/random/functions/weightedRandom.html)
14
14
  *
15
15
  * @param choices -
16
16
  * @param weights -
package/choices.js CHANGED
@@ -3,9 +3,9 @@ import { SYSTEM } from "@thi.ng/random/system";
3
3
  import { weightedRandom } from "@thi.ng/random/weighted-random";
4
4
  import { repeatedly } from "./repeatedly.js";
5
5
  /**
6
- * Returns an infinite iterator of random choices and their (optional)
7
- * weights. If `weights` is given, it must have at least the same size
8
- * as `choices`. If omitted, each choice will have same probability.
6
+ * Returns an infinite iterator of random choices and their (optional) weights.
7
+ * If `weights` is given, it must have at least the same size as `choices`. If
8
+ * omitted, each choice will have same probability.
9
9
  *
10
10
  * @example
11
11
  * ```ts
@@ -13,7 +13,7 @@ import { repeatedly } from "./repeatedly.js";
13
13
  * // Map { 'c' => 132, 'a' => 545, 'b' => 251, 'd' => 72 }
14
14
  * ```
15
15
  *
16
- * {@link @thi.ng/random#weightedRandom}
16
+ * [`weightedRandom()`](https://docs.thi.ng/umbrella/random/functions/weightedRandom.html)
17
17
  *
18
18
  * @param choices -
19
19
  * @param weights -
package/conj.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Reducer } from "./api.js";
2
2
  /**
3
- * Reducer. Like {@link (push:1)}, but for ES6 Sets.
3
+ * Reducer. Like {@link push}, but for ES6 Sets.
4
4
  */
5
5
  export declare function conj<T>(): Reducer<Set<T>, T>;
6
6
  export declare function conj<T>(xs: Iterable<T>): Set<T>;
package/converge.d.ts CHANGED
@@ -1,18 +1,18 @@
1
1
  import type { Predicate2 } from "@thi.ng/api";
2
2
  import type { Transducer } from "./api.js";
3
3
  /**
4
- * Transducer which for each input `x` (apart from the very first one)
5
- * applies given predicate `pred` to previous input and `x`. Only passes
6
- * values downstream as long as the predicate returns a falsy result.
7
- * Once the result is truthy, `x` is considered converged and the
8
- * transformation is terminated (by emitting a {@link reduced} value).
4
+ * Transducer which for each input `x` (apart from the very first one) applies
5
+ * given predicate `pred` to previous input and `x`. Only passes values
6
+ * downstream as long as the predicate returns a falsy result. Once the result
7
+ * is truthy, `x` is considered converged and the transformation is terminated
8
+ * (by emitting a {@link reduced} value).
9
9
  *
10
10
  * @remarks
11
- * This can be used to limit processing of inputs only as long as
12
- * there're noticeable changes (according to the predicate) and then
13
- * stop the transducer pipeline once results have converged.
11
+ * This can be used to limit processing of inputs only as long as there're
12
+ * noticeable changes (according to the predicate) and then stop the transducer
13
+ * pipeline once results have converged.
14
14
  *
15
- * See also: {@link (takeWhile:1)}
15
+ * See also: {@link takeWhile}
16
16
  *
17
17
  * @example
18
18
  * ```ts
package/curve.d.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  /**
2
- * Iterator producing an exponential curve (with adjustable curvature)
3
- * between `start` and `end` values over `num` steps. This is the
4
- * exponential equivalent of {@link line}.
2
+ * Iterator producing an exponential curve (with adjustable curvature) between
3
+ * `start` and `end` values over `num` steps. This is the exponential equivalent
4
+ * of {@link line}.
5
5
  *
6
6
  * @remarks
7
- * Since `start` is the first value emitted, the `end` value is only
8
- * reached in the `num+1`th step.
7
+ * Since `start` is the first value emitted, the `end` value is only reached in
8
+ * the `num+1`th step.
9
9
  *
10
- * The curvature can be controlled via the logarithmic `rate` param.
11
- * Recommended range [0.0001 - 10000] (curved -> linear). Default: 0.1
10
+ * The curvature can be controlled via the logarithmic `rate` param. Recommended
11
+ * range [0.0001 - 10000] (curved -> linear). Default: 0.1
12
12
  *
13
13
  * Similar functionality (w/ more options) is availble here:
14
- * {@link @thi.ng/dsp#curve}.
14
+ * [`curve()`](https://docs.thi.ng/umbrella/dsp/functions/curve.html).
15
15
  *
16
16
  * @example
17
17
  * ```ts
package/curve.js CHANGED
@@ -1,17 +1,17 @@
1
1
  /**
2
- * Iterator producing an exponential curve (with adjustable curvature)
3
- * between `start` and `end` values over `num` steps. This is the
4
- * exponential equivalent of {@link line}.
2
+ * Iterator producing an exponential curve (with adjustable curvature) between
3
+ * `start` and `end` values over `num` steps. This is the exponential equivalent
4
+ * of {@link line}.
5
5
  *
6
6
  * @remarks
7
- * Since `start` is the first value emitted, the `end` value is only
8
- * reached in the `num+1`th step.
7
+ * Since `start` is the first value emitted, the `end` value is only reached in
8
+ * the `num+1`th step.
9
9
  *
10
- * The curvature can be controlled via the logarithmic `rate` param.
11
- * Recommended range [0.0001 - 10000] (curved -> linear). Default: 0.1
10
+ * The curvature can be controlled via the logarithmic `rate` param. Recommended
11
+ * range [0.0001 - 10000] (curved -> linear). Default: 0.1
12
12
  *
13
13
  * Similar functionality (w/ more options) is availble here:
14
- * {@link @thi.ng/dsp#curve}.
14
+ * [`curve()`](https://docs.thi.ng/umbrella/dsp/functions/curve.html).
15
15
  *
16
16
  * @example
17
17
  * ```ts
@@ -1,11 +1,11 @@
1
1
  import type { TransformSpec } from "./api.js";
2
2
  /**
3
- * Higher-order deep object transformer used by {@link (mapDeep:1)}.
4
- * Accepts a nested `spec` array reflecting same key structure as the
5
- * object to be mapped, but with functions or sub-specs as their values.
6
- * Returns a new function, which when called, recursively applies nested
7
- * transformers in post-order traversal (child transformers are run
8
- * first) and returns the result of the root transformer.
3
+ * Higher-order deep object transformer used by {@link mapDeep}. Accepts a
4
+ * nested `spec` array reflecting same key structure as the object to be mapped,
5
+ * but with functions or sub-specs as their values. Returns a new function,
6
+ * which when called, recursively applies nested transformers in post-order
7
+ * traversal (child transformers are run first) and returns the result of the
8
+ * root transformer.
9
9
  *
10
10
  * @remarks
11
11
  * The transform specs are given as arrays in this format:
@@ -14,9 +14,8 @@ import type { TransformSpec } from "./api.js";
14
14
  * [tx-function, { key1: [tx-function, {...}], key2: tx-fn }]
15
15
  * ```
16
16
  *
17
- * If a key in the spec has no further sub maps, its transform function
18
- * can be given directly without having to wrap it into the usual array
19
- * structure.
17
+ * If a key in the spec has no further sub maps, its transform function can be
18
+ * given directly without having to wrap it into the usual array structure.
20
19
  *
21
20
  * @example
22
21
  * ```ts
package/deep-transform.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { isFunction } from "@thi.ng/checks/is-function";
2
2
  /**
3
- * Higher-order deep object transformer used by {@link (mapDeep:1)}.
4
- * Accepts a nested `spec` array reflecting same key structure as the
5
- * object to be mapped, but with functions or sub-specs as their values.
6
- * Returns a new function, which when called, recursively applies nested
7
- * transformers in post-order traversal (child transformers are run
8
- * first) and returns the result of the root transformer.
3
+ * Higher-order deep object transformer used by {@link mapDeep}. Accepts a
4
+ * nested `spec` array reflecting same key structure as the object to be mapped,
5
+ * but with functions or sub-specs as their values. Returns a new function,
6
+ * which when called, recursively applies nested transformers in post-order
7
+ * traversal (child transformers are run first) and returns the result of the
8
+ * root transformer.
9
9
  *
10
10
  * @remarks
11
11
  * The transform specs are given as arrays in this format:
@@ -14,9 +14,8 @@ import { isFunction } from "@thi.ng/checks/is-function";
14
14
  * [tx-function, { key1: [tx-function, {...}], key2: tx-fn }]
15
15
  * ```
16
16
  *
17
- * If a key in the spec has no further sub maps, its transform function
18
- * can be given directly without having to wrap it into the usual array
19
- * structure.
17
+ * If a key in the spec has no further sub maps, its transform function can be
18
+ * given directly without having to wrap it into the usual array structure.
20
19
  *
21
20
  * @example
22
21
  * ```ts
package/delayed.d.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  import type { Transducer } from "./api.js";
2
2
  /**
3
- * Yields transducer which wraps incoming values in promises, which each
4
- * resolve after specified delay time (in ms).
3
+ * Yields transducer which wraps incoming values in promises, which each resolve
4
+ * after specified delay time (in ms).
5
5
  *
6
6
  * @remarks
7
- * Only to be used in async contexts and NOT with {@link (transduce:1)}
8
- * directly.
7
+ * Only to be used in async contexts and NOT with {@link transduce} directly.
9
8
  *
10
9
  * @param t -
11
10
  */
package/delayed.js CHANGED
@@ -1,12 +1,11 @@
1
1
  import { delayed as _delayed } from "@thi.ng/compose/delayed";
2
2
  import { map } from "./map.js";
3
3
  /**
4
- * Yields transducer which wraps incoming values in promises, which each
5
- * resolve after specified delay time (in ms).
4
+ * Yields transducer which wraps incoming values in promises, which each resolve
5
+ * after specified delay time (in ms).
6
6
  *
7
7
  * @remarks
8
- * Only to be used in async contexts and NOT with {@link (transduce:1)}
9
- * directly.
8
+ * Only to be used in async contexts and NOT with {@link transduce} directly.
10
9
  *
11
10
  * @param t -
12
11
  */
package/fill.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import type { NumericArray } from "@thi.ng/api";
2
2
  import type { Reducer } from "./api.js";
3
3
  /**
4
- * Reducer which starts filling array with results from given `start`
5
- * index (default: 0). Use {@link (fillN:1)} for typed array targets
6
- * (same impl, but provides correct result type).
4
+ * Reducer which starts filling array with results from given `start` index
5
+ * (default: 0). Use {@link fillN} for typed array targets (same impl, but
6
+ * provides correct result type).
7
7
  *
8
8
  * @param start -
9
9
  */
@@ -11,8 +11,7 @@ export declare function fill<T>(start?: number): Reducer<T[], T>;
11
11
  export declare function fill<T>(xs: Iterable<T>): T[];
12
12
  export declare function fill<T>(start: number, xs: Iterable<T>): T[];
13
13
  /**
14
- * Like {@link (fill:1)} reducer, but for numeric arrays (incl. typed
15
- * arrays).
14
+ * Like {@link fill} reducer, but for numeric arrays (incl. typed arrays).
16
15
  *
17
16
  * @param start -
18
17
  */
package/filter-fuzzy.d.ts CHANGED
@@ -11,14 +11,16 @@ export interface FilterFuzzyOpts<A, B> {
11
11
  equiv: Predicate2<any>;
12
12
  }
13
13
  /**
14
- * Returns transducer which calls {@link @thi.ng/arrays#fuzzyMatch} for
15
- * each value and discards all non-matching values.
14
+ * Returns transducer which calls
15
+ * [`fuzzyMatch()`](https://docs.thi.ng/umbrella/arrays/functions/fuzzyMatch.html)
16
+ * for each value and discards all non-matching values.
16
17
  *
17
18
  * @remarks
18
- * The `key` option function can be used to extract/produce the actual
19
- * value used for the search. The `equiv` option predicate can be used
20
- * to customize item equality checking. Uses {@link @thi.ng/equiv#equiv}
21
- * by default.
19
+ * The `key` option function can be used to extract/produce the actual value
20
+ * used for the search. The `equiv` option predicate can be used to customize
21
+ * item equality checking. Uses
22
+ * [`equiv()`](https://docs.thi.ng/umbrella/equiv/functions/equiv.html) by
23
+ * default.
22
24
  *
23
25
  * @example
24
26
  * ```ts
package/group-binary.d.ts CHANGED
@@ -1,19 +1,18 @@
1
1
  import type { Fn, Fn0, IObjectOf } from "@thi.ng/api";
2
2
  import type { Reducer } from "./api.js";
3
3
  /**
4
- * Creates a bottom-up, unbalanced binary tree of desired depth and
5
- * choice of data structures. Any value can be indexed, as long as a
6
- * numeric representation (key) can be obtained. This numeric key is
7
- * produced by the supplied `key` function. IMPORTANT: the returned
8
- * values MUST be unsigned and less than the provided bit length (i.e.
9
- * `0 .. (2^bits) - 1` range).
4
+ * Creates a bottom-up, unbalanced binary tree of desired depth and choice of
5
+ * data structures. Any value can be indexed, as long as a numeric
6
+ * representation (key) can be obtained. This numeric key is produced by the
7
+ * supplied `key` function. IMPORTANT: the returned values MUST be unsigned and
8
+ * less than the provided bit length (i.e. `0 .. (2^bits) - 1` range).
10
9
  *
11
- * By default the tree is constructed using plain objects for branches,
12
- * with left branches stored as "l" and right ones as "r". The original
13
- * values are stored at the lowest tree level using a customizable
14
- * nested reducer. By default leaves are collected in arrays (using the
15
- * {@link (push:1)} reducer), but any suitable reducer can be used (e.g.
16
- * {@link (conj:1)} to collect values into sets).
10
+ * By default the tree is constructed using plain objects for branches, with
11
+ * left branches stored as "l" and right ones as "r". The original values are
12
+ * stored at the lowest tree level using a customizable nested reducer. By
13
+ * default leaves are collected in arrays (using the {@link push} reducer), but
14
+ * any suitable reducer can be used (e.g. {@link conj} to collect values into
15
+ * sets).
17
16
  *
18
17
  * Index by lowest 4-bits of ID value:
19
18
  *
@@ -48,7 +47,7 @@ import type { Reducer } from "./api.js";
48
47
  * // [ [ 6 ], [ 7 ] ]
49
48
  * ```
50
49
  *
51
- * Using {@link (frequencies:1)} as leaf reducer:
50
+ * Using {@link frequencies} as leaf reducer:
52
51
  *
53
52
  * @example
54
53
  * ```ts
@@ -68,8 +67,7 @@ import type { Reducer } from "./api.js";
68
67
  *
69
68
  * @param bits - index range (always from 0)
70
69
  * @param key - key function
71
- * @param branch - function to create a new branch container (object or
72
- * array)
70
+ * @param branch - function to create a new branch container (object or array)
73
71
  * @param leaf - reducer for leaf collection
74
72
  * @param left - key for storing left branches (e.g. `0` for arrays)
75
73
  * @param right - key for storing right branches (e.g. `1` for arrays)
package/group-binary.js CHANGED
@@ -2,19 +2,18 @@ import { groupByObj } from "./group-by-obj.js";
2
2
  import { push } from "./push.js";
3
3
  const branchPred = (key, b, l, r) => (x) => key(x) & b ? r : l;
4
4
  /**
5
- * Creates a bottom-up, unbalanced binary tree of desired depth and
6
- * choice of data structures. Any value can be indexed, as long as a
7
- * numeric representation (key) can be obtained. This numeric key is
8
- * produced by the supplied `key` function. IMPORTANT: the returned
9
- * values MUST be unsigned and less than the provided bit length (i.e.
10
- * `0 .. (2^bits) - 1` range).
5
+ * Creates a bottom-up, unbalanced binary tree of desired depth and choice of
6
+ * data structures. Any value can be indexed, as long as a numeric
7
+ * representation (key) can be obtained. This numeric key is produced by the
8
+ * supplied `key` function. IMPORTANT: the returned values MUST be unsigned and
9
+ * less than the provided bit length (i.e. `0 .. (2^bits) - 1` range).
11
10
  *
12
- * By default the tree is constructed using plain objects for branches,
13
- * with left branches stored as "l" and right ones as "r". The original
14
- * values are stored at the lowest tree level using a customizable
15
- * nested reducer. By default leaves are collected in arrays (using the
16
- * {@link (push:1)} reducer), but any suitable reducer can be used (e.g.
17
- * {@link (conj:1)} to collect values into sets).
11
+ * By default the tree is constructed using plain objects for branches, with
12
+ * left branches stored as "l" and right ones as "r". The original values are
13
+ * stored at the lowest tree level using a customizable nested reducer. By
14
+ * default leaves are collected in arrays (using the {@link push} reducer), but
15
+ * any suitable reducer can be used (e.g. {@link conj} to collect values into
16
+ * sets).
18
17
  *
19
18
  * Index by lowest 4-bits of ID value:
20
19
  *
@@ -49,7 +48,7 @@ const branchPred = (key, b, l, r) => (x) => key(x) & b ? r : l;
49
48
  * // [ [ 6 ], [ 7 ] ]
50
49
  * ```
51
50
  *
52
- * Using {@link (frequencies:1)} as leaf reducer:
51
+ * Using {@link frequencies} as leaf reducer:
53
52
  *
54
53
  * @example
55
54
  * ```ts
@@ -69,8 +68,7 @@ const branchPred = (key, b, l, r) => (x) => key(x) & b ? r : l;
69
68
  *
70
69
  * @param bits - index range (always from 0)
71
70
  * @param key - key function
72
- * @param branch - function to create a new branch container (object or
73
- * array)
71
+ * @param branch - function to create a new branch container (object or array)
74
72
  * @param leaf - reducer for leaf collection
75
73
  * @param left - key for storing left branches (e.g. `0` for arrays)
76
74
  * @param right - key for storing right branches (e.g. `1` for arrays)
@@ -1,21 +1,21 @@
1
1
  import type { Transducer } from "./api.js";
2
2
  /**
3
- * Pre-configured version of {@link (interpolate:1)} for numeric values
4
- * and using cubic hermite interpolation.
3
+ * Pre-configured version of {@link interpolate} for numeric values and using
4
+ * cubic hermite interpolation.
5
5
  *
6
6
  * @remarks
7
7
  * The number of samples per interval is configurable. No values will be
8
8
  * produced if there're less than 4 inputs.
9
9
  *
10
- * Note: Due to the nature of hermite interpolation, the very first and
11
- * last input are only used to compute the curve tangents, but will not
12
- * appear in the output. Use the {@link extendSides} iterator to
13
- * transform the input so that these values are duplicated and so are
14
- * used as part of an interpolation interval.
10
+ * Note: Due to the nature of hermite interpolation, the very first and last
11
+ * input are only used to compute the curve tangents, but will not appear in the
12
+ * output. Use the {@link extendSides} iterator to transform the input so that
13
+ * these values are duplicated and so are used as part of an interpolation
14
+ * interval.
15
15
  *
16
16
  * See also:
17
- * - {@link (interpolate:1)}
18
- * - {@link (interpolateLinear:1)}
17
+ * - {@link interpolate}
18
+ * - {@link interpolateLinear}
19
19
  * - {@link extendSides}
20
20
  *
21
21
  * @param n -
@@ -1,15 +1,15 @@
1
1
  import type { Transducer } from "./api.js";
2
2
  /**
3
- * Pre-configured version of {@link (interpolate:1)} for numeric values
4
- * and using pairwise linear interpolation.
3
+ * Pre-configured version of {@link interpolate} for numeric values and using
4
+ * pairwise linear interpolation.
5
5
  *
6
6
  * @remarks
7
7
  * The number of samples per interval is configurable. No values will be
8
8
  * produced if there're less than 2 inputs.
9
9
  *
10
10
  * See also:
11
- * - {@link (interpolate:1)}
12
- * - {@link (interpolateHermite:1)}
11
+ * - {@link interpolate}
12
+ * - {@link interpolateHermite}
13
13
  *
14
14
  * @param n -
15
15
  */
package/interpolate.d.ts CHANGED
@@ -1,23 +1,23 @@
1
1
  import type { Fn2 } from "@thi.ng/api";
2
2
  import type { Transducer } from "./api.js";
3
3
  /**
4
- * Higher order interpolation transducer. The resulting transducer forms
5
- * a sliding window and calls `fn` (the given interpolation function)
6
- * `n` times with the current window and a normalized time value to
7
- * produce the requested number of interpolated values per interval.
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.
8
8
  *
9
9
  * @remarks
10
- * If the optional `src` iterable is given, `interpolate` returns an
11
- * iterator of interpolated values. No values will be produced if the
12
- * number of inputs is less than given `window` size.
10
+ * If the optional `src` iterable is given, `interpolate` returns an iterator of
11
+ * interpolated values. No values will be produced if the number of inputs is
12
+ * less than given `window` size.
13
13
  *
14
- * Note: The *very last* input value can never be fully reached and
15
- * might need to be explicitly duplicated in the input, e.g. via the
16
- * {@link extendSides} iterator...
14
+ * Note: The *very last* input value can never be fully reached and might need
15
+ * to be explicitly duplicated in the input, e.g. via the {@link extendSides}
16
+ * iterator...
17
17
  *
18
18
  * See also:
19
- * - {@link (interpolateHermite:1)}
20
- * - {@link (interpolateLinear:1)}
19
+ * - {@link interpolateHermite}
20
+ * - {@link interpolateLinear}
21
21
  * - {@link extendSides}
22
22
  *
23
23
  * @example
package/line.d.ts CHANGED
@@ -1,14 +1,14 @@
1
1
  /**
2
- * Iterator yielding `steps` + 1 interpolated values on a line in the
3
- * closed `[start .. end]` interval.
2
+ * Iterator yielding `steps` + 1 interpolated values on a line in the closed
3
+ * `[start .. end]` interval.
4
4
  *
5
5
  * @remarks
6
- * This is similar to {@link range}, but potentially provides more
7
- * precise values (by avoiding the accumulation of floating point errors
8
- * during iteration).
6
+ * This is similar to {@link range}, but potentially provides more precise
7
+ * values (by avoiding the accumulation of floating point errors during
8
+ * iteration).
9
9
  *
10
10
  * Similar functionality (w/ more options) is availble here:
11
- * {@link @thi.ng/dsp#line}.
11
+ * [`line()`](https://docs.thi.ng/umbrella/dsp/functions/line.html).
12
12
  *
13
13
  * @example
14
14
  * ```ts
package/line.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { map } from "./map.js";
2
2
  import { normRange } from "./norm-range.js";
3
3
  /**
4
- * Iterator yielding `steps` + 1 interpolated values on a line in the
5
- * closed `[start .. end]` interval.
4
+ * Iterator yielding `steps` + 1 interpolated values on a line in the closed
5
+ * `[start .. end]` interval.
6
6
  *
7
7
  * @remarks
8
- * This is similar to {@link range}, but potentially provides more
9
- * precise values (by avoiding the accumulation of floating point errors
10
- * during iteration).
8
+ * This is similar to {@link range}, but potentially provides more precise
9
+ * values (by avoiding the accumulation of floating point errors during
10
+ * iteration).
11
11
  *
12
12
  * Similar functionality (w/ more options) is availble here:
13
- * {@link @thi.ng/dsp#line}.
13
+ * [`line()`](https://docs.thi.ng/umbrella/dsp/functions/line.html).
14
14
  *
15
15
  * @example
16
16
  * ```ts
package/map-indexed.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import type { Fn2 } from "@thi.ng/api";
2
2
  import type { Transducer } from "./api.js";
3
3
  /**
4
- * Transducer. Similar to {@link (map:1)}, but given `fn` takes two
5
- * arguments: `index` and `value` to transform.
4
+ * Transducer. Similar to {@link map}, but given `fn` takes two arguments:
5
+ * `index` and `value` to transform.
6
6
  *
7
7
  * @remarks
8
8
  * An optional start index `offset` can be provided (default 0).
package/map-nth.d.ts CHANGED
@@ -1,13 +1,12 @@
1
1
  import type { Fn } from "@thi.ng/api";
2
2
  import type { Transducer } from "./api.js";
3
3
  /**
4
- * Transducer. Similar to {@link (map:1)}, but only transforms every
5
- * `n`-th input value and passes intermediate values unchanged
6
- * downstream.
4
+ * Transducer. Similar to {@link map}, but only transforms every `n`-th input
5
+ * value and passes intermediate values unchanged downstream.
7
6
  *
8
7
  * @remarks
9
- * The optional `offset` arg can be used to adjust the
10
- * number of inputs before the first transformation occurs (default 0).
8
+ * The optional `offset` arg can be used to adjust the number of inputs before
9
+ * the first transformation occurs (default 0).
11
10
  *
12
11
  * @example
13
12
  * ```ts