@nozbe/zacs
Advanced tools
Comparing version 2.0.0-6 to 2.0.0-7
{ | ||
"name": "@nozbe/zacs", | ||
"version": "2.0.0-6", | ||
"version": "2.0.0-7", | ||
"description": "Zero Abstraction Cost Styling (for React DOM and React Native)", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -80,2 +80,16 @@ const { getTarget } = require('./state') | ||
} | ||
const pushFromObject = object => { | ||
Object.entries(object).forEach(([key, value]) => { | ||
pushProp(t.objectProperty(t.identifier(key), value)) | ||
}) | ||
} | ||
const pushPropOrShorthands = property => { | ||
const key = property.key.name | ||
const shorthandLines = resolveShorthands(key, property.value) | ||
if (shorthandLines) { | ||
pushFromObject(shorthandLines) | ||
} else { | ||
pushProp(property) | ||
} | ||
} | ||
const pushFromInner = objectExpr => { | ||
@@ -90,11 +104,6 @@ objectExpr.properties.forEach(property => { | ||
} else { | ||
pushProp(property) | ||
pushPropOrShorthands(property) | ||
} | ||
}) | ||
} | ||
const pushFromObject = object => { | ||
Object.entries(object).forEach(([key, value]) => { | ||
pushProp(t.objectProperty(t.identifier(key), value)) | ||
}) | ||
} | ||
styleset.value.properties.forEach(property => { | ||
@@ -118,8 +127,3 @@ if (property.type === 'SpreadElement') { | ||
} else { | ||
const shorthandLines = resolveShorthands(key, property.value) | ||
if (shorthandLines) { | ||
pushFromObject(shorthandLines) | ||
} else { | ||
pushProp(property) | ||
} | ||
pushPropOrShorthands(property) | ||
} | ||
@@ -126,0 +130,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
128376
3443