UNPKG

@julo-ui/function-utils

Version:

Function Utilities across Julo UI package

40 lines (36 loc) 1.33 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/run-if-fn.ts var run_if_fn_exports = {}; __export(run_if_fn_exports, { default: () => run_if_fn_default }); module.exports = __toCommonJS(run_if_fn_exports); // src/is-fn.ts function isFn(value) { return typeof value === "function"; } var is_fn_default = isFn; // src/run-if-fn.ts function runIfFn(valueOrFn, ...args) { return is_fn_default(valueOrFn) ? valueOrFn(...args) : valueOrFn; } var run_if_fn_default = runIfFn; // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = {});