(styles)
| 7 | const webkitPrefix = 'Webkit'; |
| 8 | |
| 9 | const 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 | |
| 22 | export default prefix; |
no outgoing calls
no test coverage detected