Skip to content

Commit 98e2377

Browse files
Revert "tried to add better toString() (and failed"
This reverts commit a81f8b2.
1 parent 6a8e353 commit 98e2377

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

package.json

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
11
{
2-
"name": "xregexp3",
2+
"name": "xregexp",
33
"version": "3.0.0-pre",
4-
"description": "temporary fork of Steven Levithan's XRegExp, to provide preview of version 3",
4+
"description": "Extended regular expressions",
55
"homepage": "http://xregexp.com/",
66
"author": "Steven Levithan <[email protected]>",
77
"license": "MIT",
88
"repository": {
99
"type": "git",
10-
"url": "https://github.com/loveencounterflow/xregexp3"
10+
"url": "https://github.com/slevithan/xregexp.git"
1111
},
12-
"bugs": "https://github.com/slevithan/xregexp/issues",
1312
"keywords": [
1413
"regex",
15-
"regexp",
16-
"xregex",
17-
"xregexp"
14+
"regexp"
1815
],
19-
"readme": "temporary fork of Steven Levithan's XRegExp, to provide preview of version 3",
20-
"readmeFilename": "README.md",
2116
"main": "./xregexp-all.js"
2217
}

xregexp-all.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,6 @@ var XRegExp = (function(undefined) {
466466
* XRegExp(/regex/);
467467
*/
468468
self = function(pattern, flags) {
469-
console.log( '©343 XRegExp3', pattern );
470-
var _X_pattern = pattern;
471469
var context = {
472470
hasNamedCapture: false,
473471
captureNames: []
@@ -541,16 +539,12 @@ var XRegExp = (function(undefined) {
541539
}
542540

543541
key = patternCache[key];
544-
var R = augment(new RegExp(key.pattern, key.flags), key.captures, /*addProto*/ true);
545-
R._X_pattern = _X_pattern;
546-
return R;
542+
return augment(new RegExp(key.pattern, key.flags), key.captures, /*addProto*/ true);
547543
};
548544

549545
// Add `RegExp.prototype` to the prototype chain
550546
self.prototype = new RegExp;
551547

552-
self.prototype.toString = function() { return this._X_pattern; }
553-
554548
/* ==============================
555549
* Public properties
556550
* ============================== */

0 commit comments

Comments
 (0)