MCPcopy Create free account
hub / github.com/cosscom/coss / getComponentsByNames

Function getComponentsByNames

apps/origin/lib/utils.ts:21–27  ·  view source on GitHub ↗
(names: string[])

Source from the content-addressed store, hash-verified

19};
20
21export const getComponentsByNames = (names: string[]): RegistryItem[] => {
22 const componentsMap = new Map(components.map((comp) => [comp.name, comp]));
23
24 return names
25 .map((name) => componentsMap.get(name))
26 .filter((comp): comp is RegistryItem => comp !== undefined);
27};
28
29export const getAvailableTags = (
30 selectedTags: RegistryTag[],

Callers 2

generateMetadataFunction · 0.90
PageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected