UNPKG

@mintlify/common

Version:

Commonly shared code within Mintlify

10 lines (9 loc) 290 B
const WINDOWS_SEPARATOR = '\\'; /** * Converts a file path to use POSIX forward slashes. * On Windows, `path.relative()` and similar return backslashes; * this utility normalizes them. */ export function toPosixPath(filePath) { return filePath.replaceAll(WINDOWS_SEPARATOR, '/'); }