mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Bump to v4.1.1.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# lodash.partial v4.1.0
|
||||
# lodash.partial v4.1.1
|
||||
|
||||
The [lodash](https://lodash.com/) method `_.partial` exported as a [Node.js](https://nodejs.org/) module.
|
||||
|
||||
@@ -15,4 +15,4 @@ In Node.js:
|
||||
var partial = require('lodash.partial');
|
||||
```
|
||||
|
||||
See the [documentation](https://lodash.com/docs#partial) or [package source](https://github.com/lodash/lodash/blob/4.1.0-npm-packages/lodash.partial) for more details.
|
||||
See the [documentation](https://lodash.com/docs#partial) or [package source](https://github.com/lodash/lodash/blob/4.1.1-npm-packages/lodash.partial) for more details.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* lodash 4.1.0 (Custom Build) <https://lodash.com/>
|
||||
* lodash 4.1.1 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modularize exports="npm" -o ./`
|
||||
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
@@ -31,7 +31,8 @@ function replaceHolders(array, placeholder) {
|
||||
result = [];
|
||||
|
||||
while (++index < length) {
|
||||
if (array[index] === placeholder) {
|
||||
var value = array[index];
|
||||
if (value === placeholder || value === PLACEHOLDER) {
|
||||
array[index] = PLACEHOLDER;
|
||||
result[++resIndex] = index;
|
||||
}
|
||||
@@ -39,6 +40,18 @@ function replaceHolders(array, placeholder) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the argument placeholder value for `func`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to inspect.
|
||||
* @returns {*} Returns the placeholder value.
|
||||
*/
|
||||
function getPlaceholder(func) {
|
||||
var object = func;
|
||||
return object.placeholder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with `partial` arguments prepended
|
||||
* to those provided to the new function. This method is like `_.bind` except
|
||||
@@ -72,9 +85,7 @@ function replaceHolders(array, placeholder) {
|
||||
* // => 'hi fred'
|
||||
*/
|
||||
var partial = rest(function(func, partials) {
|
||||
var placeholder = partial.placeholder,
|
||||
holders = replaceHolders(partials, placeholder);
|
||||
|
||||
var holders = replaceHolders(partials, getPlaceholder(partial));
|
||||
return createWrapper(func, PARTIAL_FLAG, undefined, partials, holders);
|
||||
});
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.partial",
|
||||
"version": "4.1.0",
|
||||
"version": "4.1.1",
|
||||
"description": "The lodash method `_.partial` exported as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
|
||||
Reference in New Issue
Block a user