class-styles
Advanced tools
Comparing version 1.0.0-rc.4 to 1.0.0-rc.5
# Changelog | ||
## v1.0.0-rc.5 | ||
Removed non-ES5 code for use in all environments. | ||
## v1.0.0-rc.3 | ||
@@ -4,0 +8,0 @@ |
23
index.js
@@ -16,7 +16,7 @@ /*! | ||
// underlying values | ||
var isInheritValue = (value) => ( | ||
value === undefined || value === null || typeof value === 'boolean' || value === '' | ||
) | ||
function isInheritValue (value) { | ||
return (value === undefined || value === null || typeof value === 'boolean' || value === '') | ||
} | ||
var onlyInheritable = (object) => { | ||
function onlyInheritable (object) { | ||
var result = {} | ||
@@ -62,9 +62,14 @@ | ||
return styles.reduce( | ||
(result, style) => (typeof style === 'object' // else, it's an array | ||
? objectAssign(result, onlyInheritable(style)) | ||
: objectAssign(result, stylesArray.reduce( | ||
(keyResult, thisStyle) => objectAssign(keyResult, onlyInheritable(thisStyle[style])), | ||
function (result, style) { | ||
return ( | ||
typeof style === 'object' // else, it's an array | ||
? objectAssign(result, onlyInheritable(style)) | ||
: objectAssign(result, stylesArray.reduce( | ||
function (keyResult, thisStyle) { | ||
return objectAssign(keyResult, onlyInheritable(thisStyle[style])) | ||
}, | ||
{} | ||
)) | ||
), {}) | ||
) | ||
}, {}) | ||
} | ||
@@ -71,0 +76,0 @@ |
{ | ||
"name": "class-styles", | ||
"version": "1.0.0-rc.4", | ||
"version": "1.0.0-rc.5", | ||
"description": "A simple utility for folding style objects like css classes", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
5453
71