Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jest-regex-util

Package Overview
Dependencies
Maintainers
2
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-regex-util - npm Package Compare versions

Comparing version 20.0.3 to 20.1.0-alpha.1

40

build/index.js

@@ -1,15 +0,15 @@

'use strict'; /**
* Copyright (c) 2014, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
'use strict';
const path = require('path');
var _path = require('path');var _path2 = _interopRequireDefault(_path);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
const escapePathForRegex = dir => {
if (path.sep === '\\') {
if (_path2.default.sep === '\\') {
// Replace "\" with "/" so it's not escaped by escapeStrForRegex.

@@ -20,11 +20,11 @@ // replacePathSepForRegex will convert it back.

return replacePathSepForRegex(escapeStrForRegex(dir));
};
const escapeStrForRegex = string =>
string.replace(/[[\]{}()*+?.\\^$|]/g, '\\$&');
const replacePathSepForRegex = string => {
if (path.sep === '\\') {
return string.replace(/(\/|\\(?!\.))/g, '\\\\');
}
}; /**
* Copyright (c) 2014, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/const escapeStrForRegex = string => string.replace(/[[\]{}()*+?.\\^$|]/g, '\\$&');const replacePathSepForRegex = string => {if (_path2.default.sep === '\\') {return string.replace(/(\/|\\(?!\.))/g, '\\\\');}
return string;

@@ -31,0 +31,0 @@ };

{
"name": "jest-regex-util",
"version": "20.0.3",
"version": "20.1.0-alpha.1",
"repository": {

@@ -9,4 +9,3 @@ "type": "git",

"license": "BSD-3-Clause",
"main": "build/index.js",
"browser": "build-es5/index.js"
"main": "build/index.js"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc