Ensure _.where works correctly for nested properties and give indicator arguments more meaningful names.

Former-commit-id: c35e2817125cd852a66066ccdef44bcc40c93e61
This commit is contained in:
John-David Dalton
2013-01-26 23:47:47 -08:00
parent 17fc3c2317
commit 23c3ba6ad7
7 changed files with 204 additions and 191 deletions

View File

@@ -123,7 +123,7 @@
'map': ['identity', 'isArray', 'isEqual', 'keys'],
'max': ['isArray', 'isEqual', 'isString', 'keys'],
'memoize': [],
'merge': ['forEach', 'forOwn', 'isArray', 'isPlainObject'],
'merge': ['forEach', 'forOwn', 'isArray', 'isObject', 'isPlainObject'],
'min': ['isArray', 'isEqual', 'isString', 'keys'],
'mixin': ['forEach', 'forOwn', 'functions'],
'noConflict': [],
@@ -133,7 +133,7 @@
'pairs': ['keys'],
'partial': ['isFunction', 'isObject'],
'partialRight': ['isFunction', 'isObject'],
'pick': ['forIn'],
'pick': ['forIn', 'isObject'],
'pluck': ['map'],
'random': [],
'range': [],
@@ -1766,7 +1766,7 @@
if (buildMethods.indexOf('partial') < 0 && buildMethods.indexOf('partialRight') < 0) {
source = source.replace(matchFunction(source, 'createBound'), function(match) {
return match
.replace(/, *right/, '')
.replace(/, *right[^)]*/, '')
.replace(/(function createBound\([^{]+{)[\s\S]+?(\n *function bound)/, '$1$2')
.replace(/thisBinding *=[^}]+}/, 'thisBinding = thisArg;\n')
.replace(/\(args *=.+/, 'partialArgs.concat(slice(args))');