Add utility functions for value and class joining

This commit is contained in:
Natxo
2026-03-31 11:44:40 +02:00
committed by GitHub
parent e8d8993f01
commit ab01398878

5
src/core/utils.js Normal file
View File

@@ -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();