MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / find

Method find

packages/sdk/src/session.ts:321–335  ·  view source on GitHub ↗
(query: FindQuery)

Source from the content-addressed store, hash-verified

319 }
320
321 find(query: FindQuery): string[] {
322 return (
323 this.getElements()
324 // fallow-ignore-next-line complexity
325 .filter((el) => {
326 if (query.tag && el.tag !== query.tag) return false;
327 if (query.text && !el.text?.includes(query.text)) return false;
328 if (query.name && el.attributes["data-name"] !== query.name) return false;
329 if (query.track !== undefined && el.trackIndex !== query.track) return false;
330 if (query.composition && !el.scopedId.startsWith(`${query.composition}/`)) return false;
331 return true;
332 })
333 .map((el) => el.scopedId)
334 );
335 }
336
337 // ── Selection API ────────────────────────────────────────────────────────────
338

Callers

nothing calls this directly

Calls 1

getElementsMethod · 0.95

Tested by

no test coverage detected