forked from olcxjas-softworks/LarpixClient
Update gitignore (sorry)
This commit is contained in:
parent
a8f8c4d7ad
commit
cca8b02fea
6604 changed files with 1219661 additions and 4 deletions
23
electron/node_modules/async/internal/promiseCallback.js
generated
vendored
Normal file
23
electron/node_modules/async/internal/promiseCallback.js
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
const PROMISE_SYMBOL = Symbol('promiseCallback');
|
||||
|
||||
function promiseCallback() {
|
||||
let resolve, reject;
|
||||
function callback(err, ...args) {
|
||||
if (err) return reject(err);
|
||||
resolve(args.length > 1 ? args : args[0]);
|
||||
}
|
||||
|
||||
callback[PROMISE_SYMBOL] = new Promise((res, rej) => {
|
||||
resolve = res, reject = rej;
|
||||
});
|
||||
|
||||
return callback;
|
||||
}
|
||||
|
||||
exports.promiseCallback = promiseCallback;
|
||||
exports.PROMISE_SYMBOL = PROMISE_SYMBOL;
|
||||
Loading…
Add table
Add a link
Reference in a new issue