mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
Fix build.
Former-commit-id: 41b9584b63962a71f146c61fda056d15a2be4e14
This commit is contained in:
17
build.js
17
build.js
@@ -131,7 +131,7 @@
|
||||
'memoize': [],
|
||||
'merge': ['forEach', 'forOwn', 'isArray', 'isObject', 'isPlainObject'],
|
||||
'min': ['isArray', 'isEqual', 'isString', 'keys'],
|
||||
'mixin': ['forEach', 'forOwn', 'functions'],
|
||||
'mixin': ['forEach', 'functions'],
|
||||
'noConflict': [],
|
||||
'object': [],
|
||||
'omit': ['forIn', 'indexOf'],
|
||||
@@ -163,7 +163,7 @@
|
||||
'union': ['uniq'],
|
||||
'uniq': ['indexOf', 'isEqual', 'keys'],
|
||||
'uniqueId': [],
|
||||
'value': [],
|
||||
'value': ['forOwn'],
|
||||
'values': ['keys'],
|
||||
'where': ['filter'],
|
||||
'without': ['indexOf'],
|
||||
@@ -983,9 +983,12 @@
|
||||
// grab the method assignments snippet
|
||||
snippet = getMethodAssignments(source);
|
||||
|
||||
// remove method assignment from `lodash.prototype`
|
||||
source = source.replace(RegExp('^ *lodash\\.prototype\\.' + funcName + ' *=.+\\n', 'm'), '');
|
||||
|
||||
// remove assignment and aliases
|
||||
var modified = getAliases(funcName).concat(funcName).reduce(function(result, otherName) {
|
||||
return result.replace(RegExp('^(?: *//.*\\s*)* *lodash\\.' + otherName + ' *= *.+\\n', 'm'), '');
|
||||
return result.replace(RegExp('^(?: *//.*\\s*)* *lodash\\.' + otherName + ' *=.+\\n', 'm'), '');
|
||||
}, snippet);
|
||||
|
||||
// replace with the modified snippet
|
||||
@@ -2265,16 +2268,16 @@
|
||||
modified = snippet;
|
||||
|
||||
if (!exposeAssign) {
|
||||
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.assign *= *.+\n/m, '');
|
||||
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.assign *=.+\n/m, '');
|
||||
}
|
||||
if (!exposeForIn) {
|
||||
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.forIn *= *.+\n/m, '');
|
||||
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.forIn *=.+\n/m, '');
|
||||
}
|
||||
if (!exposeForOwn) {
|
||||
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.forOwn *= *.+\n/m, '');
|
||||
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.forOwn *=.+\n/m, '');
|
||||
}
|
||||
if (!exposeIsPlainObject) {
|
||||
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.isPlainObject *= *.+\n/m, '');
|
||||
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.isPlainObject *=.+\n/m, '');
|
||||
}
|
||||
source = source.replace(snippet, function() {
|
||||
return modified;
|
||||
|
||||
@@ -1101,7 +1101,7 @@
|
||||
if (index) {
|
||||
equal(typeof lodash.prototype.x, 'function', basename);
|
||||
} else {
|
||||
equal('x' in lodash.prototype.x, false, basename);
|
||||
equal('x' in lodash.prototype, false, basename);
|
||||
}
|
||||
start();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user