Closed Maatary closed 9 years ago
Thanks for jumping in @campersau. That exactly right, and is the simplest way. Also info here: https://github.com/cujojs/when/blob/master/docs/api.md#when
Note that when(x)
and when.resolve(x)
basically do the same thing, as does Promise.resolve(x)
if you're using the ES6 Promise shim.
Closing, but please feel free to continue to discuss, or reopen if you need, @Maatary
You can just wrap other promises with
when(otherPromise)
For example:You can read more about it here: https://github.com/cujojs/when/wiki/when#non-compliant-promises