Correct baseClone dependencies and ensure forEachRight isn't exposed in underscore builds.

Former-commit-id: 37bba697b3cdd80405519976a30014efb1336cec
This commit is contained in:
John-David Dalton
2013-07-28 10:12:32 -07:00
parent 10de191dd5
commit c80c59c692

View File

@@ -204,7 +204,7 @@
'zipObject': [],
// private functions
'baseClone': ['assign', 'forEach', 'forOwn', 'getArray', 'isArray', 'isObject', 'isNode', 'releaseArray', 'slice'],
'baseClone': ['assign', 'baseEach', 'forOwn', 'getArray', 'isArray', 'isObject', 'isNode', 'releaseArray', 'slice'],
'baseEach': ['createIterator'],
'baseFlatten': ['isArguments', 'isArray'],
'baseIndexOf': [],
@@ -3968,9 +3968,9 @@
});
});
}
// remove `_.assign`, `_.forIn`, `_.forOwn`, `_.isPlainObject`, `_.unzip`, and `_.zipObject` assignments
// remove `_.assign`, `_.forEachRight`, `_.forIn`, `_.forOwn`, `_.isPlainObject`, `_.unzip`, and `_.zipObject` assignments
source = source.replace(getMethodAssignments(source), function(match) {
return _.reduce(['assign', 'createCallback', 'forIn', 'forOwn', 'isPlainObject', 'unzip', 'zipObject'], function(result, funcName) {
return _.reduce(['assign', 'createCallback', 'forEachRight', 'forIn', 'forOwn', 'isPlainObject', 'unzip', 'zipObject'], function(result, funcName) {
return isLodash(funcName)
? result
: result.replace(RegExp('^(?: *//.*\\s*)* *lodash\\.' + funcName + ' *=[\\s\\S]+?;\\n', 'm'), '');
@@ -4012,7 +4012,7 @@
return source.match(/^\/\**[\s\S]+?\*\/\n/) +
(index > -1 ? iife.slice(0, index) : iife) +
source.replace(/^[\s\S]+?\(function[^{]+?{|}\(this\)\)[;\s]*$/g, '') +
source.replace(/^[\s\S]+?\(function[^{]+{|}\(this\)\)[;\s]*$/g, '') +
(index > -1 ? iife.slice(index + token.length) : '');
}());
}