promise-props-recursive
v2.0.2
Published
Recursively resolve promises within objects
Downloads
46,400
Readme
promise-props-recursive
Resolve a (potentially) deep structure of promises
Installation
$ npm install --save promise-props-recursive
Usage
var promisePropsRecursive = require('promise-props-recursive')
console.log(
promisePropsRecursive({
cats: Promise.resolve(['bamse', 'beans']),
dogs: {
schnauzers: Promise.resolve({
kokos: {
isSchnauzer: true,
isCute: Promite.resolve(true),
},
}),
mixed: Promise.resolve('katla'),
},
})
)
License
MIT-licensed. See LICENSE.