🚀 Auto-deploy: Camila atualizado em 26/05/2026 13:59:50

This commit is contained in:
2026-05-26 13:59:50 +00:00
parent ace6c53448
commit 71e633ce71
316 changed files with 59354 additions and 86 deletions
+18
View File
@@ -0,0 +1,18 @@
import utils from '../utils.js';
const callbackify = (fn, reducer) => {
return utils.isAsyncFn(fn)
? function (...args) {
const cb = args.pop();
fn.apply(this, args).then((value) => {
try {
reducer ? cb(null, ...reducer(value)) : cb(null, value);
} catch (err) {
cb(err);
}
}, cb);
}
: fn;
};
export default callbackify;