Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

one-spaces

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

one-spaces - npm Package Compare versions

Comparing version 0.6.3 to 0.7.1

18

dist/index.js
/**
* @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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc