@fullstackunicorn/initialize 1.0.7 → 1.0.8
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/index.js +8 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -72,6 +72,14 @@ globalThis.F3.promise = async (func, data) => {
|
|
|
72
72
|
})
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
globalThis.F3.promises = async (tasks = {}) => {
|
|
76
|
+
const entries = Object.entries(tasks)
|
|
77
|
+
const results = await Promise.all(entries.map(([key, fn]) => fn()))
|
|
78
|
+
const output = {}
|
|
79
|
+
entries.forEach(([key], i) => output[key] = results[i])
|
|
80
|
+
return output
|
|
81
|
+
}
|
|
82
|
+
|
|
75
83
|
globalThis.F3.res = {}
|
|
76
84
|
globalThis.F3.res.isGood = res => {
|
|
77
85
|
if (F3.isNil(res)) return false
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.8",
|
|
3
3
|
"name": "@fullstackunicorn/initialize",
|
|
4
4
|
"author": "lucanigido (https://fullstackunicorn.dev/author/lucanigido)",
|
|
5
5
|
"description": "A collection of global utility functions for JavaScript/Node.js projects (type checks, string helpers, logging, etc.). Side-effect import extends globals.",
|