@gkucmierz/utils 4.1.0 → 4.1.1
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/README.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# @gkucmierz/utils
|
|
2
2
|
|
|
3
|
-
[
|
|
3
|
+
[](https://www.npmjs.com/package/@gkucmierz/utils)
|
|
4
|
+
[](https://socket.dev/npm/package/@gkucmierz/utils)
|
|
5
|
+
[](https://gitea.7u.pl/gkucmierz/utils)
|
|
6
|
+
[](https://www.npmjs.com/package/@gkucmierz/utils)
|
|
7
|
+
[](https://gitea.7u.pl/gkucmierz/utils)
|
|
8
|
+
[](https://nodejs.org)
|
|
7
9
|
|
|
8
10
|
A collection of useful utility functions and data structures for solving algorithmic tasks, competitive programming, and everyday development.
|
|
9
11
|
|
|
@@ -79,8 +81,8 @@ This library provides a wide range of mathematical functions and data structures
|
|
|
79
81
|
|
|
80
82
|
## 📚 Documentation
|
|
81
83
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
+
- **Production Docs**: 👉 **[https://docs-utils.7u.pl](https://docs-utils.7u.pl)**
|
|
85
|
+
- **GitHub Pages Mirror**: [https://gkucmierz.github.io/utils](https://gkucmierz.github.io/utils)
|
|
84
86
|
|
|
85
87
|
## 🔗 Repository
|
|
86
88
|
- **Internal Gitea**: [https://gitea.7u.pl/gkucmierz/utils](https://gitea.7u.pl/gkucmierz/utils)
|
package/package.json
CHANGED
|
@@ -39,10 +39,9 @@ export class ConflatingQueue {
|
|
|
39
39
|
* Enqueues an asynchronous task associated with a specific key.
|
|
40
40
|
* If a pending task with the same key already exists, it is superseded by the new task.
|
|
41
41
|
*
|
|
42
|
-
* @template T
|
|
43
42
|
* @param {string|number|symbol} key - Unique identifier for task coalescing.
|
|
44
|
-
* @param {
|
|
45
|
-
* @returns {Promise
|
|
43
|
+
* @param {Function} taskFn - The async or sync function to execute.
|
|
44
|
+
* @returns {Promise<*|{ superseded: boolean }>} Resolves with task result or `{ superseded: true }`.
|
|
46
45
|
*/
|
|
47
46
|
enqueue(key, taskFn) {
|
|
48
47
|
if (typeof taskFn !== 'function') {
|