main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
441 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var anObject = require('../internals/an-object');
|
---|
3 | var isObject = require('../internals/is-object');
|
---|
4 | var newPromiseCapability = require('../internals/new-promise-capability');
|
---|
5 |
|
---|
6 | module.exports = function (C, x) {
|
---|
7 | anObject(C);
|
---|
8 | if (isObject(x) && x.constructor === C) return x;
|
---|
9 | var promiseCapability = newPromiseCapability.f(C);
|
---|
10 | var resolve = promiseCapability.resolve;
|
---|
11 | resolve(x);
|
---|
12 | return promiseCapability.promise;
|
---|
13 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.