jest-regex-util
Advanced tools
Comparing version 29.0.0 to 29.2.0
@@ -10,5 +10,3 @@ 'use strict'; | ||
void 0; | ||
var _path = require('path'); | ||
/** | ||
@@ -21,2 +19,3 @@ * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||
*/ | ||
const escapePathForRegex = dir => { | ||
@@ -28,13 +27,8 @@ if (_path.sep === '\\') { | ||
} | ||
return replacePathSepForRegex(escapeStrForRegex(dir)); | ||
}; | ||
exports.escapePathForRegex = escapePathForRegex; | ||
const escapeStrForRegex = string => | ||
string.replace(/[[\]{}()*+?.\\^$|]/g, '\\$&'); | ||
exports.escapeStrForRegex = escapeStrForRegex; | ||
const replacePathSepForRegex = string => { | ||
@@ -47,6 +41,4 @@ if (_path.sep === '\\') { | ||
} | ||
return string; | ||
}; | ||
exports.replacePathSepForRegex = replacePathSepForRegex; |
{ | ||
"name": "jest-regex-util", | ||
"version": "29.0.0", | ||
"version": "29.2.0", | ||
"repository": { | ||
@@ -28,3 +28,3 @@ "type": "git", | ||
}, | ||
"gitHead": "75006e46c76f6fda14bbc0548f86edb2ba087cd2" | ||
"gitHead": "ee5b37a4f4433afcfffb0356cea47739d8092287" | ||
} |
3572