download
raw
520 Bytes
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createChainedFunction;
/**
* Safe chained function.
*
* Will only create a new function if needed,
* otherwise will pass back existing functions or null.
*/
function createChainedFunction(...funcs) {
return funcs.reduce((acc, func) => {
if (func == null) {
return acc;
}
return function chainedFunction(...args) {
acc.apply(this, args);
func.apply(this, args);
};
}, () => {});
}

Xet Storage Details

Size:
520 Bytes
·
Xet hash:
c3fee6d1d1476855e44e78c4f38f782de22f114ac4ae7bbb3c402c4b5ab44c93

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