a promises/a compliant `when`, but for objects instead of arrays

npm install resolved
1 downloads in the last day
2 downloads in the last week
26 downloads in the last month


a promises/a compliant when, but for objects instead of arrays

If your friends ask, this is why promises are cool: they're objects that you can pass around and do things to while you're waiting for their promised values. With resolved, you can embed promises in other objects and then get the aggregate resolved value.

This is similar to the function when, which takes an array of promises and returns a promise for an array of all of the resolved values. resolved does the same, but for objects instead of arrays.


$ npm install resolved


var resolved = require('resolved')

var obj = {
  a: 'a regular value',
  b: promiseOfTrue

resolved(obj).then(function(resolvedObj) {
  // resolvedObj = {
  //    a: 'a regular value',
  //    b: true
  //  }


MIT (c) 2012 jden - Jason Denizac -

npm loves you