Socket
Socket
Sign inDemoInstall

classnames

Package Overview
Dependencies
0
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.0 to 2.1.1

1

benchmarks/package.json

@@ -13,5 +13,4 @@ {

"devDependencies": {
"benchmark": "^1.0.0",
"classnames": "*"
}
}

12

benchmarks/run.js

@@ -30,2 +30,3 @@ var fixtures = [

var npm = require("classnames");
var npmDedupe = require("classnames/dedupe");
var npmPackage = require('./node_modules/classnames/package.json');

@@ -58,2 +59,3 @@ } catch(e) {

assert.equal(sortClasses(npm.apply(null, f.args)), sortClasses(f.expected));
assert.equal(sortClasses(npmDedupe.apply(null, f.args)), sortClasses(f.expected));

@@ -66,2 +68,6 @@ var suite = new benchmark.Suite();

suite.add(" npm#" + f.description, function() {
npm.apply(null, f.args);
});
suite.add("local/dedupe#" + f.description, function() {

@@ -71,4 +77,4 @@ dedupe.apply(null, f.args);

suite.add("npm#" + f.description, function() {
npm.apply(null, f.args);
suite.add(" npm/dedupe#" + f.description, function() {
npmDedupe.apply(null, f.args);
});

@@ -83,3 +89,3 @@

suite.on("complete", function() {
console.log("\n> Fastest is " + this.filter("fastest").pluck("name").join(' | ') + '\n');
console.log("\n> Fastest is" + (" " + this.filter("fastest").pluck("name").join(' | ')).replace(/\s+/, ' ') + '\n');
});

@@ -86,0 +92,0 @@

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

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

@@ -47,5 +47,6 @@ /*!

if (!arg) return;
var argType = typeof arg;
// 'foo bar'
if ('string' === typeof arg) {
if ('string' === argType) {
_parseString(resultSet, arg);

@@ -58,7 +59,7 @@

// { 'foo': true, ... }
} else if ('object' === typeof arg) {
} else if ('object' === argType) {
_parseObject(resultSet, arg);
// '130'
} else if ('number' === typeof arg) {
} else if ('number' === argType) {
_parseNumber(resultSet, arg);

@@ -65,0 +66,0 @@ }

# Changelog
## v2.1.1 / 2015-05-06
* minor performance improvement thanks to type caching
* improved benchmarking and results output
## v2.1.0 / 2015-05-05

@@ -4,0 +9,0 @@

@@ -16,3 +16,5 @@ /*!

if ('string' === typeof arg || 'number' === typeof arg) {
var argType = typeof arg;
if ('string' === argType || 'number' === argType) {
classes += ' ' + arg;

@@ -23,3 +25,3 @@

} else if ('object' === typeof arg) {
} else if ('object' === argType) {
for (var key in arg) {

@@ -26,0 +28,0 @@ if (arg.hasOwnProperty(key) && arg[key]) {

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

@@ -26,4 +26,5 @@ "main": "index.js",

"devDependencies": {
"benchmark": "^1.0.0",
"mocha": "^2.1.0"
}
}

@@ -24,3 +24,3 @@ Classnames

[Changelog](https://github.com/JedWatson/react-select/blob/master/HISTORY.md)
[Changelog](https://github.com/JedWatson/classnames/blob/master/HISTORY.md)

@@ -27,0 +27,0 @@ ## Usage

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc