mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
Reduce the lodash underscore build.
Former-commit-id: 2f928d053faf4b8e45d5ef26e2697c25426b7a90
This commit is contained in:
6
build.js
6
build.js
@@ -2426,6 +2426,11 @@
|
||||
});
|
||||
});
|
||||
|
||||
// replace `slice` with `slice.call`
|
||||
source = removeFunction(source, 'slice');
|
||||
source = source.replace(/^(( *)setTimeout = context.setTimeout)([,;])/m, '$1,\n$2slice = arrayRef.slice$3');
|
||||
source = source.replace(/([^.]\bslice)\(/g, '$1.call(');
|
||||
|
||||
// replace `lodash.createCallback` references with `createCallback`
|
||||
if (!exposeCreateCallback) {
|
||||
source = source.replace(/\blodash\.(createCallback\()\b/g, '$1');
|
||||
@@ -2795,6 +2800,7 @@
|
||||
source = removeVar(source, 'nativeIsArray');
|
||||
}
|
||||
if (isRemoved(source, 'isPlainObject')) {
|
||||
source = removeFunction(source, 'shimIsPlainObject');
|
||||
source = removeVar(source, 'getPrototypeOf');
|
||||
source = removeSupportOwnLast(source);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user