Sync all projects

This commit is contained in:
github-actions[bot]
2026-07-28 12:25:15 +00:00
parent f80ebec583
commit fa0fa12a49
495 changed files with 367876 additions and 4483 deletions
+16
View File
@@ -0,0 +1,16 @@
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;