UNPKG

@toolpad/utils

Version:

Shared utilities used by Toolpad packages.

13 lines (12 loc) 387 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.resolveValues = resolveValues; /** * Returns a Promise to an object with all the properties resolved as promises */ async function resolveValues(obj) { const entries = Object.entries(obj).map(async ([key, value]) => [key, await value]); return Object.fromEntries(await Promise.all(entries)); }