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

classnames

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

classnames - npm Package Compare versions

Comparing version 2.2.3 to 2.2.4

24

dedupe.js

@@ -29,7 +29,5 @@ /*!

if (hasOwn.call(object, k)) {
if (object[k]) {
resultSet[k] = true;
} else {
delete resultSet[k];
}
// set value to false instead of deleting it to avoid changing object structure
// https://www.smashingmagazine.com/2012/11/writing-fast-memory-efficient-javascript/#de-referencing-misconceptions
resultSet[k] = !!object[k];
}

@@ -72,9 +70,19 @@ }

function _classNames () {
var classSet = {};
_parseArray(classSet, arguments);
// don't leak arguments
// https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
var len = arguments.length;
var args = Array(len);
for (var i = 0; i < len; i++) {
args[i] = arguments[i];
}
// don't inherit from Object so we can skip hasOwnProperty check later
// http://stackoverflow.com/questions/15518328/creating-js-object-with-object-createnull#answer-21079232
var classSet = Object.create(null);
_parseArray(classSet, args);
var list = [];
for (var k in classSet) {
if (hasOwn.call(classSet, k) && classSet[k]) {
if (classSet[k]) {
list.push(k)

@@ -81,0 +89,0 @@ }

# Changelog
## v2.2.4 / 2016-04-25
* Improved performance of `dedupe` variant by about 2x, thanks [Bartosz Gościński](https://github.com/bgoscinski)
## v2.2.3 / 2016-01-05

@@ -4,0 +8,0 @@

{
"name": "classnames",
"version": "2.2.3",
"version": "2.2.4",
"description": "A simple utility for conditionally joining classNames together",

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

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