wrangler-action/node_modules/spawndamnit/promise.js
2023-08-07 15:11:15 -05:00

20 lines
388 B
JavaScript

'use strict';
const EventEmitter = require('events');
class ChildProcessPromise extends Promise {
constructor(executer) {
let resolve;
let reject;
super((res, rej) => {
resolve = res;
reject = rej;
});
executer(resolve, reject, this);
}
}
Object.assign(ChildProcessPromise.prototype, EventEmitter.prototype);
module.exports = ChildProcessPromise;