Ensure the _.isRegExp is correct for various builds.

Former-commit-id: 38cf57053b89b1011bbfbd0b6a9cd31e91589c31
This commit is contained in:
John-David Dalton
2013-04-28 16:48:02 -07:00
parent 86e2374b48
commit ec10550b3a
6 changed files with 12 additions and 5 deletions

View File

@@ -1924,6 +1924,13 @@
source = source.replace(matchFunction(source, 'isPlainObject'), function(match) {
return match.replace(/!getPrototypeOf[^:]+:\s*/, '');
});
// replace `_.isRegExp`
source = replaceFunction(source, 'isRegExp', [
'function isRegExp(value) {',
" return value ? (typeof value == 'object' && toString.call(value) == regexpClass) : false;",
'}'
].join('\n'));
}
}
if (isMobile || isUnderscore) {