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 1.3.5 to 1.3.6

25

dist/index.esm.js
/**
* @author TroyTae
* @version 1.3.5
* @version 1.3.6
* @license MIT
* @name one-spaces
*/
function OneSpaces(args) {
var item, index = 0, str = '';
while (index < args.length) {
if (
(item = args[index++]) &&
(!item.pop || (item = OneSpaces(item)))
) {
str && (str += ' ');
str += item;
}
}
return str;
}
function index () {
return OneSpaces(arguments);
}
export default index;
function n(r){for(var t,e=0,o="";e<r.length;)!(t=r[e++])||t.pop&&!(t=n(t))||(o&&(o+=" "),o+=t);return o}export default function(){return n(arguments)}
/**
* @author TroyTae
* @version 1.3.5
* @version 1.3.6
* @license MIT
* @name one-spaces
*/
'use strict';
function OneSpaces(args) {
var item, index = 0, str = '';
while (index < args.length) {
if (
(item = args[index++]) &&
(!item.pop || (item = OneSpaces(item)))
) {
str && (str += ' ');
str += item;
}
}
return str;
}
function index () {
return OneSpaces(arguments);
}
module.exports = index;
function n(r){for(var o,t=0,e="";t<r.length;)!(o=r[t++])||o.pop&&!(o=n(o))||(e&&(e+=" "),e+=o);return e}module.exports=function(){return n(arguments)};

8

dist/one-spaces.js

@@ -1,1 +0,7 @@

var OneSpaces=function(){function n(r){for(var t,e=0,u="";e<r.length;)!(t=r[e++])||t.pop&&!(t=n(t))||(u&&(u+=" "),u+=t);return u}return function(){return n(arguments)}}();
/**
* @author TroyTae
* @version 1.3.6
* @license MIT
* @name one-spaces
*/
var OneSpaces=function(){"use strict";function n(r){for(var t,e=0,u="";e<r.length;)!(t=r[e++])||t.pop&&!(t=n(t))||(u&&(u+=" "),u+=t);return u}return function(){return n(arguments)}}();
{
"name": "one-spaces",
"version": "1.3.5",
"version": "1.3.6",
"description": "A tiny module for making className 😎",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

[![build](https://img.shields.io/github/workflow/status/TroyTae/one-spaces/one-spaces/master?style=flat-square)](https://github.com/TroyTae/one-spaces/actions?query=workflow%3Aone-spaces)
[![size](https://img.shields.io/github/size/TroyTae/one-spaces/dist/one-spaces.js?style=flat-square)](https://github.com/TroyTae/one-spaces/blob/master/dist/one-spaces.js)
[![npm](https://img.shields.io/npm/v/one-spaces?color=%23fb3e44&style=flat-square)](https://www.npmjs.com/package/one-spaces)

@@ -7,3 +6,5 @@ [![license](https://img.shields.io/github/license/TroyTae/one-spaces?style=flat-square)](https://github.com/TroyTae/one-spaces/blob/master/LICENSE)

# One Spaces
A tiny module for making className 😎
A tiny module for making className 😎
We are striving for the best performance and lightweight.
Please check our [benchmark](./benchmark)!!

@@ -36,6 +37,6 @@ ## Installation

// exclude falsy
el.className = OneSpaces('cls1', null, 'cls2', false && 'none', true && 'cls3');
el.className = OneSpaces('cls1', null, 'cls2', false && 'none', true && 'cls3', []);
// mix
el.className = OneSpaces(['cls1', 'cls2'], null, 'cls3');
// without module
// without one-spaces
el.className = 'cls1 cls2' + ' cls3';

@@ -42,0 +43,0 @@ ```

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