From e2a6db008fcdeefcccd71128060ba48fd1f29d05 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 3 Feb 2016 00:57:54 -0800 Subject: [PATCH] Bump to v4.2.1. --- README.md | 4 ++-- bind.js | 4 +++- bindKey.js | 4 +++- debounce.js | 2 +- main.js | 34 +++++++++++++++++++++------------- package.json | 2 +- partial.js | 4 +++- partialRight.js | 4 +++- pullAllBy.js | 2 +- throttle.js | 2 +- 10 files changed, 39 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 6028ddf6b..e0208a9bf 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lodash-amd v4.2.0 +# lodash-amd v4.2.1 The [lodash](https://lodash.com/) library exported as [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) modules. @@ -27,4 +27,4 @@ require({ }); ``` -See the [package source](https://github.com/lodash/lodash/tree/4.2.0-amd) for more details. +See the [package source](https://github.com/lodash/lodash/tree/4.2.1-amd) for more details. diff --git a/bind.js b/bind.js index 19d27188f..1e7bfde87 100644 --- a/bind.js +++ b/bind.js @@ -42,7 +42,9 @@ define(['./_createWrapper', './_replaceHolders', './rest'], function(createWrapp var bind = rest(function(func, thisArg, partials) { var bitmask = BIND_FLAG; if (partials.length) { - var holders = replaceHolders(partials, bind.placeholder); + var placeholder = bind.placeholder, + holders = replaceHolders(partials, placeholder); + bitmask |= PARTIAL_FLAG; } return createWrapper(func, bitmask, thisArg, partials, holders); diff --git a/bindKey.js b/bindKey.js index dc3e2d05c..8053f3a53 100644 --- a/bindKey.js +++ b/bindKey.js @@ -52,7 +52,9 @@ define(['./_createWrapper', './_replaceHolders', './rest'], function(createWrapp var bindKey = rest(function(object, key, partials) { var bitmask = BIND_FLAG | BIND_KEY_FLAG; if (partials.length) { - var holders = replaceHolders(partials, bindKey.placeholder); + var placeholder = bindKey.placeholder, + holders = replaceHolders(partials, placeholder); + bitmask |= PARTIAL_FLAG; } return createWrapper(key, bitmask, object, partials, holders); diff --git a/debounce.js b/debounce.js index 20852e84c..dd75abb5c 100644 --- a/debounce.js +++ b/debounce.js @@ -20,7 +20,7 @@ define(['./isObject', './now', './toNumber'], function(isObject, now, toNumber) * to the debounced function return the result of the last `func` invocation. * * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked - * on the trailing edge of the timeout only if the the debounced function is + * on the trailing edge of the timeout only if the debounced function is * invoked more than once during the `wait` timeout. * * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) diff --git a/main.js b/main.js index a1cbdf230..b83e37850 100644 --- a/main.js +++ b/main.js @@ -1,6 +1,6 @@ /** * @license - * lodash 4.2.0 (Custom Build) + * lodash 4.2.1 (Custom Build) * Build: `lodash exports="amd" -d -o ./main.js` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 @@ -13,7 +13,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.2.0'; + var VERSION = '4.2.1'; /** Used to compose bitmasks for wrapper metadata. */ var BIND_FLAG = 1, @@ -4120,7 +4120,7 @@ index = length, args = Array(length), fn = (this && this !== root && this instanceof wrapper) ? Ctor : func, - placeholder = wrapper.placeholder; + placeholder = lodash.placeholder || wrapper.placeholder; while (index--) { args[index] = arguments[index]; @@ -4236,7 +4236,7 @@ args = composeArgsRight(args, partialsRight, holdersRight); } if (isCurry || isCurryRight) { - var placeholder = wrapper.placeholder, + var placeholder = lodash.placeholder || wrapper.placeholder, argsHolders = replaceHolders(args, placeholder); length -= argsHolders.length; @@ -6126,7 +6126,7 @@ /** * This method is like `_.pullAll` except that it accepts `iteratee` which is - * invoked for each element of `array` and `values` to to generate the criterion + * invoked for each element of `array` and `values` to generate the criterion * by which uniqueness is computed. The iteratee is invoked with one argument: (value). * * **Note:** Unlike `_.differenceBy`, this method mutates `array`. @@ -8343,7 +8343,9 @@ var bind = rest(function(func, thisArg, partials) { var bitmask = BIND_FLAG; if (partials.length) { - var holders = replaceHolders(partials, bind.placeholder); + var placeholder = lodash.placeholder || bind.placeholder, + holders = replaceHolders(partials, placeholder); + bitmask |= PARTIAL_FLAG; } return createWrapper(func, bitmask, thisArg, partials, holders); @@ -8396,7 +8398,9 @@ var bindKey = rest(function(object, key, partials) { var bitmask = BIND_FLAG | BIND_KEY_FLAG; if (partials.length) { - var holders = replaceHolders(partials, bindKey.placeholder); + var placeholder = lodash.placeholder || bindKey.placeholder, + holders = replaceHolders(partials, placeholder); + bitmask |= PARTIAL_FLAG; } return createWrapper(key, bitmask, object, partials, holders); @@ -8445,7 +8449,7 @@ function curry(func, arity, guard) { arity = guard ? undefined : arity; var result = createWrapper(func, CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); - result.placeholder = curry.placeholder; + result.placeholder = lodash.placeholder || curry.placeholder; return result; } @@ -8489,7 +8493,7 @@ function curryRight(func, arity, guard) { arity = guard ? undefined : arity; var result = createWrapper(func, CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); - result.placeholder = curryRight.placeholder; + result.placeholder = lodash.placeholder || curryRight.placeholder; return result; } @@ -8504,7 +8508,7 @@ * to the debounced function return the result of the last `func` invocation. * * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked - * on the trailing edge of the timeout only if the the debounced function is + * on the trailing edge of the timeout only if the debounced function is * invoked more than once during the `wait` timeout. * * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) @@ -8911,7 +8915,9 @@ * // => 'hi fred' */ var partial = rest(function(func, partials) { - var holders = replaceHolders(partials, partial.placeholder); + var placeholder = lodash.placeholder || partial.placeholder, + holders = replaceHolders(partials, placeholder); + return createWrapper(func, PARTIAL_FLAG, undefined, partials, holders); }); @@ -8947,7 +8953,9 @@ * // => 'hello fred' */ var partialRight = rest(function(func, partials) { - var holders = replaceHolders(partials, partialRight.placeholder); + var placeholder = lodash.placeholder || partialRight.placeholder, + holders = replaceHolders(partials, placeholder); + return createWrapper(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders); }); @@ -9086,7 +9094,7 @@ * result of the last `func` invocation. * * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked - * on the trailing edge of the timeout only if the the throttled function is + * on the trailing edge of the timeout only if the throttled function is * invoked more than once during the `wait` timeout. * * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) diff --git a/package.json b/package.json index 835876ba3..0b4dd2dd3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lodash-amd", - "version": "4.2.0", + "version": "4.2.1", "description": "Lodash exported as AMD modules.", "homepage": "https://lodash.com/custom-builds", "license": "MIT", diff --git a/partial.js b/partial.js index 6850add55..2212f4fbe 100644 --- a/partial.js +++ b/partial.js @@ -39,7 +39,9 @@ define(['./_createWrapper', './_replaceHolders', './rest'], function(createWrapp * // => 'hi fred' */ var partial = rest(function(func, partials) { - var holders = replaceHolders(partials, partial.placeholder); + var placeholder = partial.placeholder, + holders = replaceHolders(partials, placeholder); + return createWrapper(func, PARTIAL_FLAG, undefined, partials, holders); }); diff --git a/partialRight.js b/partialRight.js index 5198b051b..64aecd97a 100644 --- a/partialRight.js +++ b/partialRight.js @@ -38,7 +38,9 @@ define(['./_createWrapper', './_replaceHolders', './rest'], function(createWrapp * // => 'hello fred' */ var partialRight = rest(function(func, partials) { - var holders = replaceHolders(partials, partialRight.placeholder); + var placeholder = partialRight.placeholder, + holders = replaceHolders(partials, placeholder); + return createWrapper(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders); }); diff --git a/pullAllBy.js b/pullAllBy.js index 84b469f28..4580f5454 100644 --- a/pullAllBy.js +++ b/pullAllBy.js @@ -2,7 +2,7 @@ define(['./_baseIteratee', './_basePullAllBy'], function(baseIteratee, basePullA /** * This method is like `_.pullAll` except that it accepts `iteratee` which is - * invoked for each element of `array` and `values` to to generate the criterion + * invoked for each element of `array` and `values` to generate the criterion * by which uniqueness is computed. The iteratee is invoked with one argument: (value). * * **Note:** Unlike `_.differenceBy`, this method mutates `array`. diff --git a/throttle.js b/throttle.js index 01cba010b..bc32e5bce 100644 --- a/throttle.js +++ b/throttle.js @@ -14,7 +14,7 @@ define(['./debounce', './isObject'], function(debounce, isObject) { * result of the last `func` invocation. * * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked - * on the trailing edge of the timeout only if the the throttled function is + * on the trailing edge of the timeout only if the throttled function is * invoked more than once during the `wait` timeout. * * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)