mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Bump to v4.14.0.
This commit is contained in:
@@ -8,13 +8,14 @@ define(['./_baseToNumber', './_baseToString'], function(baseToNumber, baseToStri
|
||||
*
|
||||
* @private
|
||||
* @param {Function} operator The function to perform the operation.
|
||||
* @param {number} [defaultValue] The value used for `undefined` arguments.
|
||||
* @returns {Function} Returns the new mathematical operation function.
|
||||
*/
|
||||
function createMathOperation(operator) {
|
||||
function createMathOperation(operator, defaultValue) {
|
||||
return function(value, other) {
|
||||
var result;
|
||||
if (value === undefined && other === undefined) {
|
||||
return 0;
|
||||
return defaultValue;
|
||||
}
|
||||
if (value !== undefined) {
|
||||
result = value;
|
||||
|
||||
Reference in New Issue
Block a user