lodash: Add the JScript [[DontEnum]] and Firefox, Opera, and Safari "prototype" property iteration fixes to iterationFactory. [jddalton]

Former-commit-id: f5be5c1e0828c3850936ba13ce19d0bfb8988d05
This commit is contained in:
John-David Dalton
2012-05-06 22:16:03 -04:00
parent 52cf17b24a
commit f31c2d24f9
5 changed files with 231 additions and 123 deletions

View File

@@ -23,6 +23,7 @@
'collection',
'computed',
'concat',
'ctor',
'current',
'false',
'funcClass',
@@ -41,6 +42,9 @@
'prop',
'property',
'result',
'shadowed',
'skipCtor',
'skipProto',
'slice',
'source',
'stringClass',
@@ -83,6 +87,7 @@
'interpolate',
'isEqual',
'isFinite',
'opera',
'setTimeout',
'source',
'templateSettings',
@@ -113,7 +118,7 @@
// remove whitespace from string literals
source = source.replace(/'(?:(?=(\\?))\1.)*?'/g, function(string) {
return string.replace(/\[object |else if|function | in |return\s+[\w']|throw |use strict|var |'\\n'|\\\\n|\\n|\s+/g, function(match) {
return string.replace(/\[object |else if|function | in |return\s+[\w']|throw |typeof |use strict|var |'\\n'|\\\\n|\\n|\s+/g, function(match) {
return match == false || match == '\\n' ? '' : match;
});
});