mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Make _(…) wrapper versions of _.first and _.last capable of returning wrapped and unwrapped values.
Former-commit-id: b30704c1ce359213aa09069b290ee55edfb3e33e
This commit is contained in:
8
build.js
8
build.js
@@ -1397,9 +1397,6 @@
|
||||
});
|
||||
});
|
||||
|
||||
// remove Lo-Dash specific `lodash.prototype` extensions
|
||||
source = source.replace(/(?:\s*\/\/.*)*\n( *)forEach\(filter[\s\S]+?lodash\.[\s\S]+?\n\1}.+/, '');
|
||||
|
||||
// remove unneeded template related variables
|
||||
source = removeVar(source, 'reComplexDelimiter');
|
||||
source = removeVar(source, 'reEmptyStringLeading');
|
||||
@@ -1419,6 +1416,11 @@
|
||||
// remove `lodash.prototype.toString` and `lodash.prototype.valueOf` assignments
|
||||
source = source.replace(/ *lodash\.prototype\.(?:toString|valueOf) *=.+\n/g, '');
|
||||
|
||||
// remove `lodash.prototype` batch method assignments
|
||||
source = source
|
||||
.replace(/(?:\s*\/\/.*)*\n( *)forEach\(\['first'[\s\S]+?\n\1}.+/, '')
|
||||
.replace(/(?:\s*\/\/.*)*\n( *)forEach\(filter[\s\S]+?lodash\.[\s\S]+?\n\1}.+/, '');
|
||||
|
||||
// remove unused features from `createBound`
|
||||
if (buildMethods.indexOf('partial') == -1) {
|
||||
source = source.replace(matchFunction(source, 'createBound'), function(match) {
|
||||
|
||||
Reference in New Issue
Block a user