jest-regex-util
Advanced tools
Comparing version 22.1.0 to 22.4.3
@@ -1,12 +0,14 @@ | ||
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.replacePathSepForRegex = exports.escapeStrForRegex = exports.escapePathForRegex = undefined; | ||
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.replacePathSepForRegex = exports.escapeStrForRegex = exports.escapePathForRegex = undefined; | ||
var _path = require('path'); | ||
var _path2 = _interopRequireDefault(_path); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var _path = require('path');var _path2 = _interopRequireDefault(_path);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} | ||
const escapePathForRegex = exports.escapePathForRegex = dir => { | ||
@@ -26,5 +28,11 @@ if (_path2.default.sep === '\\') { | ||
* | ||
*/const escapeStrForRegex = exports.escapeStrForRegex = string => string.replace(/[[\]{}()*+?.\\^$|]/g, '\\$&');const replacePathSepForRegex = exports.replacePathSepForRegex = string => {if (_path2.default.sep === '\\') {return string.replace(/(\/|\\(?!\.))/g, '\\\\'); | ||
*/ | ||
const escapeStrForRegex = exports.escapeStrForRegex = string => string.replace(/[[\]{}()*+?.\\^$|]/g, '\\$&'); | ||
const replacePathSepForRegex = exports.replacePathSepForRegex = string => { | ||
if (_path2.default.sep === '\\') { | ||
return string.replace(/(\/|\\(?!\.))/g, '\\\\'); | ||
} | ||
return string; | ||
}; |
{ | ||
"name": "jest-regex-util", | ||
"version": "22.1.0", | ||
"version": "22.4.3", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1406
29