Function
shouldSetAsPropForVueCE
(el: VueElement, key: string)
Source from the content-addressed store, hash-verified
| 160 | } |
| 161 | |
| 162 | function 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 | } |
Tested by
no test coverage detected