Socket
Socket
Sign inDemoInstall

jest-regex-util

Package Overview
Dependencies
0
Maintainers
6
Versions
104
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 29.6.3 to 30.0.0-alpha.0

build/index.mjs

40

build/index.js

@@ -1,11 +0,22 @@

'use strict';
/*!
* /**
* * Copyright (c) Meta Platforms, Inc. and affiliates.
* *
* * This source code is licensed under the MIT license found in the
* * LICENSE file in the root directory of this source tree.
* * /
*/
/******/ (() => { // webpackBootstrap
/******/ "use strict";
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it uses a non-standard name for the exports (exports).
(() => {
var exports = __webpack_exports__;
Object.defineProperty(exports, '__esModule', {
Object.defineProperty(exports, "__esModule", ({
value: true
});
exports.replacePathSepForRegex =
exports.escapeStrForRegex =
exports.escapePathForRegex =
void 0;
var _path = require('path');
}));
exports.replacePathSepForRegex = exports.escapeStrForRegex = exports.escapePathForRegex = void 0;
var _path = require("path");
/**

@@ -28,11 +39,7 @@ * Copyright (c) Meta Platforms, Inc. and affiliates.

exports.escapePathForRegex = escapePathForRegex;
const escapeStrForRegex = string =>
string.replace(/[[\]{}()*+?.\\^$|]/g, '\\$&');
const escapeStrForRegex = string => string.replace(/[[\]{}()*+?.\\^$|]/g, '\\$&');
exports.escapeStrForRegex = escapeStrForRegex;
const replacePathSepForRegex = string => {
if (_path.sep === '\\') {
return string.replace(
/(\/|(.)?\\(?![[\]{}()*+?.^$|\\]))/g,
(_match, _, p2) => (p2 && p2 !== '\\' ? `${p2}\\\\` : '\\\\')
);
return string.replace(/(\/|(.)?\\(?![[\]{}()*+?.^$|\\]))/g, (_match, _, p2) => p2 && p2 !== '\\' ? `${p2}\\\\` : '\\\\');
}

@@ -42,1 +49,6 @@ return string;

exports.replacePathSepForRegex = replacePathSepForRegex;
})();
module.exports = __webpack_exports__;
/******/ })()
;
{
"name": "jest-regex-util",
"version": "29.6.3",
"version": "30.0.0-alpha.0",
"repository": {

@@ -13,3 +13,3 @@ "type": "git",

"engines": {
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
"node": "^16.10.0 || ^18.12.0 || >=20.0.0"
},

@@ -22,2 +22,4 @@ "license": "MIT",

"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"

@@ -30,3 +32,3 @@ },

},
"gitHead": "fb7d95c8af6e0d65a8b65348433d8a0ea0725b5b"
"gitHead": "780ae28333df4d188b2ef78bd19d4ed5bc53562d"
}
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc