const registry = new Map();
export function registerFormatter(ext, fn) {
    registry.set(ext.toLowerCase(), fn);
}
export function getFormatterForPath(relPath) {
    const normalizedPath = (relPath || '').toLowerCase();
    for (const [ext, fn] of registry.entries()) {
        if (normalizedPath.endsWith(ext))
            return fn;
    }
    return null;
}
//# sourceMappingURL=formatter-registry.js.map