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

Function shouldSetAsPropForVueCE

packages/runtime-dom/src/patchProp.ts:162–173  ·  view source on GitHub ↗
(el: VueElement, key: string)

Source from the content-addressed store, hash-verified

160}
161
162function shouldSetAsPropForVueCE(el: VueElement, key: string) {
163 const props = // @ts-expect-error _def is private
164 el._def.props as Record<string, unknown> | string[] | undefined
165 if (!props) {
166 return false
167 }
168
169 const camelKey = camelize(key)
170 return Array.isArray(props)
171 ? props.some(prop => camelize(prop) === camelKey)
172 : Object.keys(props).some(prop => camelize(prop) === camelKey)
173}

Callers 1

patchPropFunction · 0.85

Calls 1

someMethod · 0.80

Tested by

no test coverage detected