@thi.ng/transducers 8.8.21 → 8.8.23
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 +7 -3
- package/flatten-with.d.ts +1 -2
- package/package.json +10 -10
- package/scan.d.ts +0 -1
- package/sliding-window.d.ts +7 -7
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -7,9 +7,13 @@
|
|
|
7
7
|

|
|
8
8
|
[](https://mastodon.thi.ng/@toxi)
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
> [!NOTE]
|
|
11
|
+
> This is one of 189 standalone projects, maintained as part
|
|
12
|
+
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
13
|
+
> and anti-framework.
|
|
14
|
+
>
|
|
15
|
+
> 🚀 Help me to work full-time on these projects by [sponsoring me on
|
|
16
|
+
> GitHub](https://github.com/sponsors/postspectacular). Thank you! ❤️
|
|
13
17
|
|
|
14
18
|
- [About](#about)
|
|
15
19
|
- [Status](#status)
|
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.23",
|
|
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.
|
|
47
|
-
"@thi.ng/errors": "^2.4.
|
|
48
|
-
"@thi.ng/math": "^5.
|
|
49
|
-
"@thi.ng/random": "^3.6.
|
|
42
|
+
"@thi.ng/api": "^8.9.19",
|
|
43
|
+
"@thi.ng/arrays": "^2.7.16",
|
|
44
|
+
"@thi.ng/checks": "^3.4.19",
|
|
45
|
+
"@thi.ng/compare": "^2.2.15",
|
|
46
|
+
"@thi.ng/compose": "^2.1.58",
|
|
47
|
+
"@thi.ng/errors": "^2.4.12",
|
|
48
|
+
"@thi.ng/math": "^5.8.1",
|
|
49
|
+
"@thi.ng/random": "^3.6.26"
|
|
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": "20909ffc46f23f61ec7647e8d27ed17752ce9828\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
|