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

Function listSubsetIds

registry/scripts/validator.ts:522–529  ·  view source on GitHub ↗
(root: string)

Source from the content-addressed store, hash-verified

520};
521
522export const listSubsetIds = async (root: string): Promise<string[]> => {
523 const subsetsRoot = join(root, 'subsets');
524 if (!(await pathExists(subsetsRoot))) return [];
525 return (await readdir(subsetsRoot))
526 .filter((filename) => filename.endsWith('.json'))
527 .map((filename) => filename.slice(0, -5))
528 .toSorted(compareStrings);
529};
530
531export const validateRegistry = async (root: string): Promise<void> => {
532 await validateCanonicalJson(join(root, 'upstreams.json'), upstreamsSchema);

Callers 2

createArchivePlanFunction · 0.90
validateRegistryFunction · 0.85

Calls 1

pathExistsFunction · 0.90

Tested by

no test coverage detected