Comparing version 0.1.1 to 0.1.2
@@ -121,29 +121,38 @@ /** | ||
else { | ||
for (var _prop in style) { | ||
var _value = style[_prop]; | ||
if (disableMix) { | ||
if (inlineStyle == null) { | ||
inlineStyle = {}; | ||
} | ||
if (_value !== undefined) { | ||
if (disableMix) { | ||
if (inlineStyle == null) { | ||
inlineStyle = {}; | ||
} // Only set the value if it hasn't already been set | ||
inlineStyle = Object.assign({}, style, inlineStyle); | ||
} else { | ||
var subStyle = null; | ||
for (var _prop in style) { | ||
var _value = style[_prop]; | ||
if (inlineStyle[_prop] === undefined) { | ||
inlineStyle[_prop] = _value; | ||
} | ||
} else if (!definedProperties.includes(_prop)) { | ||
if (_value != null) { | ||
if (inlineStyle == null) { | ||
inlineStyle = {}; | ||
if (_value !== undefined) { | ||
if (!definedProperties.includes(_prop)) { | ||
if (_value != null) { | ||
if (inlineStyle == null) { | ||
inlineStyle = {}; | ||
} | ||
if (subStyle == null) { | ||
subStyle = {}; | ||
} | ||
subStyle[_prop] = _value; | ||
} | ||
inlineStyle[_prop] = _value; | ||
definedProperties.push(_prop); // Cache is unnecessary overhead if results can't be reused. | ||
nextCache = null; | ||
} | ||
definedProperties.push(_prop); // Cache is unnecessary overhead if results can't be reused. | ||
nextCache = null; | ||
} | ||
} | ||
if (subStyle != null) { | ||
inlineStyle = Object.assign(subStyle, inlineStyle); | ||
} | ||
} | ||
@@ -150,0 +159,0 @@ } |
{ | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"name": "styleq", | ||
@@ -4,0 +4,0 @@ "main": "styleq.js", |
@@ -10,3 +10,3 @@ /** | ||
type CompiledStyle = { | ||
export type CompiledStyle = { | ||
$$css: boolean, | ||
@@ -16,10 +16,10 @@ [key: string]: string, | ||
type InlineStyle = { | ||
[key: string]: mixed, | ||
export type InlineStyle = { | ||
[key: string]: number | string, | ||
}; | ||
type EitherStyle = CompiledStyle | InlineStyle; | ||
export type EitherStyle = CompiledStyle | InlineStyle; | ||
export type StylesArray<+T> = T | $ReadOnlyArray<StylesArray<T>>; | ||
export type Styles = StylesArray<CompiledStyle | InlineStyle | false>; | ||
export type Styles = StylesArray<EitherStyle | false | void>; | ||
export type Style<+T = EitherStyle> = StylesArray<false | ?T>; | ||
@@ -30,3 +30,3 @@ | ||
disableMix?: boolean, | ||
transform?: (CompiledStyle) => CompiledStyle, | ||
transform?: (EitherStyle) => EitherStyle, | ||
}; | ||
@@ -33,0 +33,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
28144
237