MCPcopy
hub / github.com/berzniz/react-overdrive / prefix

Function prefix

src/prefix.js:9–20  ·  view source on GitHub ↗
(styles)

Source from the content-addressed store, hash-verified

7const webkitPrefix = 'Webkit';
8
9const prefix = (styles) => {
10 const prefixedStyles = {};
11 const styleProperties = Object.keys(styles || {});
12 styleProperties.forEach(property => {
13 if (propertiesToPrefix[property]) {
14 const prefixedProperty = webkitPrefix + property[0].toUpperCase() + property.slice(1);
15 prefixedStyles[prefixedProperty] = styles[property];
16 }
17 prefixedStyles[property] = styles[property];
18 });
19 return prefixedStyles;
20};
21
22export default prefix;

Callers 2

animateMethod · 0.85
prefix.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected