feat: add local OneNote and ONEPKG reader
This commit is contained in:
10
src/source-file.ts
Normal file
10
src/source-file.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import type { SourceKind } from './worker/onenote.client.js';
|
||||
|
||||
export const MAX_SOURCE_FILE_BYTES = 512 * 1024 * 1024;
|
||||
|
||||
export function sourceKindFromFileName(fileName: string): SourceKind | null {
|
||||
const normalized = fileName.toLocaleLowerCase('en-US');
|
||||
if (normalized.endsWith('.onepkg')) return 'onepkg';
|
||||
if (normalized.endsWith('.one')) return 'one';
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user