2025-09-05 14:59:21 +08:00

10 lines
181 B
JavaScript

export default function slash(path) {
const isExtendedLengthPath = path.startsWith('\\\\?\\');
if (isExtendedLengthPath) {
return path;
}
return path.replace(/\\/g, '/');
}