Optimize _.max and _.min when invoked with iteratees and add _.gt, _.gte, _.lt, _.lte, & _.eq.

This commit is contained in:
jdalton
2015-05-06 01:39:02 -07:00
parent 7dfd7ad5b9
commit db67ae12ec
2 changed files with 156 additions and 107 deletions

View File

@@ -17816,7 +17816,7 @@
var acceptFalsey = _.difference(allMethods, rejectFalsey);
test('should accept falsey arguments', 220, function() {
test('should accept falsey arguments', 225, function() {
var emptyArrays = _.map(falsey, _.constant([])),
isExposed = '_' in root,
oldDash = root._;
@@ -17982,8 +17982,9 @@
});
test('should not contain minified method names (test production builds)', 1, function() {
var shortNames = ['at', 'eq', 'gt', 'lt'];
ok(_.every(_.functions(_), function(methodName) {
return methodName.length > 2 || methodName === 'at';
return methodName.length > 2 || _.includes(shortNames, methodName);
}));
});
}());