mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 10:17:48 +00:00
Swap createWrapper with alternatives in _.bindAll and _.wrap.
This commit is contained in:
@@ -7266,7 +7266,7 @@
|
|||||||
*/
|
*/
|
||||||
var bindAll = restParam(function(object, methodNames) {
|
var bindAll = restParam(function(object, methodNames) {
|
||||||
arrayEach(baseFlatten(methodNames), function(key) {
|
arrayEach(baseFlatten(methodNames), function(key) {
|
||||||
object[key] = createWrapper(object[key], BIND_FLAG, object);
|
object[key] = bind(object[key], object);
|
||||||
});
|
});
|
||||||
return object;
|
return object;
|
||||||
});
|
});
|
||||||
@@ -8204,7 +8204,7 @@
|
|||||||
*/
|
*/
|
||||||
function wrap(value, wrapper) {
|
function wrap(value, wrapper) {
|
||||||
wrapper = wrapper == null ? identity : wrapper;
|
wrapper = wrapper == null ? identity : wrapper;
|
||||||
return createWrapper(wrapper, PARTIAL_FLAG, undefined, [value], []);
|
return partial(wrapper, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------*/
|
||||||
|
|||||||
Reference in New Issue
Block a user