Bump to v3.6.0.

This commit is contained in:
jdalton
2015-03-24 19:28:36 -07:00
parent ee1f12c851
commit 801ffd8adf
193 changed files with 1213 additions and 976 deletions

View File

@@ -1,6 +1,6 @@
import baseSlice from '../internal/baseSlice';
import createWrapper from '../internal/createWrapper';
import replaceHolders from '../internal/replaceHolders';
import restParam from './restParam';
/** Used to compose bitmasks for wrapper metadata. */
var BIND_FLAG = 1,
@@ -22,7 +22,7 @@ var BIND_FLAG = 1,
* @category Function
* @param {Function} func The function to bind.
* @param {*} thisArg The `this` binding of `func`.
* @param {...*} [args] The arguments to be partially applied.
* @param {...*} [partials] The arguments to be partially applied.
* @returns {Function} Returns the new bound function.
* @example
*
@@ -41,16 +41,14 @@ var BIND_FLAG = 1,
* bound('hi');
* // => 'hi fred!'
*/
function bind(func, thisArg) {
var bind = restParam(function(func, thisArg, partials) {
var bitmask = BIND_FLAG;
if (arguments.length > 2) {
var partials = baseSlice(arguments, 2),
holders = replaceHolders(partials, bind.placeholder);
if (partials.length) {
var holders = replaceHolders(partials, bind.placeholder);
bitmask |= PARTIAL_FLAG;
}
return createWrapper(func, bitmask, thisArg, partials, holders);
}
});
// Assign default placeholders.
bind.placeholder = {};