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

regexp-escape-x

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

regexp-escape-x - npm Package Compare versions

Comparing version 1.0.5 to 1.1.0

.eslintrc.json

23

index.js

@@ -42,3 +42,3 @@ /**

*
* @version 1.0.5
* @version 1.1.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -50,13 +50,16 @@ * @copyright Xotic750

/*jslint maxlen:80, es6:false, white:true */
/* jslint maxlen:80, es6:true, white:true */
/*jshint bitwise:true, camelcase:true, curly:true, eqeqeq:true, forin:true,
freeze:true, futurehostile:true, latedef:true, newcap:true, nocomma:true,
nonbsp:true, singleGroups:true, strict:true, undef:true, unused:true,
es3:true, esnext:false, plusplus:true, maxparams:1, maxdepth:1,
maxstatements:4, maxcomplexity:1 */
/* jshint bitwise:true, camelcase:true, curly:true, eqeqeq:true, forin:true,
freeze:true, futurehostile:true, latedef:true, newcap:true, nocomma:true,
nonbsp:true, singleGroups:true, strict:true, undef:true, unused:true,
es3:false, esnext:true, plusplus:true, maxparams:1, maxdepth:1,
maxstatements:3, maxcomplexity:2 */
/*global module */
/* eslint strict: 1, max-statements: 1 */
;(function () {
/* global module */
;(function () { // eslint-disable-line no-extra-semi
'use strict';

@@ -66,3 +69,3 @@

var pReplace = String.prototype.replace;
var syntaxChars = /[\^\$\\\.\*\+\?\(\)\[\]\{\}\|]/g;
var syntaxChars = /[\^$\\.*+?()[\]{}|]/g;

@@ -69,0 +72,0 @@ /**

@@ -43,3 +43,3 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.returnExports = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){

*
* @version 1.0.5
* @version 1.1.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -51,13 +51,16 @@ * @copyright Xotic750

/*jslint maxlen:80, es6:false, white:true */
/* jslint maxlen:80, es6:true, white:true */
/*jshint bitwise:true, camelcase:true, curly:true, eqeqeq:true, forin:true,
freeze:true, futurehostile:true, latedef:true, newcap:true, nocomma:true,
nonbsp:true, singleGroups:true, strict:true, undef:true, unused:true,
es3:true, esnext:false, plusplus:true, maxparams:1, maxdepth:1,
maxstatements:4, maxcomplexity:1 */
/* jshint bitwise:true, camelcase:true, curly:true, eqeqeq:true, forin:true,
freeze:true, futurehostile:true, latedef:true, newcap:true, nocomma:true,
nonbsp:true, singleGroups:true, strict:true, undef:true, unused:true,
es3:false, esnext:true, plusplus:true, maxparams:1, maxdepth:1,
maxstatements:3, maxcomplexity:2 */
/*global module */
/* eslint strict: 1, max-statements: 1 */
;(function () {
/* global module */
;(function () { // eslint-disable-line no-extra-semi
'use strict';

@@ -67,3 +70,3 @@

var pReplace = String.prototype.replace;
var syntaxChars = /[\^\$\\\.\*\+\?\(\)\[\]\{\}\|]/g;
var syntaxChars = /[\^$\\.*+?()[\]{}|]/g;

@@ -128,3 +131,3 @@ /**

*
* @version 1.0.5
* @version 1.1.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -136,13 +139,16 @@ * @copyright Xotic750

/*jslint maxlen:80, es6:true, white:true */
/* jslint maxlen:80, es6:true, white:true */
/*jshint bitwise:true, camelcase:true, curly:true, eqeqeq:true, forin:true,
freeze:true, futurehostile:true, latedef:true, newcap:true, nocomma:true,
nonbsp:true, singleGroups:true, strict:true, undef:true, unused:true,
es3:false, esnext:true, plusplus:true, maxparams:1, maxdepth:1,
maxstatements:3, maxcomplexity:2 */
/* jshint bitwise:true, camelcase:true, curly:true, eqeqeq:true, forin:true,
freeze:true, futurehostile:true, latedef:true, newcap:true, nocomma:true,
nonbsp:true, singleGroups:true, strict:true, undef:true, unused:true,
es3:false, esnext:true, plusplus:true, maxparams:1, maxdepth:1,
maxstatements:3, maxcomplexity:2 */
/*global module */
/* eslint strict: 1, max-statements: 1 */
;(function () {
/* global module */
;(function () { // eslint-disable-line no-extra-semi
'use strict';

@@ -149,0 +155,0 @@

@@ -1,2 +0,2 @@

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.returnExports=e()}}(function(){return function e(n,r,t){function s(i,f){if(!r[i]){if(!n[i]){var u="function"==typeof require&&require;if(!f&&u)return u(i,!0);if(o)return o(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var c=r[i]={exports:{}};n[i][0].call(c.exports,function(e){var r=n[i][1][e];return s(r?r:e)},c,c.exports,e,n,r,t)}return r[i].exports}for(var o="function"==typeof require&&require,i=0;i<t.length;i++)s(t[i]);return s}({1:[function(e,n,r){!function(){"use strict";var r=e("to-string-x"),t=String.prototype.replace,o=/[\^\$\\\.\*\+\?\(\)\[\]\{\}\|]/g;n.exports=function regexpEscape(e){return t.call(r(e),o,"\\$&")}}()},{"to-string-x":2}],2:[function(e,n,r){!function(){"use strict";var e=String;n.exports=function ToString(n){if("symbol"==typeof n)throw new TypeError("Cannot convert a Symbol value to a string");return e(n)}}()},{}]},{},[1])(1)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.returnExports=e()}}(function(){return function e(n,r,t){function s(i,f){if(!r[i]){if(!n[i]){var u="function"==typeof require&&require;if(!f&&u)return u(i,!0);if(o)return o(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var c=r[i]={exports:{}};n[i][0].call(c.exports,function(e){var r=n[i][1][e];return s(r?r:e)},c,c.exports,e,n,r,t)}return r[i].exports}for(var o="function"==typeof require&&require,i=0;i<t.length;i++)s(t[i]);return s}({1:[function(e,n,r){!function(){"use strict";var r=e("to-string-x"),t=String.prototype.replace,o=/[\^$\\.*+?()[\]{}|]/g;n.exports=function regexpEscape(e){return t.call(r(e),o,"\\$&")}}()},{"to-string-x":2}],2:[function(e,n,r){!function(){"use strict";var e=String;n.exports=function ToString(n){if("symbol"==typeof n)throw new TypeError("Cannot convert a Symbol value to a string");return e(n)}}()},{}]},{},[1])(1)});
//# sourceMappingURL=lib/regexp-escape-x.map
{
"name": "regexp-escape-x",
"version": "1.0.5",
"version": "1.1.0",
"description": "regexpEscape module.",

@@ -31,15 +31,19 @@ "homepage": "https://github.com/Xotic750/regexp-escape-x",

"dependencies": {
"to-string-x": "^1.0.5"
"to-string-x": "^1.1.0"
},
"devDependencies": {
"es5-shim": "^4.5.4",
"es6-shim": "^0.34.4",
"@ljharb/eslint-config": "^11.0.0",
"es5-shim": "^4.5.9",
"es6-shim": "^0.35.3",
"es7-shim": "^6.0.0",
"eslint": "^3.15.0",
"eslint-plugin-import": "^2.2.0",
"json3": "^3.3.2",
"jscs": "^2.9.0",
"uglify-js": "^2.6.1",
"browserify": "^13.0.0",
"jscs": "^3.0.7",
"uglify-js": "^2.7.5",
"browserify": "^14.1.0",
"browserify-derequire": "^0.9.4",
"jasmine-node": "^1.14.5",
"jsdoc-to-markdown": "^1.3.3",
"nsp": "^2.2.0"
"jsdoc-to-markdown": "^3.0.0",
"nsp": "^2.6.2"
},

@@ -50,2 +54,3 @@ "scripts": {

"style": "jscs index.js",
"eslint": "eslint *.js tests/spec/*.js",
"docs": "jsdoc2md --name-format --example-lang js index.js > README.md",

@@ -52,0 +57,0 @@ "build": "browserify -p browserify-derequire -e index.js -o lib/regexp-escape-x.js -u 'crypto' -s returnExports",

<a name="module_regexp-escape-x"></a>
## regexp-escape-x

@@ -42,3 +43,3 @@ <a href="https://travis-ci.org/Xotic750/regexp-escape-x"

**Version**: 1.0.5
**Version**: 1.1.0
**Author:** Xotic750 <Xotic750@gmail.com>

@@ -48,2 +49,3 @@ **License**: [MIT](&lt;https://opensource.org/licenses/MIT&gt;)

<a name="exp_module_regexp-escape-x--module.exports"></a>
### `module.exports(string)` ⇒ <code>string</code> ⏏

@@ -50,0 +52,0 @@ Method to safely escape `RegExp` special tokens for use in `new RegExp`.

@@ -1,12 +0,16 @@

/*jslint maxlen:80, es6:false, white:true */
/* jslint maxlen:80, es6:true, white:true */
/*jshint bitwise:true, camelcase:true, curly:true, eqeqeq:true, forin:true,
freeze:true, futurehostile:true, latedef:true, newcap:true, nocomma:true,
nonbsp:true, singleGroups:true, strict:true, undef:true, unused:true,
es3:true, esnext:false, plusplus:true, maxparams:1, maxdepth:2,
maxstatements:11, maxcomplexity:3 */
/* jshint bitwise:true, camelcase:true, curly:true, eqeqeq:true, forin:true,
freeze:true, futurehostile:true, latedef:true, newcap:true, nocomma:true,
nonbsp:true, singleGroups:true, strict:true, undef:true, unused:true,
es3:false, esnext:true, plusplus:true, maxparams:1, maxdepth:2,
maxstatements:12, maxcomplexity:4 */
/*global JSON:true, expect, module, require, describe, it, returnExports */
/* eslint strict: 1, max-lines: 1, symbol-description: 1, max-nested-callbacks: 1,
max-statements: 1 */
(function () {
/* global JSON:true, expect, module, require, describe, it, returnExports */
(function () { // eslint-disable-line no-extra-semi
'use strict';

@@ -23,2 +27,9 @@

require('es6-shim');
var es7 = require('es7-shim');
Object.keys(es7).forEach(function (key) {
var obj = es7[key];
if (typeof obj.shim === 'function') {
obj.shim();
}
});
regexpEscape = require('../../index.js');

@@ -59,5 +70,7 @@ } else {

strings.forEach(function (str) {
expect(regexpEscape({ toString: function () {
return str;
} })).toBe(regexpEscape(str));
expect(regexpEscape({
toString: function () {
return str;
}
})).toBe(regexpEscape(str));
});

@@ -64,0 +77,0 @@ });

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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