Reduce the lodash underscore build.

Former-commit-id: 2f928d053faf4b8e45d5ef26e2697c25426b7a90
This commit is contained in:
John-David Dalton
2013-03-23 23:46:40 -07:00
parent bbfd8aa249
commit 74c46f6e93
3 changed files with 47 additions and 99 deletions

View File

@@ -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);
}