Files
starface-outlook-sync-addin/node_modules/@fluentui/utilities/lib/appendFunction.js
T
Stefan Hacker 37ad745546 first commit
2026-04-03 09:38:48 +02:00

22 lines
686 B
JavaScript

/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* Returns a single function which will call each of the given functions in the context of the
* parent.
*/
export function appendFunction(parent) {
var functions = [];
for (var _i = 1; _i < arguments.length; _i++) {
functions[_i - 1] = arguments[_i];
}
if (functions.length < 2) {
return functions[0];
}
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
functions.forEach(function (f) { return f && f.apply(parent, args); });
};
}
//# sourceMappingURL=appendFunction.js.map