import { isFunction } from "./assertion.js";

//#region src/utils/function.ts
/** Calls each provided function with the same set of arguments. Useful for merging multiple callbacks. */
function callAll(...fns) {
	return (...args) => fns.forEach((fn) => typeof fn === "function" && fn(...args));
}
function noop() {}
/**
* If given value is a function, it's called with any additional arguments provided.
* Otherwise, the provided value is returned directly.
*/
function runIfFn(valueOrFn, ...args) {
	return isFunction(valueOrFn) ? valueOrFn(...args) : valueOrFn;
}

//#endregion
export { callAll, noop, runIfFn };
globalThis.__vuiVersion__ = "4.0.1"
//# sourceMappingURL=function.js.map