Bump to v4.14.0.

This commit is contained in:
John-David Dalton
2016-07-24 09:52:33 -07:00
parent 295d8cf415
commit a8d3718760
253 changed files with 2469 additions and 1808 deletions

16
bind.js
View File

@@ -1,9 +1,9 @@
var createWrapper = require('./_createWrapper'),
var baseRest = require('./_baseRest'),
createWrap = require('./_createWrap'),
getHolder = require('./_getHolder'),
replaceHolders = require('./_replaceHolders'),
rest = require('./rest');
replaceHolders = require('./_replaceHolders');
/** Used to compose bitmasks for wrapper metadata. */
/** Used to compose bitmasks for function metadata. */
var BIND_FLAG = 1,
PARTIAL_FLAG = 32;
@@ -27,9 +27,9 @@ var BIND_FLAG = 1,
* @returns {Function} Returns the new bound function.
* @example
*
* var greet = function(greeting, punctuation) {
* function greet(greeting, punctuation) {
* return greeting + ' ' + this.user + punctuation;
* };
* }
*
* var object = { 'user': 'fred' };
*
@@ -42,13 +42,13 @@ var BIND_FLAG = 1,
* bound('hi');
* // => 'hi fred!'
*/
var bind = rest(function(func, thisArg, partials) {
var bind = baseRest(function(func, thisArg, partials) {
var bitmask = BIND_FLAG;
if (partials.length) {
var holders = replaceHolders(partials, getHolder(bind));
bitmask |= PARTIAL_FLAG;
}
return createWrapper(func, bitmask, thisArg, partials, holders);
return createWrap(func, bitmask, thisArg, partials, holders);
});
// Assign default placeholders.