Socket
Socket
Sign inDemoInstall

escape-string-regexp

Package Overview
Dependencies
0
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

5

index.js
'use strict';
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
module.exports = function (str) {

@@ -7,3 +10,3 @@ if (typeof str !== 'string') {

return str.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
return str.replace(matchOperatorsRe, '\\$&');
};

2

package.json
{
"name": "escape-string-regexp",
"version": "1.0.0",
"version": "1.0.1",
"description": "Escape RegExp special characters",

@@ -5,0 +5,0 @@ "license": "MIT",

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