source: trip-planner-front/node_modules/core-js/internals/promise-resolve.js@ 1ad8e64

Last change on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 427 bytes
Line 
1var anObject = require('../internals/an-object');
2var isObject = require('../internals/is-object');
3var newPromiseCapability = require('../internals/new-promise-capability');
4
5module.exports = function (C, x) {
6 anObject(C);
7 if (isObject(x) && x.constructor === C) return x;
8 var promiseCapability = newPromiseCapability.f(C);
9 var resolve = promiseCapability.resolve;
10 resolve(x);
11 return promiseCapability.promise;
12};
Note: See TracBrowser for help on using the repository browser.