Comparing version 1.0.0 to 1.0.1
export default function (obj) { | ||
let cls = ''; | ||
for (const k in obj) { | ||
var cls = ''; | ||
for (var k in obj) { | ||
if (obj[k]) { | ||
@@ -5,0 +5,0 @@ cls && (cls += ' '); |
module.exports = function (obj) { | ||
let cls = ''; | ||
for (const k in obj) { | ||
var cls = ''; | ||
for (var k in obj) { | ||
if (obj[k]) { | ||
@@ -5,0 +5,0 @@ cls && (cls += ' '); |
{ | ||
"name": "obj-str", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"repository": "lukeed/obj-str", | ||
@@ -5,0 +5,0 @@ "description": "A tiny library for serializing Object values to Strings.", |
# obj-str [![Build Status](https://travis-ci.org/lukeed/obj-str.svg?branch=master)](https://travis-ci.org/lukeed/obj-str) | ||
> A tiny (130b) library for serializing Object values to Strings. | ||
> A tiny (117b) library for serializing Object values to Strings. | ||
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 130 bytes gzipped! | ||
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 117 bytes gzipped! | ||
@@ -30,3 +30,3 @@ _PS: I made this because [Preact 8.0 removed this built-in behavior](https://github.com/developit/preact/commit/b2c85e3f7fa89ebbf242b00f4cab7619641e3a52) and I wanted a quick, drop-in replacement._ | ||
```js | ||
import React from ‘react’; | ||
import React from 'react'; | ||
import objstr from 'obj-str'; | ||
@@ -33,0 +33,0 @@ |
4674
6
21