@inlang/paraglide-js
Version:
[](https://inlang.com)
10 lines (9 loc) • 310 B
JavaScript
import path from "node:path";
const windowsSlashRE = /\\/g;
function slash(p) {
return p.replace(windowsSlashRE, "/");
}
const isWindows = typeof process !== "undefined" && process.platform === "win32";
export function nodeNormalizePath(id) {
return path.posix.normalize(isWindows ? slash(id) : id);
}