Kind: Class
Source: atloria-monorepo/packages/doc-automation/src/v2/stages/stage-01-parse/large-file-indexer.ts
Large File Indexer - Creates indexes for files >500KB
Methods
| Method | Signature | Returns |
|---|---|---|
isLargeFile | isLargeFile(filePath: string) | Promise<boolean> |
createIndex | createIndex(filePath: string) | Promise<LargeFileIndex> |
Where it refuses work
LargeFileIndexerstops the work with an early return whenfirstLines.includes(marker).LargeFileIndexerstops the work with an early return whenpattern.test(fileName).LargeFileIndexerstops the work with an early return whenfilePath.includes(dirPattern).LargeFileIndexerstops the work with an early return whenpattern.test(code).LargeFileIndexerstops the work with an early return whenfoundOpen && braceCount === 0.LargeFileIndexerstops the work with an early return whenmatch.
When something fails
LargeFileIndexerhandles failure in 1 place: it turns it into a return value in all 1.
Was this page helpful?