From ab013988780940bc3efc7142e1173d1c87512c94 Mon Sep 17 00:00:00 2001 From: Natxo <1172351+natxocc@users.noreply.github.com> Date: Tue, 31 Mar 2026 11:44:40 +0200 Subject: [PATCH] Add utility functions for value and class joining --- src/core/utils.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/core/utils.js diff --git a/src/core/utils.js b/src/core/utils.js new file mode 100644 index 0000000..02aca9c --- /dev/null +++ b/src/core/utils.js @@ -0,0 +1,5 @@ +export const val = t => typeof t === "function" ? t() : t; + +export const joinClass = (t, l) => typeof l === "function" + ? () => `${t} ${l() || ""}`.trim() + : `${t} ${l || ""}`.trim();