mirror of
https://github.com/flynx/types.js.git
synced 2026-10-03 05:01:31 +00:00
updated docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
14e61644b2
commit
aadeb4f051
@ -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
4
package-lock.json
generated
@ -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",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user