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

obj-str

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

obj-str - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

dist/obj-str.min.js

4

dist/obj-str.es.js
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 @@

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