download
raw
372 Bytes
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;

Xet Storage Details

Size:
372 Bytes
·
Xet hash:
64928807a697afda58ebcead59b4ede8e6005ae675ce160a3ab1b4c2ba70fdd6

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.