Compare commits

...

2 Commits

Author SHA1 Message Date
jdalton
5afdc7b263 Bump to v3.4.4. 2018-02-03 19:13:31 -08:00
jdalton
5047ef35e0 Bump to v3.4.3. 2018-02-03 19:13:31 -08:00
9 changed files with 75 additions and 34 deletions

View File

@@ -1,4 +1,4 @@
# lodash v3.4.2 # lodash v3.4.4
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.

View File

@@ -1,7 +1,17 @@
Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/> Copyright jQuery Foundation and other contributors <https://jquery.org/>
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
available at https://github.com/lodash/lodash
The following license applies to all parts of this software except as
documented below:
====
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
@@ -20,3 +30,18 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
====
Copyright and related rights for sample code are waived via CC0. Sample
code is defined as all source code displayed within the prose of the
documentation.
CC0: http://creativecommons.org/publicdomain/zero/1.0/
====
Files located in the node_modules and vendor directories are externally
maintained libraries used by this software which have their own
licenses; we recommend you read them, as their terms may differ from the
terms above.

View File

@@ -1,4 +1,4 @@
# lodash.add v3.4.2 # lodash.add v3.4.4
The [lodash](https://lodash.com/) method `_.add` exported as a [Node.js](https://nodejs.org/) module. The [lodash](https://lodash.com/) method `_.add` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var add = require('lodash.add'); var add = require('lodash.add');
``` ```
See the [documentation](https://lodash.com/docs#add) or [package source](https://github.com/lodash/lodash/blob/3.4.2-npm-packages/lodash.add) for more details. See the [documentation](https://lodash.com/docs#add) or [package source](https://github.com/lodash/lodash/blob/3.4.4-npm-packages/lodash.add) for more details.

View File

@@ -1,17 +1,41 @@
/** /**
* lodash 3.4.2 (Custom Build) <https://lodash.com/> * lodash 3.4.4 (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./` * Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/> * Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license>
*/ */
/**
* Creates a function that performs a mathematical operation on two values.
*
* @private
* @param {Function} operator The function to perform the operation.
* @returns {Function} Returns the new mathematical operation function.
*/
function createMathOperation(operator) {
return function(value, other) {
var result;
if (value === undefined && other === undefined) {
return 0;
}
if (value !== undefined) {
result = value;
}
if (other !== undefined) {
result = result === undefined ? other : operator(result, other);
}
return result;
};
}
/** /**
* Adds two numbers. * Adds two numbers.
* *
* @static * @static
* @memberOf _ * @memberOf _
* @since 3.4.0
* @category Math * @category Math
* @param {number} augend The first number in an addition. * @param {number} augend The first number in an addition.
* @param {number} addend The second number in an addition. * @param {number} addend The second number in an addition.
@@ -21,15 +45,8 @@
* _.add(6, 4); * _.add(6, 4);
* // => 10 * // => 10
*/ */
function add(augend, addend) { var add = createMathOperation(function(augend, addend) {
var result; return augend + addend;
if (augend !== undefined) { });
result = augend;
}
if (addend !== undefined) {
result = result === undefined ? addend : (result + addend);
}
return result;
}
module.exports = add; module.exports = add;

View File

@@ -1,15 +1,15 @@
{ {
"name": "lodash.add", "name": "lodash.add",
"version": "3.4.2", "version": "3.4.4",
"description": "The lodash method `_.add` exported as a module.", "description": "The lodash method `_.add` exported as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",
"license": "MIT", "license": "MIT",
"keywords": "lodash, lodash-modularized, stdlib, util, add", "keywords": "lodash-modularized, add",
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"contributors": [ "contributors": [
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"Blaine Bublitz <blaine@iceddev.com> (https://github.com/phated)", "Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)" "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
], ],
"repository": "lodash/lodash", "repository": "lodash/lodash",

View File

@@ -1,4 +1,4 @@
# lodash.sortbyorder v3.4.2 # lodash.sortbyorder v3.4.4
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodashs](https://lodash.com/) `_.sortByOrder` 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 [lodashs](https://lodash.com/) `_.sortByOrder` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var sortByOrder = require('lodash.sortbyorder'); var sortByOrder = require('lodash.sortbyorder');
``` ```
See the [documentation](https://lodash.com/docs#sortByOrder) or [package source](https://github.com/lodash/lodash/blob/3.4.2-npm-packages/lodash.sortbyorder) for more details. See the [documentation](https://lodash.com/docs#sortByOrder) or [package source](https://github.com/lodash/lodash/blob/3.4.4-npm-packages/lodash.sortbyorder) for more details.

View File

@@ -1,21 +1,20 @@
/** /**
* lodash 3.4.2 (Custom Build) <https://lodash.com/> * lodash 3.4.4 (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>
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license> * Available under MIT license <https://lodash.com/license>
*/ */
var baseEach = require('lodash._baseeach'), var baseSortByOrder = require('lodash._basesortbyorder'),
baseSortByOrder = require('lodash._basesortbyorder'),
isIterateeCall = require('lodash._isiterateecall'), isIterateeCall = require('lodash._isiterateecall'),
isArray = require('lodash.isarray'); isArray = require('lodash.isarray');
/** /**
* This method is like `_.sortByAll` except that it allows specifying the * This method is like `_.sortByAll` except that it allows specifying the
* sort orders of the iteratees to sort by. A truthy value in `orders` will * sort orders of the iteratees to sort by. If `orders` is unspecified, all
* sort the corresponding property name in ascending order while a falsey * values are sorted in ascending order. Otherwise, a value is sorted in
* value will sort it in descending order. * ascending order if its corresponding order is "asc", and descending if "desc".
* *
* If a property name is provided for an iteratee the created `_.property` * If a property name is provided for an iteratee the created `_.property`
* style callback returns the property value of the given element. * style callback returns the property value of the given element.
@@ -29,7 +28,7 @@ var baseEach = require('lodash._baseeach'),
* @category Collection * @category Collection
* @param {Array|Object|string} collection The collection to iterate over. * @param {Array|Object|string} collection The collection to iterate over.
* @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
* @param {boolean[]} orders The sort orders of `iteratees`. * @param {boolean[]} [orders] The sort orders of `iteratees`.
* @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.
* @returns {Array} Returns the new sorted array. * @returns {Array} Returns the new sorted array.
* @example * @example
@@ -42,7 +41,7 @@ var baseEach = require('lodash._baseeach'),
* ]; * ];
* *
* // sort by `user` in ascending order and by `age` in descending order * // sort by `user` in ascending order and by `age` in descending order
* _.map(_.sortByOrder(users, ['user', 'age'], [true, false]), _.values); * _.map(_.sortByOrder(users, ['user', 'age'], ['asc', 'desc']), _.values);
* // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
*/ */
function sortByOrder(collection, iteratees, orders, guard) { function sortByOrder(collection, iteratees, orders, guard) {
@@ -50,7 +49,7 @@ function sortByOrder(collection, iteratees, orders, guard) {
return []; return [];
} }
if (guard && isIterateeCall(iteratees, orders, guard)) { if (guard && isIterateeCall(iteratees, orders, guard)) {
orders = null; orders = undefined;
} }
if (!isArray(iteratees)) { if (!isArray(iteratees)) {
iteratees = iteratees == null ? [] : [iteratees]; iteratees = iteratees == null ? [] : [iteratees];

View File

@@ -1,6 +1,6 @@
{ {
"name": "lodash.sortbyorder", "name": "lodash.sortbyorder",
"version": "3.4.2", "version": "3.4.4",
"description": "The modern build of lodashs `_.sortByOrder` as a module.", "description": "The modern build of lodashs `_.sortByOrder` as a module.",
"homepage": "https://lodash.com/", "homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg", "icon": "https://lodash.com/icon.svg",