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

Function hasProp

packages/compiler-core/src/utils.ts:477–488  ·  view source on GitHub ↗
(prop: Property, props: ObjectExpression)

Source from the content-addressed store, hash-verified

475
476// check existing key to avoid overriding user provided keys
477function hasProp(prop: Property, props: ObjectExpression) {
478 let result = false
479 if (prop.key.type === NodeTypes.SIMPLE_EXPRESSION) {
480 const propKeyName = prop.key.content
481 result = props.properties.some(
482 p =>
483 p.key.type === NodeTypes.SIMPLE_EXPRESSION &&
484 p.key.content === propKeyName,
485 )
486 }
487 return result
488}
489
490export function toValidAssetId(
491 name: string,

Callers 1

injectPropFunction · 0.85

Calls 1

someMethod · 0.80

Tested by

no test coverage detected