summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/cli-table2/node_modules/lodash/math/add.js
blob: 59ced2fb6e7f7576289f4947d12a637be72fbe8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/**
 * Adds two numbers.
 *
 * @static
 * @memberOf _
 * @category Math
 * @param {number} augend The first number to add.
 * @param {number} addend The second number to add.
 * @returns {number} Returns the sum.
 * @example
 *
 * _.add(6, 4);
 * // => 10
 */
function add(augend, addend) {
  return (+augend || 0) + (+addend || 0);
}

module.exports = add;