@thi.ng/transducers-async 0.3.5 → 0.3.7
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 +9 -1
- package/README.md +4 -3
- package/package.json +16 -11
- package/throttle-time.js +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**:
|
|
3
|
+
- **Last updated**: 2025-01-04T21:07:38Z
|
|
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.
|
|
@@ -9,6 +9,14 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
9
9
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
10
|
and/or version bumps of transitive dependencies.
|
|
11
11
|
|
|
12
|
+
### [0.3.6](https://github.com/thi-ng/umbrella/tree/@thi.ng/transducers-async@0.3.6) (2024-12-27)
|
|
13
|
+
|
|
14
|
+
#### ♻️ Refactoring
|
|
15
|
+
|
|
16
|
+
- update `throttleTime()` ([87e5ed3](https://github.com/thi-ng/umbrella/commit/87e5ed3))
|
|
17
|
+
- add [@thi.ng/timestamp](https://github.com/thi-ng/umbrella/tree/main/packages/timestamp) micro dependency
|
|
18
|
+
- update timestamp handling (more precise in some contexts)
|
|
19
|
+
|
|
12
20
|
## [0.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/transducers-async@0.3.0) (2024-10-14)
|
|
13
21
|
|
|
14
22
|
#### 🚀 Features
|
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 200 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
|
>
|
|
@@ -116,7 +116,7 @@ For Node.js REPL:
|
|
|
116
116
|
const txa = await import("@thi.ng/transducers-async");
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
Package sizes (brotli'd, pre-treeshake): ESM: 3.
|
|
119
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 3.22 KB
|
|
120
120
|
|
|
121
121
|
## Dependencies
|
|
122
122
|
|
|
@@ -125,6 +125,7 @@ Package sizes (brotli'd, pre-treeshake): ESM: 3.20 KB
|
|
|
125
125
|
- [@thi.ng/checks](https://github.com/thi-ng/umbrella/tree/develop/packages/checks)
|
|
126
126
|
- [@thi.ng/compose](https://github.com/thi-ng/umbrella/tree/develop/packages/compose)
|
|
127
127
|
- [@thi.ng/errors](https://github.com/thi-ng/umbrella/tree/develop/packages/errors)
|
|
128
|
+
- [@thi.ng/timestamp](https://github.com/thi-ng/umbrella/tree/develop/packages/timestamp)
|
|
128
129
|
- [@thi.ng/transducers](https://github.com/thi-ng/umbrella/tree/develop/packages/transducers)
|
|
129
130
|
|
|
130
131
|
Note: @thi.ng/api is in _most_ cases a type-only import (not used at runtime)
|
|
@@ -163,4 +164,4 @@ If this project contributes to an academic publication, please cite it as:
|
|
|
163
164
|
|
|
164
165
|
## License
|
|
165
166
|
|
|
166
|
-
© 2018 -
|
|
167
|
+
© 2018 - 2025 Karsten Schmidt // Apache License 2.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/transducers-async",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"description": "Async versions of various highly composable transducers, reducers and iterators",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
{
|
|
20
20
|
"type": "patreon",
|
|
21
21
|
"url": "https://patreon.com/thing_umbrella"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "liberapay",
|
|
25
|
+
"url": "https://liberapay.com/thi.ng"
|
|
22
26
|
}
|
|
23
27
|
],
|
|
24
28
|
"author": "Karsten Schmidt (https://thi.ng)",
|
|
@@ -36,17 +40,18 @@
|
|
|
36
40
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
37
41
|
},
|
|
38
42
|
"dependencies": {
|
|
39
|
-
"@thi.ng/api": "^8.11.
|
|
40
|
-
"@thi.ng/buffers": "^0.
|
|
41
|
-
"@thi.ng/checks": "^3.6.
|
|
42
|
-
"@thi.ng/compose": "^3.0.
|
|
43
|
-
"@thi.ng/errors": "^2.5.
|
|
44
|
-
"@thi.ng/
|
|
43
|
+
"@thi.ng/api": "^8.11.16",
|
|
44
|
+
"@thi.ng/buffers": "^1.0.1",
|
|
45
|
+
"@thi.ng/checks": "^3.6.18",
|
|
46
|
+
"@thi.ng/compose": "^3.0.19",
|
|
47
|
+
"@thi.ng/errors": "^2.5.22",
|
|
48
|
+
"@thi.ng/timestamp": "^1.1.1",
|
|
49
|
+
"@thi.ng/transducers": "^9.2.12"
|
|
45
50
|
},
|
|
46
51
|
"devDependencies": {
|
|
47
|
-
"@microsoft/api-extractor": "^7.48.
|
|
48
|
-
"esbuild": "^0.24.
|
|
49
|
-
"typedoc": "^0.27.
|
|
52
|
+
"@microsoft/api-extractor": "^7.48.1",
|
|
53
|
+
"esbuild": "^0.24.2",
|
|
54
|
+
"typedoc": "^0.27.6",
|
|
50
55
|
"typescript": "^5.7.2"
|
|
51
56
|
},
|
|
52
57
|
"keywords": [
|
|
@@ -208,5 +213,5 @@
|
|
|
208
213
|
"status": "alpha",
|
|
209
214
|
"year": 2018
|
|
210
215
|
},
|
|
211
|
-
"gitHead": "
|
|
216
|
+
"gitHead": "56c1d57a96565bbcc8c06c73779a619bba0db368\n"
|
|
212
217
|
}
|
package/throttle-time.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { now, timeDiff } from "@thi.ng/timestamp";
|
|
1
2
|
import { iterator1 } from "./iterator.js";
|
|
2
3
|
import { throttle } from "./throttle.js";
|
|
3
4
|
function throttleTime(delay, src) {
|
|
4
5
|
return src ? iterator1(throttleTime(delay), src) : throttle(() => {
|
|
5
|
-
let
|
|
6
|
+
let prev = 0;
|
|
6
7
|
return () => {
|
|
7
|
-
const t =
|
|
8
|
-
return t
|
|
8
|
+
const t = now();
|
|
9
|
+
return timeDiff(prev, t) >= delay ? (prev = t, true) : false;
|
|
9
10
|
};
|
|
10
11
|
});
|
|
11
12
|
}
|