7 `Promise.resolve` returns a promise that will become resolved with the
8 passed `value`. It is shorthand for the following:
11 let promise = new Promise(function(resolve, reject){
15 promise.then(function(value){
20 Instead of writing the above, your code now simply becomes the following:
23 let promise = Promise.resolve(1);
25 promise.then(function(value){
32 @param {Any} value value that the returned promise will be resolved with
34 @return {Promise} a promise that will become fulfilled with the given
37 export default function resolve(object) {
38 /*jshint validthis:true */
39 let Constructor = this;
41 if (object && typeof object === 'object' && object.constructor === Constructor) {
45 let promise = new Constructor(noop);
46 _resolve(promise, object);