We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d9d4ef commit 5869175Copy full SHA for 5869175
src/utility.ts
@@ -40,14 +40,7 @@ export const Files = function (files: string | string[]): string {
40
* @return {string} A path with / for directory separator.
41
*/
42
export const ReplaceNativeSeparator = function (path: string): string {
43
- let result = path,
44
- next;
45
-
46
- while ((next = result.replace(nativeSeparator, '/')) !== result) {
47
- result = next;
48
- }
49
50
- return result;
+ return path.replace(new RegExp(`\\${nativeSeparator}`, 'g'), '/');
51
};
52
53
/**
0 commit comments