frontend/.pnpm-store/v3/files/1f/57d26398c1b52d3dce7da110ab34357cb3ee25b9fa066ad13789dee95fcf74bb7967d0f18ac78d3ef34bdd223587271f474215236a1c001c304332f28ce185

11 lines
285 B
Plaintext

export default function slash(path) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path);
const hasNonAscii = /[^\u0000-\u0080]+/.test(path); // eslint-disable-line no-control-regex
if (isExtendedLengthPath || hasNonAscii) {
return path;
}
return path.replace(/\\/g, '/');
}