Files
pyrofetes-frontend/node_modules/lmdb/util/when.js
CHEVALLIER Abel cb235644dc init
2025-11-13 16:23:22 +01:00

9 lines
209 B
JavaScript

export function when(promise, callback, errback) {
if (promise && promise.then) {
return errback ?
promise.then(callback, errback) :
promise.then(callback);
}
return callback(promise);
}