-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathimplementation.js
More file actions
25 lines (14 loc) · 699 Bytes
/
implementation.js
File metadata and controls
25 lines (14 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
'use strict';
var requirePromise = require('./requirePromise');
requirePromise();
var CreateDataPropertyOrThrow = require('es-abstract/2025/CreateDataPropertyOrThrow');
var NewPromiseCapability = require('es-abstract/2025/NewPromiseCapability');
module.exports = function withResolvers() {
var C = this; // step 1
var promiseCapability = NewPromiseCapability(C); // step 2
var obj = {}; // step 3
CreateDataPropertyOrThrow(obj, 'promise', promiseCapability['[[Promise]]']); // step 4
CreateDataPropertyOrThrow(obj, 'resolve', promiseCapability['[[Resolve]]']); // step 5
CreateDataPropertyOrThrow(obj, 'reject', promiseCapability['[[Reject]]']); // step 6
return obj; // step 7
};