`Promise.resolve` returns a promise that will become resolved with the passed `value`. It is shorthand for the following: ```javascript let promise = new Promise(function(resolve, reject){ resolve(1); }); promise.then(function(value){ // value === 1 }); ``` Instead of writ
(object)
| 220 | `value` |
| 221 | */ |
| 222 | function resolve(object) { |
| 223 | /*jshint validthis:true */ |
| 224 | var Constructor = this; |
| 225 | |
| 226 | if (object && typeof object === 'object' && object.constructor === Constructor) { |
| 227 | return object; |
| 228 | } |
| 229 | |
| 230 | var promise = new Constructor(noop); |
| 231 | _resolve(promise, object); |
| 232 | return promise; |
| 233 | } |
| 234 | |
| 235 | var PROMISE_ID = Math.random().toString(36).substring(16); |
| 236 |
no test coverage detected