Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
primogenial
/
languages
/
wp-content
/
plugins
/
woocommerce
/
packages
/
woocommerce-blocks
/
assets
/
js
/
base
/
utils
:
parse-style.ts
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
/** * External dependencies */ import { isString, isObject } from '@woocommerce/types'; export const parseStyle = ( style: unknown ): Record< string, unknown > => { if ( isString( style ) ) { return JSON.parse( style ) || {}; } if ( isObject( style ) ) { return style; } return {}; };