MCPcopy Index your code
hub / github.com/cameri/nostream / inferCompressedFormat

Function inferCompressedFormat

src/import-events.ts:113–125  ·  view source on GitHub ↗
(absolutePath: string)

Source from the content-addressed store, hash-verified

111}
112
113const inferCompressedFormat = (absolutePath: string): ImportFileFormat | undefined => {
114 const normalized = absolutePath.toLowerCase()
115
116 if (normalized.endsWith('.jsonl.gz') || normalized.endsWith('.jsonl.xz')) {
117 return 'jsonl'
118 }
119
120 if (normalized.endsWith('.json.gz') || normalized.endsWith('.json.xz')) {
121 return 'json'
122 }
123
124 return undefined
125}
126
127const ensureValidInputFile = async (filePath: string): Promise<InputFileSpec> => {
128 const absolutePath = resolve(process.cwd(), filePath)

Callers 1

ensureValidInputFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected