classnames
Advanced tools
Comparing version 1.2.2 to 2.0.0
@@ -16,6 +16,5 @@ /*! | ||
} | ||
if ('string' === typeof arg || 'number' === typeof arg) { | ||
classes += ' ' + arg; | ||
} else if (Object.prototype.toString.call(arg) === '[object Array]') { | ||
} else if (Array.isArray(arg)) { | ||
classes += ' ' + classNames.apply(null, arg); | ||
@@ -22,0 +21,0 @@ } else if ('object' === typeof arg) { |
{ | ||
"name": "classnames", | ||
"version": "1.2.2", | ||
"version": "2.0.0", | ||
"description": "A simple utility for conditionally joining classNames together", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -37,2 +37,9 @@ Classnames | ||
## Polyfills needed to support older browsers | ||
#### `classNames >=2.0.0` | ||
`Array.isArray`: see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray) | ||
for details about unsupported older browsers (e.g. <= IE8) and a simple polyfill. | ||
## License | ||
@@ -39,0 +46,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9189
10
68