MCPcopy Create free account
hub / github.com/fontsource/fontsource / getList

Function getList

api/metadata/src/fontlist/get.ts:21–36  ·  view source on GitHub ↗
(
	key: FontlistQueries,
	env: Env,
	ctx: ExecutionContext,
)

Source from the content-addressed store, hash-verified

19};
20
21const getList = async (
22 key: FontlistQueries,
23 env: Env,
24 ctx: ExecutionContext,
25): Promise<Fontlist> => {
26 const value = await env.METADATA.get<Fontlist>(METADATA_KEYS.fontlist(key), {
27 type: 'json',
28 cacheTtl: KV_TTL,
29 });
30
31 if (!value) {
32 return await updateList(key, env, ctx);
33 }
34
35 return value;
36};
37
38export { getList, getMetadata };

Callers 1

router.tsFile · 0.90

Calls 1

updateListFunction · 0.90

Tested by

no test coverage detected