@animaapp/framework-helpers
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -7,3 +7,4 @@ "use strict"; | ||
const getAntdTheme = (dsToken) => { | ||
return convertDesignTokensToTheme(dsToken); | ||
const cleanObj = addDollarSign(dsToken); | ||
return convertDesignTokensToTheme(cleanObj); | ||
}; | ||
@@ -91,1 +92,16 @@ exports.getAntdTheme = getAntdTheme; | ||
} | ||
function addDollarSign(obj) { | ||
const cleanedObj = {}; | ||
for (const prop in obj) { | ||
if (obj[prop]) { | ||
const cleanedProp = prop.replace(/^type$/, '$type').replace(/^value$/, '$value'); | ||
if (typeof obj[prop] === 'object' && obj[prop] !== null && !Array.isArray(obj[prop])) { | ||
cleanedObj[cleanedProp] = addDollarSign(obj[prop]); | ||
} | ||
else { | ||
cleanedObj[cleanedProp] = obj[prop]; | ||
} | ||
} | ||
} | ||
return cleanedObj; | ||
} |
{ | ||
"name": "@animaapp/framework-helpers", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
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
17687
295