promise-deep-resolve-ts
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Promise Resolve Deep Ts

import { promiseDeepResolve } from 'promise-deep-resolve-ts';

const getBuildedNodes = () =>
  Promise.resolve({
    root: Promise.resolve({
      child: Promise.resolve('value'),
      secChild: Promise.resolve(2),
      thirdChild: Promise.resolve(['value', 2]),
    }),
  });

// {
//	root: {
//	 child: 'value',
// 	 secChild: 2,
// 	 thirdChild: ['value', 2],
//	},
// }

const deepResolved = await promiseDeepResolve(getBuildedNodes());

Package Sidebar

Install

npm i promise-deep-resolve-ts

Weekly Downloads

17

Version

1.1.0

License

GPL-3.0-or-later

Unpacked Size

39.6 kB

Total Files

11

Last publish

Collaborators

  • stercoris