📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-21 03:33:10
📂
/ (Root)
/
home
/
xeqi7597
/
cds.claireduwig.com
/
wp-content
/
plugins
/
generateblocks
/
src
/
utils
📍 /home/xeqi7597/cds.claireduwig.com/wp-content/plugins/generateblocks/src/utils
🔄 Refresh
✏️
Editing: convertInlineStyleStringToObject.js
Writable
export function convertInlineStyleStringToObject( styleString ) { return styleString.split( ';' ).reduce( ( acc, style ) => { const colonIndex = style.indexOf( ':' ); if ( colonIndex === -1 ) { return acc; } // Skip if there's no colon let key = style.slice( 0, colonIndex ).trim(); const value = style.slice( colonIndex + 1 ).trim(); if ( key && value ) { if ( key.startsWith( '--' ) ) { // It's a CSS custom property, keep the original format acc[ key ] = value; } else { // For regular CSS properties, convert to camelCase key = key.replace( /-([a-z])/g, ( g ) => g[ 1 ].toUpperCase() ); acc[ key ] = value; } } return acc; }, {} ); }
💾 Save Changes
❌ Cancel