@mary/deep-promise@0.1.0
latest
Works with
•JSR Score82%•This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




Published2 years ago (0.1.0)
Recursively awaits all promises inside an object
# deep-promise Recursively awaits all promises inside an object. ```ts const result = await recurse([ { id: 1, entry: Promise.resolve({ text: 'Hello' }) }, { id: 2, entry: Promise.resolve({ text: 'World' }) }, ]); result; // ^? [ // { id: 1, entry: { text: 'Hello' } }, // { id: 2, entry: { text: 'World' } }, // ] ```