diff options
Diffstat (limited to 'tools/eslint/node_modules/lodash/add.js')
-rw-r--r-- | tools/eslint/node_modules/lodash/add.js | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/tools/eslint/node_modules/lodash/add.js b/tools/eslint/node_modules/lodash/add.js index d09785022c..d82c6522ae 100644 --- a/tools/eslint/node_modules/lodash/add.js +++ b/tools/eslint/node_modules/lodash/add.js @@ -1,8 +1,11 @@ +var createMathOperation = require('./_createMathOperation'); + /** * Adds two numbers. * * @static * @memberOf _ + * @since 3.4.0 * @category Math * @param {number} augend The first number in an addition. * @param {number} addend The second number in an addition. @@ -12,18 +15,8 @@ * _.add(6, 4); * // => 10 */ -function add(augend, addend) { - var result; - if (augend === undefined && addend === undefined) { - return 0; - } - if (augend !== undefined) { - result = augend; - } - if (addend !== undefined) { - result = result === undefined ? addend : (result + addend); - } - return result; -} +var add = createMathOperation(function(augend, addend) { + return augend + addend; +}); module.exports = add; |