mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
Reduce _.wrap by taking advantage of createBound.
This commit is contained in:
9
dist/lodash.underscore.js
vendored
9
dist/lodash.underscore.js
vendored
@@ -4073,14 +4073,7 @@
|
||||
* // => '<div>Fred, Wilma, & Pebbles</div>'
|
||||
*/
|
||||
function wrap(value, wrapper) {
|
||||
if (!isFunction(wrapper)) {
|
||||
throw new TypeError;
|
||||
}
|
||||
return function() {
|
||||
var args = [value];
|
||||
push.apply(args, arguments);
|
||||
return wrapper.apply(this, args);
|
||||
};
|
||||
return createBound(wrapper, 16, [value]);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user