aboutsummaryrefslogtreecommitdiff
path: root/tools/eliminator/node_modules/uglify-js/lib/parse-js.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eliminator/node_modules/uglify-js/lib/parse-js.js')
-rw-r--r--tools/eliminator/node_modules/uglify-js/lib/parse-js.js25
1 files changed, 23 insertions, 2 deletions
diff --git a/tools/eliminator/node_modules/uglify-js/lib/parse-js.js b/tools/eliminator/node_modules/uglify-js/lib/parse-js.js
index a89163c6..2dc2ef70 100644
--- a/tools/eliminator/node_modules/uglify-js/lib/parse-js.js
+++ b/tools/eliminator/node_modules/uglify-js/lib/parse-js.js
@@ -679,7 +679,28 @@ function NodeWithToken(str, start, end) {
this.end = end;
};
-NodeWithToken.prototype.toString = function() { return this.name; };
+NodeWithToken.prototype = {
+ get length() {
+ return this.name.length;
+ },
+ set length(v) {
+ return this.name.length = v;
+ },
+ replace: function() { return this.name.replace.apply(this.name, arguments); },
+ concat: function() { return this.name.concat.apply(this.name, arguments); },
+ indexOf: function() { return this.name.indexOf.apply(this.name, arguments); },
+ lastIndexOf: function() { return this.name.lastIndexOf.apply(this.name, arguments); },
+ lastIndexOf: function() { return this.name.lastIndexOf.apply(this.name, arguments); },
+ match: function() { return this.name.match.apply(this.name, arguments); },
+ search: function() { return this.name.search.apply(this.name, arguments); },
+ slice: function() { return this.name.slice.apply(this.name, arguments); },
+ split: function() { return this.name.split.apply(this.name, arguments); },
+ substr: function() { return this.name.substr.apply(this.name, arguments); },
+ substring: function() { return this.name.substring.apply(this.name, arguments); },
+ toString: function() { return this.name; },
+ toJSON: function() { return this.name; },
+ valueOf: function() { return this.name; },
+};
function parse($TEXT, exigent_mode, embed_tokens) {
@@ -1314,7 +1335,7 @@ function characters(str) {
function member(name, array) {
for (var i = array.length; --i >= 0;)
- if (array[i] === name)
+ if (array[i] == name)
return true;
return false;
};