MCPcopy Index your code
hub / github.com/fontsource/fontsource / getArrayMetadata

Function getArrayMetadata

api/metadata/src/fonts/get.ts:6–17  ·  view source on GitHub ↗
(env: Env, ctx: ExecutionContext)

Source from the content-addressed store, hash-verified

4import { updateArrayMetadata } from './update';
5
6const getArrayMetadata = async (env: Env, ctx: ExecutionContext) => {
7 const value = await env.METADATA.get<ArrayMetadata>(METADATA_KEYS.fonts_arr, {
8 type: 'json',
9 cacheTtl: KV_TTL,
10 });
11
12 if (!value) {
13 return await updateArrayMetadata(env, ctx);
14 }
15
16 return value;
17};
18
19const getId = async (id: string, env: Env, ctx: ExecutionContext) => {
20 const data = await getMetadata(env, ctx);

Callers 1

router.tsFile · 0.90

Calls 1

updateArrayMetadataFunction · 0.90

Tested by

no test coverage detected