UNPKG

@cbinsights/fds

Version:
28 lines (23 loc) 711 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; /* Allows you to combine functions */ var combine = function combine() { for (var _len = arguments.length, functions = new Array(_len), _key = 0; _key < _len; _key++) { functions[_key] = arguments[_key]; } return function () { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } functions.filter(function (func) { return typeof func === 'function'; }).forEach(function (func) { return func.apply(void 0, args); }); }; }; var _default = combine; exports.default = _default;