updated docs...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2026-06-26 21:09:32 +03:00
parent 14e61644b2
commit aadeb4f051
2 changed files with 9 additions and 4 deletions

View File

@ -2201,14 +2201,19 @@ relevant items in the input are either non-promises or `<sync-promise>`s.
#### `Promise.awaitOrRun(..)`
Await for inputs if any of them is a promise and then run a function with
the results, otherwise run the function in sync.
Await for inputs passing their resolved values to a function, either
directly returning the result, if none of the inputs was a promise (sync),
or returning a promise resolving to the function's return value, if any of
the inputs was a promise.
```dnf
Promise.awaitOrRun(<value>, <func>[, <onerror>])
Promise.awaitOrRun(<value>, .. , <func>[, <onerror>])
-> <promise(value)>
-> <value>
<func>(<value>, .. )
-> value
```
Note that if the last `<value>` is a function and no `<onerror>` function

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "ig-types",
"version": "6.24.17",
"version": "6.26.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "ig-types",
"version": "6.24.17",
"version": "6.26.2",
"license": "BSD-3-Clause",
"dependencies": {
"ig-object": "^6.0.0",