* Returns a promise that will be resolved with the input value in a * fully-resolved state. If the value is an array, each element will be fully * resolved. Likewise, if the value is an object, all keys will be fully * resolved. In both cases, all nested arrays and objects will also be * fully r
(value)
| 202 | * of the input value. |
| 203 | */ |
| 204 | async function fullyResolved(value) { |
| 205 | value = await Promise.resolve(value) |
| 206 | if (Array.isArray(value)) { |
| 207 | return fullyResolveKeys(/** @type {!Array} */ (value)) |
| 208 | } |
| 209 | |
| 210 | if (isObject(value)) { |
| 211 | return fullyResolveKeys(/** @type {!Object} */ (value)) |
| 212 | } |
| 213 | |
| 214 | if (typeof value === 'function') { |
| 215 | return fullyResolveKeys(/** @type {!Object} */ (value)) |
| 216 | } |
| 217 | |
| 218 | return value |
| 219 | } |
| 220 | |
| 221 | /** |
| 222 | * @param {!(Array|Object)} obj the object to resolve. |
no test coverage detected