Remove unzip from underscore build.

Former-commit-id: 5c1ed2d73e678e3f63c5378e8318508207b01988
This commit is contained in:
John-David Dalton
2013-07-14 08:05:54 -07:00
parent c5698e82da
commit a8aaa793a0
3 changed files with 34 additions and 34 deletions

View File

@@ -2476,6 +2476,7 @@
};
var isLodash = function(funcName) {
funcName = getRealName(funcName);
if (_.contains(lodashOnlyFuncs, funcName) || /^(?:assign|zipObject)$/.test(funcName)) {
var funcNames = _.difference(_.union(includeFuncs, plusFuncs), minusFuncs);
return _.contains(funcNames, funcName);
@@ -3853,9 +3854,9 @@
});
});
}
// remove `_.assign`, `_.forIn`, `_.forOwn`, `_.isPlainObject`, and `_.zipObject` assignments
// remove `_.assign`, `_.forIn`, `_.forOwn`, `_.isPlainObject`, `_.unzip`, and `_.zipObject` assignments
source = source.replace(getMethodAssignments(source), function(match) {
return _.reduce(['assign', 'createCallback', 'forIn', 'forOwn', 'isPlainObject', 'zipObject'], function(result, funcName) {
return _.reduce(['assign', 'createCallback', 'forIn', 'forOwn', 'isPlainObject', 'unzip', 'zipObject'], function(result, funcName) {
return isLodash(funcName)
? result
: result.replace(RegExp('^(?: *//.*\\s*)* *lodash\\.' + funcName + ' *=[\\s\\S]+?;\\n', 'm'), '');