MCPcopy
hub / github.com/vuejs/core / toStyleMap

Function toStyleMap

packages/runtime-core/src/hydration.ts:922–933  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

920}
921
922function toStyleMap(str: string): Map<string, string> {
923 const styleMap: Map<string, string> = new Map()
924 for (const item of str.split(';')) {
925 let [key, value] = item.split(':')
926 key = key.trim()
927 value = value && value.trim()
928 if (key && value) {
929 styleMap.set(key, value)
930 }
931 }
932 return styleMap
933}
934
935function isMapEqual(a: Map<string, string>, b: Map<string, string>): boolean {
936 if (a.size !== b.size) {

Callers 1

propHasMismatchFunction · 0.85

Calls 1

setMethod · 0.45

Tested by

no test coverage detected