one-spaces
Advanced tools
Comparing version 0.6.3 to 0.7.1
/** | ||
* @author TroyTae | ||
* @version 0.6.3 | ||
* @version 0.7.1 | ||
* @name one-spaces | ||
@@ -19,10 +19,18 @@ */ | ||
if (typeof argument === OBJECT_TYPE_LITERAL) { | ||
for (k in argument) { | ||
if (argument[k]) { | ||
className += (' ' + k); | ||
if (Array.isArray(argument)) { | ||
k = argument.length; | ||
while (k--) { | ||
className += " " + OneSpaces(argument[k]); | ||
} | ||
} | ||
else { | ||
for (k in argument) { | ||
if (argument[k]) { | ||
className += " " + k; | ||
} | ||
} | ||
} | ||
} | ||
else { | ||
className += (' ' + argument); | ||
className += " " + argument; | ||
} | ||
@@ -29,0 +37,0 @@ } |
@@ -1,1 +0,1 @@ | ||
var OneSpaces=function(){"use strict";var r="object";return function(){for(var e,n,t=[],f=0;f<arguments.length;f++)t[f]=arguments[f];for(var o="",a=arguments.length;a--;)if(typeof(n=arguments[a])===r)for(e in n)n[e]&&(o+=" "+e);else o+=" "+n;return o}}(); | ||
var OneSpaces=function(){"use strict";var r="object";return function e(){for(var n,t,f=[],o=0;o<arguments.length;o++)f[o]=arguments[o];for(var a="",i=arguments.length;i--;)if(typeof(t=arguments[i])===r)if(Array.isArray(t))for(n=t.length;n--;)a+=" "+e(t[n]);else for(n in t)t[n]&&(a+=" "+n);else a+=" "+t;return a}}(); |
{ | ||
"name": "one-spaces", | ||
"version": "0.6.3", | ||
"version": "0.7.1", | ||
"description": "A tiny module for making className 😎", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -13,9 +13,16 @@ type Arguments = Array<string | object | Arguments>; | ||
if (typeof argument === OBJECT_TYPE_LITERAL) { | ||
for (k in argument) { | ||
if (argument[k]) { | ||
className += (' ' + k); | ||
if (Array.isArray(argument)) { | ||
k = argument.length; | ||
while (k--) { | ||
className += ` ${OneSpaces(argument[k])}`; | ||
} | ||
} else { | ||
for (k in argument) { | ||
if (argument[k]) { | ||
className += ` ${k}`; | ||
} | ||
} | ||
} | ||
} else { | ||
className += (' ' + argument); | ||
className += ` ${argument}`; | ||
} | ||
@@ -22,0 +29,0 @@ } |
Sorry, the diff of this file is not supported yet
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
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
8770
106