UNPKG

css-variants

Version:

Lightweight helpers to compose class names and inline styles using variants. Zero runtime deps, small bundle, and first-class TypeScript support.

2 lines 505 B
function a(e){if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="bigint")return String(e);if(e==null||typeof e=="boolean")return "";let l="";if(Array.isArray(e)){let r=0,t,s;for(;r<e.length;r++)(t=e[r])&&(s=a(t))&&(l&&(l+=" "),l+=s);return l}for(let r in e)e[r]&&(l&&(l+=" "),l+=r);return l}function n(...e){let l="",r=0,t,s;for(;r<e.length;r++)(t=e[r])&&(s=a(t))&&(l&&(l+=" "),l+=s);return l}var f=n;export{n as cx,f as default};//# sourceMappingURL=cx.js.map //# sourceMappingURL=cx.js.map