main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
294 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | 'use strict';
|
---|
| 2 | module.exports = input => {
|
---|
| 3 | const isExtendedLengthPath = /^\\\\\?\\/.test(input);
|
---|
| 4 | const hasNonAscii = /[^\u0000-\u0080]+/.test(input); // eslint-disable-line no-control-regex
|
---|
| 5 |
|
---|
| 6 | if (isExtendedLengthPath || hasNonAscii) {
|
---|
| 7 | return input;
|
---|
| 8 | }
|
---|
| 9 |
|
---|
| 10 | return input.replace(/\\/g, '/');
|
---|
| 11 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.