Skip to content

toCanonical

Normalizes a file path for comparison: forward slashes everywhere, lower-cased on a case-insensitive file system.

Import:

import { toCanonical } from 'obsidian-dev-utils/script-utils/check-project-types';

Signature:

function toCanonical(fileName: string): string

Parameters:

ParameterTypeDescription
fileNamestringThe path to normalize.

Returns: string — The canonical path.