mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Reduce code around _.bind and _.partial, and add _.lateBind.
Former-commit-id: 4c962d066ecfa54882cee2216a7310ab34b3b5a3
This commit is contained in:
7
build.js
7
build.js
@@ -109,6 +109,7 @@
|
||||
'keys': ['isArguments'],
|
||||
'last': [],
|
||||
'lastIndexOf': [],
|
||||
'lateBind': ['isFunction'],
|
||||
'map': ['identity'],
|
||||
'max': [],
|
||||
'memoize': [],
|
||||
@@ -120,7 +121,7 @@
|
||||
'omit': ['indexOf', 'isArguments'],
|
||||
'once': [],
|
||||
'pairs': [],
|
||||
'partial': [],
|
||||
'partial': ['isFunction'],
|
||||
'pick': [],
|
||||
'pluck': [],
|
||||
'random': [],
|
||||
@@ -205,6 +206,7 @@
|
||||
'keys',
|
||||
'last',
|
||||
'lastIndexOf',
|
||||
'lateBind',
|
||||
'map',
|
||||
'max',
|
||||
'min',
|
||||
@@ -230,6 +232,7 @@
|
||||
'forIn',
|
||||
'forOwn',
|
||||
'invert',
|
||||
'lateBind',
|
||||
'merge',
|
||||
'object',
|
||||
'omit',
|
||||
@@ -1052,7 +1055,7 @@
|
||||
|
||||
// remove native `Function#bind` branch in `_.bind`
|
||||
if (methodName == 'bind') {
|
||||
modified = modified.replace(/(?:\s*\/\/.*)*\s*else if *\(isBindFast[^}]+}/, '');
|
||||
modified = modified.replace(/(?:\s*\/\/.*)*\s*return isBindFast[^:]+:\s*/, 'return ');
|
||||
}
|
||||
// remove native `Array.isArray` branch in `_.isArray`
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user