Module: webgis4u/util/promise/state

Members

(static, constant) PromiseStateEnum

Source:

(inner, constant) promiseStateSymbol

Unique symbol used to identify the value returned by Promise.race
Source:

Methods

(static) state(p) → {string}

Encodes a given object to use as a query string
Parameters:
Name Type Description
p Promise The promise
Source:
Returns:
The encoded query string
Type
string
Example
if(await state(p) === PromiseStateEnum.Pending) {
   // promise is pending
}