Files
onenote-tools/src/source-file.ts

11 lines
377 B
TypeScript

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;
}