Comparing version
module.exports = function (obj) { | ||
let cls = ''; | ||
for (const k in obj) { | ||
var k, cls=''; | ||
for (k in obj) { | ||
if (obj[k]) { | ||
@@ -5,0 +5,0 @@ cls && (cls += ' '); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.objstr=t()}(this,function(){return function(n){let o="";for(const t in n)n[t]&&(o&&(o+=" "),o+=t);return o};}); | ||
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=function(n){var e,o="";for(e in n)n[e]&&(o&&(o+=" "),o+=e);return o}:"function"==typeof define&&define.amd?define(e):n.objstr=function(n){var e,o="";for(e in n)n[e]&&(o&&(o+=" "),o+=e);return o}}(this,function(){return function(n){var e,o="";for(e in n)n[e]&&(o&&(o+=" "),o+=e);return o}}); |
{ | ||
"name": "obj-str", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"repository": "lukeed/obj-str", | ||
@@ -20,4 +20,4 @@ "description": "A tiny library for serializing Object values to Strings.", | ||
"scripts": { | ||
"build": "node builder", | ||
"pretest": "node builder", | ||
"build": "bundt", | ||
"pretest": "npm run build", | ||
"test": "tape test/*.js | tap-spec" | ||
@@ -41,9 +41,6 @@ }, | ||
"devDependencies": { | ||
"gzip-size": "^5.0.0", | ||
"mk-dirs": "^1.0.0", | ||
"pretty-bytes": "^5.1.0", | ||
"bundt": "^0.1.1", | ||
"tap-spec": "^4.1.1", | ||
"tape": "^4.6.3", | ||
"terser": "^3.13.1" | ||
"tape": "^4.6.3" | ||
} | ||
} |
# obj-str [](https://travis-ci.org/lukeed/obj-str) | ||
> A tiny (100B) library for serializing Object values to Strings. | ||
> A tiny (96B) library for serializing Object values to Strings. | ||
@@ -5,0 +5,0 @@ This module's intended use is for converting an Object with CSS class names (as keys) to a space-delimited `className` string. Other modules have similar goals (like [`classnames`](https://npm.im/classnames)), but `obj-str` only does one thing. This is why it's only 100 bytes gzipped! |
Sorry, the diff of this file is not supported yet
5023
0.48%3
-50%