Skip to content

normalizePath

Normalizes a path so it can be used with the vault. The mock only turns backslashes into forward slashes, collapses repeated slashes and strips a leading or trailing slash.

Import:

import { normalizePath } from 'obsidian-test-mocks/obsidian';

Signature:

function normalizePath(path: string): string

Parameters:

Parameter Type Description
path string The path to normalize.

Returns: string — The normalized path.