Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports.transformStyleTuples = (
styleTuples /*: StyleTuples */,
appliedVariables /*: ?Variables */
) /*: Object */ => {
const transformedStyleTuples = styleTuples.map(([property, value]) => {
let transformedValue = value;
if (appliedVariables != null) {
transformedValue = transformVariables(transformedValue, appliedVariables);
}
transformedValue = transformColors(transformedValue);
return [property, transformedValue];
});
return cssToReactNative(transformedStyleTuples);
};
const styles = untransformedRules.map((rule) => {
const styleTuples = rule.styleTuples.map(([property, value]) => {
let transformedValue = value;
transformedValue = transformVariables(transformedValue, appliedVariables);
transformedValue = transformColors(transformedValue);
return [property, transformedValue];
});
return cssToReactNative(styleTuples);
});