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

Function extractKeys

packages/runtime-core/src/customFormatter.ts:167–179  ·  view source on GitHub ↗
(instance: ComponentInternalInstance, type: string)

Source from the content-addressed store, hash-verified

165 }
166
167 function extractKeys(instance: ComponentInternalInstance, type: string) {
168 const Comp = instance.type
169 if (isFunction(Comp)) {
170 return
171 }
172 const extracted: Record<string, any> = {}
173 for (const key in instance.ctx) {
174 if (isKeyOfType(Comp, key, type)) {
175 extracted[key] = instance.ctx[key]
176 }
177 }
178 return extracted
179 }
180
181 function isKeyOfType(Comp: ComponentOptions, key: string, type: string) {
182 const opts = Comp[type]

Callers 1

formatInstanceFunction · 0.85

Calls 2

isFunctionFunction · 0.90
isKeyOfTypeFunction · 0.85

Tested by

no test coverage detected