mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Bump to v3.6.2.
This commit is contained in:
committed by
John-David Dalton
parent
4ed2b24773
commit
2bd7b6893d
@@ -1,4 +1,4 @@
|
|||||||
# lodash v3.6.1
|
# lodash v3.6.2
|
||||||
|
|
||||||
The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method.
|
The [lodash](https://lodash.com/) library exported as [npm packages](https://www.npmjs.com/browse/keyword/lodash-modularized) per method.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash.sum v3.6.1
|
# lodash.sum v3.6.2
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.sum` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.sum` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var sum = require('lodash.sum');
|
var sum = require('lodash.sum');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [documentation](https://lodash.com/docs#sum) or [package source](https://github.com/lodash/lodash/blob/3.6.1-npm-packages/lodash.sum) for more details.
|
See the [documentation](https://lodash.com/docs#sum) or [package source](https://github.com/lodash/lodash/blob/3.6.2-npm-packages/lodash.sum) for more details.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.6.1 (Custom Build) <https://lodash.com/>
|
* lodash 3.6.2 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
@@ -13,18 +13,20 @@ var baseCallback = require('lodash._basecallback'),
|
|||||||
isArray = require('lodash.isarray');
|
isArray = require('lodash.isarray');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A specialized version of `_.sum` for arrays without support for iteratees.
|
* A specialized version of `_.sum` for arrays without support for callback
|
||||||
|
* shorthands and `this` binding..
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Array} array The array to iterate over.
|
* @param {Array} array The array to iterate over.
|
||||||
|
* @param {Function} iteratee The function invoked per iteration.
|
||||||
* @returns {number} Returns the sum.
|
* @returns {number} Returns the sum.
|
||||||
*/
|
*/
|
||||||
function arraySum(array) {
|
function arraySum(array, iteratee) {
|
||||||
var length = array.length,
|
var length = array.length,
|
||||||
result = 0;
|
result = 0;
|
||||||
|
|
||||||
while (length--) {
|
while (length--) {
|
||||||
result += +array[length] || 0;
|
result += +iteratee(array[length]) || 0;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -80,13 +82,11 @@ function baseSum(collection, iteratee) {
|
|||||||
*/
|
*/
|
||||||
function sum(collection, iteratee, thisArg) {
|
function sum(collection, iteratee, thisArg) {
|
||||||
if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
|
if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
|
||||||
iteratee = null;
|
iteratee = undefined;
|
||||||
}
|
}
|
||||||
var noIteratee = iteratee == null;
|
iteratee = baseCallback(iteratee, thisArg, 3);
|
||||||
|
return iteratee.length == 1
|
||||||
iteratee = noIteratee ? iteratee : baseCallback(iteratee, thisArg, 3);
|
? arraySum(isArray(collection) ? collection : toIterable(collection), iteratee)
|
||||||
return noIteratee
|
|
||||||
? arraySum(isArray(collection) ? collection : toIterable(collection))
|
|
||||||
: baseSum(collection, iteratee);
|
: baseSum(collection, iteratee);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash.sum",
|
"name": "lodash.sum",
|
||||||
"version": "3.6.1",
|
"version": "3.6.2",
|
||||||
"description": "The modern build of lodash’s `_.sum` as a module.",
|
"description": "The modern build of lodash’s `_.sum` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# lodash.template v3.6.1
|
# lodash.template v3.6.2
|
||||||
|
|
||||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.template` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.template` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
|
||||||
|
|
||||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
|||||||
var template = require('lodash.template');
|
var template = require('lodash.template');
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [documentation](https://lodash.com/docs#template) or [package source](https://github.com/lodash/lodash/blob/3.6.1-npm-packages/lodash.template) for more details.
|
See the [documentation](https://lodash.com/docs#template) or [package source](https://github.com/lodash/lodash/blob/3.6.2-npm-packages/lodash.template) for more details.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* lodash 3.6.1 (Custom Build) <https://lodash.com/>
|
* lodash 3.6.2 (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
@@ -23,7 +23,7 @@ var reEmptyStringLeading = /\b__p \+= '';/g,
|
|||||||
reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
|
reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
|
||||||
reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
|
reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
|
||||||
|
|
||||||
/** Used to match [ES template delimiters](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components). */
|
/** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */
|
||||||
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
|
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
|
||||||
|
|
||||||
/** Used to ensure capturing order of template delimiters. */
|
/** Used to ensure capturing order of template delimiters. */
|
||||||
@@ -43,8 +43,7 @@ var stringEscapes = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used by `_.template` to escape characters for inclusion in compiled
|
* Used by `_.template` to escape characters for inclusion in compiled string literals.
|
||||||
* string literals.
|
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {string} chr The matched character to escape.
|
* @param {string} chr The matched character to escape.
|
||||||
@@ -72,7 +71,7 @@ var objectProto = Object.prototype;
|
|||||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
|
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
||||||
* of values.
|
* of values.
|
||||||
*/
|
*/
|
||||||
var objToString = objectProto.toString;
|
var objToString = objectProto.toString;
|
||||||
@@ -263,7 +262,7 @@ function template(string, options, otherOptions) {
|
|||||||
var settings = templateSettings.imports._.templateSettings || templateSettings;
|
var settings = templateSettings.imports._.templateSettings || templateSettings;
|
||||||
|
|
||||||
if (otherOptions && isIterateeCall(string, options, otherOptions)) {
|
if (otherOptions && isIterateeCall(string, options, otherOptions)) {
|
||||||
options = otherOptions = null;
|
options = otherOptions = undefined;
|
||||||
}
|
}
|
||||||
string = baseToString(string);
|
string = baseToString(string);
|
||||||
options = assignWith(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
|
options = assignWith(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
|
||||||
@@ -361,7 +360,7 @@ function template(string, options, otherOptions) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempts to invoke `func`, returning either the result or the caught error
|
* Attempts to invoke `func`, returning either the result or the caught error
|
||||||
* object. Any additional arguments are provided to `func` when it is invoked.
|
* object. Any additional arguments are provided to `func` when it's invoked.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash.template",
|
"name": "lodash.template",
|
||||||
"version": "3.6.1",
|
"version": "3.6.2",
|
||||||
"description": "The modern build of lodash’s `_.template` as a module.",
|
"description": "The modern build of lodash’s `_.template` as a module.",
|
||||||
"homepage": "https://lodash.com/",
|
"homepage": "https://lodash.com/",
|
||||||
"icon": "https://lodash.com/icon.svg",
|
"icon": "https://lodash.com/icon.svg",
|
||||||
|
|||||||
Reference in New Issue
Block a user