mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 01:01:07 +03:30
12 lines
294 B
JavaScript
Vendored
12 lines
294 B
JavaScript
Vendored
'use strict';
|
|
module.exports = input => {
|
|
const isExtendedLengthPath = /^\\\\\?\\/.test(input);
|
|
const hasNonAscii = /[^\u0000-\u0080]+/.test(input); // eslint-disable-line no-control-regex
|
|
|
|
if (isExtendedLengthPath || hasNonAscii) {
|
|
return input;
|
|
}
|
|
|
|
return input.replace(/\\/g, '/');
|
|
};
|