MCPcopy Create free account
hub / github.com/streetsidesoftware/cspell / loadFileList

Function loadFileList

packages/cspell-glob/src/perf/loadFileList.ts:22–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20}
21
22export async function loadFileList(): Promise<FileEntry[]> {
23 const fileList = (await fs.readFile(new URL('file-list.txt', fixturesDataUrl), 'utf8'))
24 .split('\n')
25 .map((a) => a.trim())
26 .filter((a) => a)
27 .map((file) => Path.resolve(cwd, file))
28 .map((file) => file.split(';'))
29 .map(([filename, matcherId, match]) => ({
30 filename,
31 matcherId: Number.parseInt(matcherId, 10),
32 match: match === 'true',
33 }));
34
35 return fileList;
36}
37
38export async function loadPatterns(): Promise<TestPattern[]> {
39 const raw = await fs.readFile(new URL('patterns.jsonc', fixturesDataUrl), 'utf8');

Callers 2

match.test.tsFile · 0.90
match.perf.tsFile · 0.90

Calls 4

readFileMethod · 0.65
resolveMethod · 0.65
mapMethod · 0.45
filterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…