Comparing version 1.2.0 to 1.2.1
@@ -1,44 +0,1 @@ | ||
function toVal(mix) { | ||
var k, y, str=''; | ||
if (typeof mix === 'string' || typeof mix === 'number') { | ||
str += mix; | ||
} else if (typeof mix === 'object') { | ||
if (Array.isArray(mix)) { | ||
for (k=0; k < mix.length; k++) { | ||
if (mix[k]) { | ||
if (y = toVal(mix[k])) { | ||
str && (str += ' '); | ||
str += y; | ||
} | ||
} | ||
} | ||
} else { | ||
for (k in mix) { | ||
if (mix[k]) { | ||
str && (str += ' '); | ||
str += k; | ||
} | ||
} | ||
} | ||
} | ||
return str; | ||
} | ||
function clsx() { | ||
var i=0, tmp, x, str=''; | ||
while (i < arguments.length) { | ||
if (tmp = arguments[i++]) { | ||
if (x = toVal(tmp)) { | ||
str && (str += ' '); | ||
str += x | ||
} | ||
} | ||
} | ||
return str; | ||
} | ||
module.exports = clsx; | ||
exports.clsx = clsx; | ||
function e(r){var o,t,f="";if("string"==typeof r||"number"==typeof r)f+=r;else if("object"==typeof r)if(Array.isArray(r))for(o=0;o<r.length;o++)r[o]&&(t=e(r[o]))&&(f&&(f+=" "),f+=t);else for(o in r)r[o]&&(f&&(f+=" "),f+=o);return f}function r(){for(var r,o,t=0,f="";t<arguments.length;)(r=arguments[t++])&&(o=e(r))&&(f&&(f+=" "),f+=o);return f}module.exports=r,module.exports.clsx=r; |
@@ -1,42 +0,1 @@ | ||
function toVal(mix) { | ||
var k, y, str=''; | ||
if (typeof mix === 'string' || typeof mix === 'number') { | ||
str += mix; | ||
} else if (typeof mix === 'object') { | ||
if (Array.isArray(mix)) { | ||
for (k=0; k < mix.length; k++) { | ||
if (mix[k]) { | ||
if (y = toVal(mix[k])) { | ||
str && (str += ' '); | ||
str += y; | ||
} | ||
} | ||
} | ||
} else { | ||
for (k in mix) { | ||
if (mix[k]) { | ||
str && (str += ' '); | ||
str += k; | ||
} | ||
} | ||
} | ||
} | ||
return str; | ||
} | ||
export function clsx() { | ||
var i=0, tmp, x, str=''; | ||
while (i < arguments.length) { | ||
if (tmp = arguments[i++]) { | ||
if (x = toVal(tmp)) { | ||
str && (str += ' '); | ||
str += x | ||
} | ||
} | ||
} | ||
return str; | ||
} | ||
export default clsx; | ||
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}export function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}export default clsx; |
@@ -1,1 +0,1 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.clsx=n()}(this,(function(){function e(n){var t,f,o="";if("string"==typeof n||"number"==typeof n)o+=n;else if("object"==typeof n)if(Array.isArray(n))for(t=0;t<n.length;t++)n[t]&&(f=e(n[t]))&&(o&&(o+=" "),o+=f);else for(t in n)n[t]&&(o&&(o+=" "),o+=t);return o}function n(){for(var n,t,f=0,o="";f<arguments.length;)(n=arguments[f++])&&(t=e(n))&&(o&&(o+=" "),o+=t);return o}return n})); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.clsx=n()}(this,(function(){function e(n){var t,f,o="";if("string"==typeof n||"number"==typeof n)o+=n;else if("object"==typeof n)if(Array.isArray(n))for(t=0;t<n.length;t++)n[t]&&(f=e(n[t]))&&(o&&(o+=" "),o+=f);else for(t in n)n[t]&&(o&&(o+=" "),o+=t);return o}function n(){for(var n,t,f=0,o="";f<arguments.length;)(n=arguments[f++])&&(t=e(n))&&(o&&(o+=" "),o+=t);return o}return n.clsx=n,n})); |
{ | ||
"name": "clsx", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"repository": "lukeed/clsx", | ||
@@ -20,3 +20,3 @@ "description": "A tiny (228B) utility for constructing className strings conditionally.", | ||
"scripts": { | ||
"build": "bundt", | ||
"build": "node bin", | ||
"test": "uvu -r esm test" | ||
@@ -34,6 +34,6 @@ }, | ||
"devDependencies": { | ||
"bundt": "1.0.1", | ||
"esm": "3.2.25", | ||
"terser": "4.8.0", | ||
"uvu": "0.5.4" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5671
5
1