@thi.ng/transducers 8.8.21 → 8.8.22
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/flatten-with.d.ts +1 -2
- package/package.json +9 -9
- package/scan.d.ts +0 -1
- package/sliding-window.d.ts +7 -7
package/CHANGELOG.md
CHANGED
package/flatten-with.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DeepArrayValue, Fn, Nullable } from "@thi.ng/api";
|
|
2
2
|
import type { Transducer } from "./api.js";
|
|
3
|
-
type MaybeIterable<T> = Nullable<Iterable<T>>;
|
|
3
|
+
export type MaybeIterable<T> = Nullable<Iterable<T>>;
|
|
4
4
|
/**
|
|
5
5
|
* Transducer. Takes a function `fn` which will be applied to each input
|
|
6
6
|
* value. If the function returns an ES6 Iterable, the result will be
|
|
@@ -32,5 +32,4 @@ type MaybeIterable<T> = Nullable<Iterable<T>>;
|
|
|
32
32
|
*/
|
|
33
33
|
export declare function flattenWith<A, B = DeepArrayValue<A>>(fn: Fn<any, MaybeIterable<any>>): Transducer<A, B>;
|
|
34
34
|
export declare function flattenWith<A, B = DeepArrayValue<A>>(fn: Fn<any, MaybeIterable<any>>, src: Iterable<A>): IterableIterator<B>;
|
|
35
|
-
export {};
|
|
36
35
|
//# sourceMappingURL=flatten-with.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/transducers",
|
|
3
|
-
"version": "8.8.
|
|
3
|
+
"version": "8.8.22",
|
|
4
4
|
"description": "Lightweight transducer implementations for ES6 / TypeScript",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"test": "bun test"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@thi.ng/api": "^8.9.
|
|
43
|
-
"@thi.ng/arrays": "^2.7.
|
|
44
|
-
"@thi.ng/checks": "^3.4.
|
|
45
|
-
"@thi.ng/compare": "^2.2.
|
|
46
|
-
"@thi.ng/compose": "^2.1.
|
|
42
|
+
"@thi.ng/api": "^8.9.18",
|
|
43
|
+
"@thi.ng/arrays": "^2.7.15",
|
|
44
|
+
"@thi.ng/checks": "^3.4.18",
|
|
45
|
+
"@thi.ng/compare": "^2.2.14",
|
|
46
|
+
"@thi.ng/compose": "^2.1.57",
|
|
47
47
|
"@thi.ng/errors": "^2.4.11",
|
|
48
|
-
"@thi.ng/math": "^5.
|
|
49
|
-
"@thi.ng/random": "^3.6.
|
|
48
|
+
"@thi.ng/math": "^5.8.0",
|
|
49
|
+
"@thi.ng/random": "^3.6.25"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@microsoft/api-extractor": "^7.39.0",
|
|
@@ -588,5 +588,5 @@
|
|
|
588
588
|
],
|
|
589
589
|
"year": 2016
|
|
590
590
|
},
|
|
591
|
-
"gitHead": "
|
|
591
|
+
"gitHead": "7426e2ae6fca5482c6eaf649872296fc89955374\n"
|
|
592
592
|
}
|
package/scan.d.ts
CHANGED
package/sliding-window.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { type MaybeDeref } from "@thi.ng/api/deref";
|
|
2
2
|
import type { Transducer } from "./api.js";
|
|
3
3
|
/**
|
|
4
|
-
* Sliding window transducer, similar to `partition(size, 1)`, but
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* accumulation buffer.
|
|
4
|
+
* Sliding window transducer, similar to `partition(size, 1)`, but supports
|
|
5
|
+
* initially partially filled windows, if `partial` is set to true (default).
|
|
6
|
+
* Each emitted window is a shallow copy of the internal accumulation buffer.
|
|
8
7
|
*
|
|
9
8
|
* @remarks
|
|
10
|
-
* If `size` implements
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* If `size` implements
|
|
10
|
+
* [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html), the
|
|
11
|
+
* window size will be re-evaluated for each new input and therefore can be used
|
|
12
|
+
* as mechanism to dynamically adjust the window size.
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* ```ts
|