Functions
Browse all available utility functions by category
add
Adds two numbers.
Example:
add(6, 4); // 10ceil
Computes number rounded up to precision.
Example:
ceil(4.006); // 5divide
Divide two numbers.
Example:
divide(6, 4); // 1.5floor
Computes number rounded down to precision.
Example:
floor(4.006); // 4max
Computes the maximum value of array.
Example:
max([4, 2, 8, 6]); // 8maxBy
This method is like max except that it accepts iteratee which is invoked for each element in array to generate the criterion by which the value is ranked.
Example:
const objects = [{ 'n': 1 }, { 'n': 2 }];mean
Computes the mean of the values in array.
Example:
mean([4, 2, 8, 6]); // 5meanBy
This method is like mean except that it accepts iteratee which is invoked for each element in array to generate the value to be averaged.
Example:
const objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];min
Computes the minimum value of array.
Example:
min([4, 2, 8, 6]); // 2minBy
This method is like min except that it accepts iteratee which is invoked for each element in array to generate the criterion by which the value is ranked.
Example:
const objects = [{ 'n': 1 }, { 'n': 2 }];multiply
Multiply two numbers.
Example:
multiply(6, 4); // 24round
Computes number rounded to precision.
Example:
round(4.006); // 4subtract
Subtract two numbers.
Example:
subtract(6, 4); // 2sum
Computes the sum of the values in array.
Example:
sum([4, 2, 8, 6]); // 20sumBy
This method is like sum except that it accepts iteratee which is invoked for each element in array to generate the value to be summed.
Example:
const objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];