Skip to content

Commit 46d9a97

Browse files
committed
fix: do not use negative lookbehind for backward compatibility with node.js 8.6+
1 parent c191ecd commit 46d9a97

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/managers/patterns.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/**
22
* Matches a sequence of two or more consecutive slashes, excluding the first two slashes at the beginning of the string.
33
* The latter is due to the presence of the device path at the beginning of the UNC path.
4+
* @todo rewrite to negative lookbehind with the next major release.
45
*/
5-
const DOUBLE_SLASH_RE = /(?<!^)\/{2,}/g;
6+
const DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
67

78
export function transform(patterns: string[]): string[] {
89
return patterns.map((pattern) => removeDuplicateSlashes(pattern));

0 commit comments

Comments
 (0)