Son CV dans un terminal web en Javascript!
https://terminal-cv.gregandev.fr
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
709 B
34 lines
709 B
2 years ago
|
"use strict";
|
||
|
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
exports.makeDeferredWithPromise = makeDeferredWithPromise;
|
||
|
|
||
|
function _assert() {
|
||
|
const data = _interopRequireDefault(require("assert"));
|
||
|
|
||
|
_assert = function () {
|
||
|
return data;
|
||
|
};
|
||
|
|
||
|
return data;
|
||
|
}
|
||
|
|
||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
|
||
|
function makeDeferredWithPromise() {
|
||
|
let deferred;
|
||
|
let promise = new Promise((resolve, reject) => {
|
||
|
deferred = {
|
||
|
resolve,
|
||
|
reject
|
||
|
};
|
||
|
}); // Promise constructor callback executes synchronously, so this is defined
|
||
|
|
||
|
(0, _assert().default)(deferred != null);
|
||
|
return {
|
||
|
deferred,
|
||
|
promise
|
||
|
};
|
||
|
}
|