/**
 * @license MIT
 * author: Cube Dev Team
 * @cube-dev/ui-kit v0.0.0-canary-6b06f3c
 * Released under the MIT license.
 */

/**
 * Calls all functions in the order they were chained with the same arguments.
 */
export function chain(...callbacks) {
    return (...args) => {
        for (let callback of callbacks) {
            if (typeof callback === 'function') {
                callback(...args);
            }
        }
    };
}

        