mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 01:47:48 +00:00
Bump to v4.17.0.
This commit is contained in:
8
bind.js
8
bind.js
@@ -1,8 +1,8 @@
|
||||
define(['./_baseRest', './_createWrap', './_getHolder', './_replaceHolders'], function(baseRest, createWrap, getHolder, replaceHolders) {
|
||||
|
||||
/** Used to compose bitmasks for function metadata. */
|
||||
var BIND_FLAG = 1,
|
||||
PARTIAL_FLAG = 32;
|
||||
var WRAP_BIND_FLAG = 1,
|
||||
WRAP_PARTIAL_FLAG = 32;
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with the `this` binding of `thisArg`
|
||||
@@ -40,10 +40,10 @@ define(['./_baseRest', './_createWrap', './_getHolder', './_replaceHolders'], fu
|
||||
* // => 'hi fred!'
|
||||
*/
|
||||
var bind = baseRest(function(func, thisArg, partials) {
|
||||
var bitmask = BIND_FLAG;
|
||||
var bitmask = WRAP_BIND_FLAG;
|
||||
if (partials.length) {
|
||||
var holders = replaceHolders(partials, getHolder(bind));
|
||||
bitmask |= PARTIAL_FLAG;
|
||||
bitmask |= WRAP_PARTIAL_FLAG;
|
||||
}
|
||||
return createWrap(func, bitmask, thisArg, partials, holders);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user