first implementation

This commit is contained in:
Adrien
2026-03-31 20:58:47 +02:00
parent dc0bcab36e
commit 618e28b354
1878 changed files with 1381732 additions and 5 deletions

18
frontend/node_modules/axios/lib/helpers/callbackify.js generated vendored Normal file
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;