Skip to content

normalizeFileUrl

Normalizes a file:// URL to a pretty form by converting backslashes to forward slashes. The URL is expected to already be decoded. Non-file:// URLs are returned unchanged.

Import:

import { normalizeFileUrl } from 'obsidian-dev-utils/url';

Signature:

function normalizeFileUrl(url: string): string

Parameters:

ParameterTypeDescription
urlstringThe URL to normalize.

Returns: string — The normalized URL.