Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// then map out the rest of the HTML properties
// e.g., { readOnly: 0 } => { readonly: 'readOnly' }
for (propertyName in HTMLDOMPropertyConfig.Properties) {
// lowercase to make matching property names easier
config.html[propertyName.toLowerCase()] = propertyName;
}
/**
* SVG DOM property config.
* https://github.com/facebook/react/blob/master/src/renderers/dom/shared/SVGDOMPropertyConfig.js
*/
// first map out the SVG attribute names
// e.g., { fontSize: 'font-size' } => { 'font-size': 'fontSize' }
config.svg = utilities.invertObject(
SVGDOMPropertyConfig.DOMAttributeNames
);
// then map out the rest of the SVG properties
// e.g., { fillRule: 0 } => { fillRule: 'fillRule' }
for (propertyName in SVGDOMPropertyConfig.Properties) {
// do not lowercase as some svg properties are camel cased
config.html[propertyName] = propertyName;
}
/**
* Export property configs.
*/
module.exports = {
config: config,
HTMLDOMPropertyConfig: HTMLDOMPropertyConfig,
SVGDOMPropertyConfig: SVGDOMPropertyConfig