|
150 | 150 | /** Used to track function dependencies */
|
151 | 151 | var dependencyMap = {
|
152 | 152 | 'after': [],
|
153 |
| - 'bind': [], |
154 |
| - 'bindAll': ['bind', 'functions'], |
| 153 | + 'bind': ['isFunction'], |
| 154 | + 'bindAll': ['bind', 'isFunction'], |
155 | 155 | 'chain': ['mixin'],
|
156 |
| - 'clone': ['extend', 'forIn', 'forOwn', 'isArguments'], |
| 156 | + 'clone': ['extend', 'forIn', 'forOwn', 'isArguments', 'isFunction'], |
157 | 157 | 'compact': [],
|
158 | 158 | 'compose': [],
|
159 | 159 | 'contains': [],
|
160 | 160 | 'countBy': [],
|
161 | 161 | 'debounce': [],
|
162 |
| - 'defaults': [], |
| 162 | + 'defaults': ['isArguments'], |
163 | 163 | 'defer': [],
|
164 | 164 | 'delay': [],
|
165 | 165 | 'difference': ['indexOf'],
|
166 |
| - 'drop': ['indexOf'], |
| 166 | + 'drop': ['indexOf', 'isArguments'], |
167 | 167 | 'escape': [],
|
168 | 168 | 'every': ['identity'],
|
169 |
| - 'extend': [], |
| 169 | + 'extend': ['isArguments'], |
170 | 170 | 'filter': ['identity'],
|
171 | 171 | 'find': [],
|
172 | 172 | 'first': [],
|
173 | 173 | 'flatten': ['isArray'],
|
174 | 174 | 'forEach': [],
|
175 |
| - 'forIn': [], |
176 |
| - 'forOwn': [], |
177 |
| - 'functions': [], |
| 175 | + 'forIn': ['isArguments'], |
| 176 | + 'forOwn': ['isArguments'], |
| 177 | + 'functions': ['isArguments', 'isFunction'], |
178 | 178 | 'groupBy': [],
|
179 | 179 | 'has': [],
|
180 | 180 | 'identity': [],
|
|
187 | 187 | 'isBoolean': [],
|
188 | 188 | 'isDate': [],
|
189 | 189 | 'isElement': [],
|
190 |
| - 'isEmpty': ['isArguments'], |
191 |
| - 'isEqual': ['isArguments'], |
| 190 | + 'isEmpty': ['isArguments', 'isFunction'], |
| 191 | + 'isEqual': ['isArguments', 'isFunction'], |
192 | 192 | 'isFinite': [],
|
193 | 193 | 'isFunction': [],
|
194 | 194 | 'isNaN': [],
|
|
198 | 198 | 'isRegExp': [],
|
199 | 199 | 'isString': [],
|
200 | 200 | 'isUndefined': [],
|
201 |
| - 'keys': [], |
| 201 | + 'keys': ['isArguments'], |
202 | 202 | 'last': [],
|
203 | 203 | 'lastIndexOf': [],
|
204 | 204 | 'map': ['identity'],
|
205 | 205 | 'max': [],
|
206 | 206 | 'memoize': [],
|
207 |
| - 'merge': ['isArray', 'forIn'], |
| 207 | + 'merge': ['isArguments', 'isArray', 'forIn'], |
208 | 208 | 'min': [],
|
209 | 209 | 'mixin': ['forEach', 'functions'],
|
210 | 210 | 'noConflict': [],
|
|
217 | 217 | 'reduceRight': ['keys'],
|
218 | 218 | 'reject': ['identity'],
|
219 | 219 | 'rest': [],
|
220 |
| - 'result': [], |
| 220 | + 'result': ['isFunction'], |
221 | 221 | 'shuffle': [],
|
222 |
| - 'size': ['isArguments', 'keys'], |
| 222 | + 'size': ['isArguments', 'isFunction', 'keys'], |
223 | 223 | 'some': ['identity'],
|
224 | 224 | 'sortBy': [],
|
225 | 225 | 'sortedIndex': ['bind'],
|
226 | 226 | 'tap': [],
|
227 | 227 | 'template': ['escape'],
|
228 | 228 | 'throttle': [],
|
229 | 229 | 'times': [],
|
230 |
| - 'toArray': ['values'], |
| 230 | + 'toArray': ['isFunction', 'values'], |
231 | 231 | 'union': ['indexOf'],
|
232 | 232 | 'uniq': ['identity', 'indexOf'],
|
233 | 233 | 'uniqueId': [],
|
234 |
| - 'values': [], |
| 234 | + 'values': ['isArguments'], |
235 | 235 | 'where': ['forIn'],
|
236 | 236 | 'without': ['indexOf'],
|
237 | 237 | 'wrap': [],
|
|
531 | 531 | return removeFromCreateIterator(source, funcName);
|
532 | 532 | }
|
533 | 533 |
|
| 534 | + /** |
| 535 | + * Removes the `_.isFunction` fallback from `source`. |
| 536 | + * |
| 537 | + * @private |
| 538 | + * @param {String} source The source to process. |
629A
| 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 | + |
534 | 545 | /**
|
535 | 546 | * Removes the `_.isArguments` fallback from `source`.
|
536 | 547 | *
|
|
1030 | 1041 | if (isRemoved(source, 'isArray')) {
|
1031 | 1042 | source = removeVar(source, 'nativeIsArray');
|
1032 | 1043 | }
|
| 1044 | + if (isRemoved(source, 'isFunction')) { |
| 1045 | + source = removeIsFunctionFallback(source); |
| 1046 | + } |
1033 | 1047 | if (isRemoved(source, 'keys')) {
|
1034 | 1048 | source = removeFunction(source, 'shimKeys');
|
1035 | 1049 | }
|
|
0 commit comments