MCPcopy
hub / github.com/algolia/autocomplete / createCollection

Function createCollection

test/utils/createCollection.ts:10–18  ·  view source on GitHub ↗
({
  source,
  items = [],
}: CreateCollectionParams<TItem>)

Source from the content-addressed store, hash-verified

8}>;
9
10export function createCollection<TItem extends Record<string, unknown>>({
11 source,
12 items = [],
13}: CreateCollectionParams<TItem>): AutocompleteCollection<TItem> {
14 return {
15 source: createSource<TItem>(source),
16 items,
17 };
18}

Callers 11

api.test.tsFile · 0.90
plugins.test.tsFile · 0.90
completion.test.tsFile · 0.90
setupTestWithItemFunction · 0.90
setupTestWithUrlItemsFunction · 0.90

Calls 1

createSourceFunction · 0.90

Tested by 4

setupTestWithItemFunction · 0.72
setupTestWithUrlItemsFunction · 0.72