8000 Update dependencies in build.js. · lodash/lodash@a82a364 · GitHub
[go: up one dir, main page]

Skip to content

Commit a82a364

Browse files
committed
Update dependencies in build.js.
Former-commit-id: 020a52bdd604b55b078637aeb59e2e53483c950d
1 parent cc150ff commit a82a364

File tree

1 file changed

+31
-17
lines changed

1 file changed

+31
-17
lines changed

build.js

Lines changed: 31 additions & 17 deletions
629A
Original file line numberDiff line numberDiff line change
@@ -150,31 +150,31 @@
150150
/** Used to track function dependencies */
151151
var dependencyMap = {
152152
'after': [],
153-
'bind': [],
154-
'bindAll': ['bind', 'functions'],
153+
'bind': ['isFunction'],
154+
'bindAll': ['bind', 'isFunction'],
155155
'chain': ['mixin'],
156-
'clone': ['extend', 'forIn', 'forOwn', 'isArguments'],
156+
'clone': ['extend', 'forIn', 'forOwn', 'isArguments', 'isFunction'],
157157
'compact': [],
158158
'compose': [],
159159
'contains': [],
160160
'countBy': [],
161161
'debounce': [],
162-
'defaults': [],
162+
'defaults': ['isArguments'],
163163
'defer': [],
164164
'delay': [],
165165
'difference': ['indexOf'],
166-
'drop': ['indexOf'],
166+
'drop': ['indexOf', 'isArguments'],
167167
'escape': [],
168168
'every': ['identity'],
169-
'extend': [],
169+
'extend': ['isArguments'],
170170
'filter': ['identity'],
171171
'find': [],
172172
'first': [],
173173
'flatten': ['isArray'],
174174
'forEach': [],
175-
'forIn': [],
176-
'forOwn': [],
177-
'functions': [],
175+
'forIn': ['isArguments'],
176+
'forOwn': ['isArguments'],
177+
'functions': ['isArguments', 'isFunction'],
178178
'groupBy': [],
179179
'has': [],
180180
'identity': [],
@@ -187,8 +187,8 @@
187187
'isBoolean': [],
188188
'isDate': [],
189189
'isElement': [],
190-
'isEmpty': ['isArguments'],
191-
'isEqual': ['isArguments'],
190+
'isEmpty': ['isArguments', 'isFunction'],
191+
'isEqual': ['isArguments', 'isFunction'],
192192
'isFinite': [],
193193
'isFunction': [],
194194
'isNaN': [],
@@ -198,13 +198,13 @@
198198
'isRegExp': [],
199199
'isString': [],
200200
'isUndefined': [],
201-
'keys': [],
201+
'keys': ['isArguments'],
202202
'last': [],
203203
'lastIndexOf': [],
204204
'map': ['identity'],
205205
'max': [],
206206
'memoize': [],
207-
'merge': ['isArray', 'forIn'],
207+
'merge': ['isArguments', 'isArray', 'forIn'],
208208
'min': [],
209209
'mixin': ['forEach', 'functions'],
210210
'noConflict': [],
@@ -217,21 +217,21 @@
217217
'reduceRight': ['keys'],
218218
'reject': ['identity'],
219219
'rest': [],
220-
'result': [],
220+
'result': ['isFunction'],
221221
'shuffle': [],
222-
'size': ['isArguments', 'keys'],
222+
'size': ['isArguments', 'isFunction', 'keys'],
223223
'some': ['identity'],
224224
'sortBy': [],
225225
'sortedIndex': ['bind'],
226226
'tap': [],
227227
'template': ['escape'],
228228
'throttle': [],
229229
'times': [],
230-
'toArray': ['values'],
230+
'toArray': ['isFunction', 'values'],
231231
'union': ['indexOf'],
232232
'uniq': ['identity', 'indexOf'],
233233
'uniqueId': [],
234-
'values': [],
234+
'values': ['isArguments'],
235235
'where': ['forIn'],
236236
'without': ['indexOf'],
237237
'wrap': [],
@@ -531,6 +531,17 @@
531531
return removeFromCreateIterator(source, funcName);
532532
}
533533

534+
/**
535+
* Removes the `_.isFunction` fallback from `source`.
536+
*
537+
* @private
538+
* @param {String} source The source to process.
539+
* @returns {String} Returns the source with the `isFunction` fallback removed.
540+
*/
541+
function removeIsFunctionFallback(source) {
542+
return source.replace(/(?:\s*\/\/.*)*\s*if *\(isFunction\(\/x\/[\s\S]+?};\s*}/, '');
543+
}
544+
534545
/**
535546
* Removes the `_.isArguments` fallback from `source`.
536547
*
@@ -1030,6 +1041,9 @@
10301041
if (isRemoved(source, 'isArray')) {
10311042
source = removeVar(source, 'nativeIsArray');
10321043
}
1044+
if (isRemoved(source, 'isFunction')) {
1045+
source = removeIsFunctionFallback(source);
1046+
}
10331047
if (isRemoved(source, 'keys')) {
10341048
source = removeFunction(source, 'shimKeys');
10351049
}

0 commit comments

Comments
 (0)
0