Added 'new' flag.
This commit is contained in:
5
utils/promise-props.js
Normal file
5
utils/promise-props.js
Normal file
@@ -0,0 +1,5 @@
|
||||
export default async function promiseProps(obj) {
|
||||
const resolved = await Promise.all(Object.entries(obj).map(async ([key, promise]) => [key, await promise]));
|
||||
|
||||
return Object.fromEntries(resolved);
|
||||
}
|
||||
Reference in New Issue
Block a user