From f685a945be42a60e85593c4e062a2821165f740a Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 29 Dec 2017 11:01:28 +0000 Subject: [PATCH 01/36] Travis build: 475 --- README.md | 24 ++++++++++++++++++++++++ docs/index.html | 8 ++++++++ 2 files changed, 32 insertions(+) diff --git a/README.md b/README.md index bde7d8eff..9ef8e268f 100644 --- a/README.md +++ b/README.md @@ -223,6 +223,7 @@ * [`repeatString`](#repeatstring) * [`reverseString`](#reversestring) * [`sortCharactersInString`](#sortcharactersinstring) +* [`splitLines`](#splitlines) * [`toCamelCase`](#tocamelcase) * [`toKebabCase`](#tokebabcase) * [`toSnakeCase`](#tosnakecase) @@ -3577,6 +3578,29 @@ sortCharactersInString('cabbage'); // 'aabbceg' [⬆ Back to top](#table-of-contents) +### splitLines + +Splits a multiline string into an array of lines. + +Use `String.split()` and a regular expression to match line breaks and create an array. + +```js +const splitLines = str => str.split(/\r?\n/); +``` + +
+Examples + +```js +splitLines('This\nis a\nmultiline\nstring.\n'); // ['This', 'is a', 'multiline', 'string' , ''] +``` + +
+ + +[⬆ Back to top](#table-of-contents) + + ### toCamelCase Converts a string to camelcase. diff --git a/docs/index.html b/docs/index.html index 9fbd42386..240784560 100644 --- a/docs/index.html +++ b/docs/index.html @@ -244,6 +244,7 @@ repeatString reverseString sortCharactersInString +splitLines toCamelCase toKebabCase toSnakeCase @@ -1587,6 +1588,13 @@ Combine characters to get a string using join('').

sortCharactersInString('cabbage'); // 'aabbceg'
 
+

splitLines

+

Splits a multiline string into an array of lines.

+

Use String.split() and a regular expression to match line breaks and create an array.

+
const splitLines = str => str.split(/\r?\n/);
+
+
splitLines('This\nis a\nmultiline\nstring.\n'); // ['This', 'is a', 'multiline', 'string' , '']
+

toCamelCase

Converts a string to camelcase.

Break the string into words and combine them capitalizing the first letter of each word. From c01af9113455629208aafae0789d2f0f58394982 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 29 Dec 2017 11:02:57 +0000 Subject: [PATCH 02/36] Travis build: 476 --- README.md | 24 ------------------------ docs/index.html | 8 -------- 2 files changed, 32 deletions(-) diff --git a/README.md b/README.md index 9ef8e268f..bde7d8eff 100644 --- a/README.md +++ b/README.md @@ -223,7 +223,6 @@ * [`repeatString`](#repeatstring) * [`reverseString`](#reversestring) * [`sortCharactersInString`](#sortcharactersinstring) -* [`splitLines`](#splitlines) * [`toCamelCase`](#tocamelcase) * [`toKebabCase`](#tokebabcase) * [`toSnakeCase`](#tosnakecase) @@ -3578,29 +3577,6 @@ sortCharactersInString('cabbage'); // 'aabbceg' [⬆ Back to top](#table-of-contents) -### splitLines - -Splits a multiline string into an array of lines. - -Use `String.split()` and a regular expression to match line breaks and create an array. - -```js -const splitLines = str => str.split(/\r?\n/); -``` - -

-Examples - -```js -splitLines('This\nis a\nmultiline\nstring.\n'); // ['This', 'is a', 'multiline', 'string' , ''] -``` - -
- - -[⬆ Back to top](#table-of-contents) - - ### toCamelCase Converts a string to camelcase. diff --git a/docs/index.html b/docs/index.html index 240784560..9fbd42386 100644 --- a/docs/index.html +++ b/docs/index.html @@ -244,7 +244,6 @@ repeatString reverseString sortCharactersInString -splitLines toCamelCase toKebabCase toSnakeCase @@ -1588,13 +1587,6 @@ Combine characters to get a string using join('').

sortCharactersInString('cabbage'); // 'aabbceg'
 
-

splitLines

-

Splits a multiline string into an array of lines.

-

Use String.split() and a regular expression to match line breaks and create an array.

-
const splitLines = str => str.split(/\r?\n/);
-
-
splitLines('This\nis a\nmultiline\nstring.\n'); // ['This', 'is a', 'multiline', 'string' , '']
-

toCamelCase

Converts a string to camelcase.

Break the string into words and combine them capitalizing the first letter of each word. From 12d83c89bfad393c1bc40c7933d70107706664c7 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 29 Dec 2017 11:16:09 +0000 Subject: [PATCH 03/36] Travis build: 483 --- README.md | 76 +++++++++---------------------------------------- docs/index.html | 48 ++++++++++--------------------- snippets/gcd.md | 2 +- snippets/lcm.md | 6 ++-- tag_database | 2 -- 5 files changed, 32 insertions(+), 102 deletions(-) diff --git a/README.md b/README.md index bde7d8eff..76f4f0ded 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,6 @@

View contents -* [`arrayGcd`](#arraygcd) -* [`arrayLcm`](#arraylcm) * [`arrayMax`](#arraymax) * [`arrayMin`](#arraymin) * [`chunk`](#chunk) @@ -427,61 +425,6 @@ arrayMax([1, 2, 4]); // 4 ## Array -### arrayGcd - -Calculates the greatest common denominator (gcd) of an array of numbers. - -Use `Array.reduce()` and the `gcd` formula (uses recursion) to calculate the greatest common denominator of an array of numbers. - -```js -const arrayGcd = arr => { - const gcd = (x, y) => (!y ? x : gcd(y, x % y)); - return arr.reduce((a, b) => gcd(a, b)); -}; -``` - -
-Examples - -```js -arrayGcd([1, 2, 3, 4, 5]); // 1 -arrayGcd([4, 8, 12]); // 4 -``` - -
- - -[⬆ Back to top](#table-of-contents) - - -### arrayLcm - -Calculates the lowest common multiple (lcm) of an array of numbers. - -Use `Array.reduce()` and the `lcm` formula (uses recursion) to calculate the lowest common multiple of an array of numbers. - -```js -const arrayLcm = arr => { - const gcd = (x, y) => (!y ? x : gcd(y, x % y)); - const lcm = (x, y) => x * y / gcd(x, y); - return arr.reduce((a, b) => lcm(a, b)); -}; -``` - -
-Examples - -```js -arrayLcm([1, 2, 3, 4, 5]); // 60 -arrayLcm([4, 8, 12]); // 24 -``` - -
- - -[⬆ Back to top](#table-of-contents) - - ### arrayMax Returns the maximum value in an array. @@ -2567,14 +2510,18 @@ fibonacciCountUntilNum(10); // 7 ### gcd -Calculates the greatest common divisor between two numbers. +Calculates the greatest common divisor between two or more numbers/arrays. -Use recursion. +The `helperGcd `function uses recursion. Base case is when `y` equals `0`. In this case, return `x`. Otherwise, return the GCD of `y` and the remainder of the division `x/y`. ```js -const gcd = (x, y) => (!y ? x : gcd(y, x % y)); +const gcd = (...arr) => { + let data = [].concat(...arr); + const helperGcd = (x, y) => (!y ? x : gcd(y, x % y)); + return data.reduce((a, b) => helperGcd(a, b)); +}; ```
@@ -2750,15 +2697,17 @@ isPrime(12); // false ### lcm -Returns the least common multiple of two numbers. +Returns the least common multiple of two or numbers/arrays. Use the greatest common divisor (GCD) formula and `Math.abs()` to determine the least common multiple. The GCD formula uses recursion. ```js -const lcm = (x, y) => { +const lcm = (...arr) => { + let data = [].concat(...arr); const gcd = (x, y) => (!y ? x : gcd(y, x % y)); - return Math.abs(x * y) / gcd(x, y); + const helperLcm = (x, y) => x * y / gcd(x, y); + return arr.reduce((a, b) => helperLcm(a, b)); }; ``` @@ -2767,6 +2716,7 @@ const lcm = (x, y) => { ```js lcm(12, 7); // 84 +lcm([1, 3, 4], 5); // 60 ```
diff --git a/docs/index.html b/docs/index.html index 9fbd42386..46e60878d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -107,9 +107,7 @@ spreadOver

Array -

arrayGcd -arrayLcm -arrayMax +arrayMax arrayMin chunk compact @@ -342,30 +340,7 @@ arrayMax([1, 2, 3]); // 3 arrayMax([1, 2, 4]); // 4

Array

-

arrayGcd

-

Calculates the greatest common denominator (gcd) of an array of numbers.

-

Use Array.reduce() and the gcd formula (uses recursion) to calculate the greatest common denominator of an array of numbers.

-
const arrayGcd = arr => {
-  const gcd = (x, y) => (!y ? x : gcd(y, x % y));
-  return arr.reduce((a, b) => gcd(a, b));
-};
-
-
arrayGcd([1, 2, 3, 4, 5]); // 1
-arrayGcd([4, 8, 12]); // 4
-
-

arrayLcm

-

Calculates the lowest common multiple (lcm) of an array of numbers.

-

Use Array.reduce() and the lcm formula (uses recursion) to calculate the lowest common multiple of an array of numbers.

-
const arrayLcm = arr => {
-  const gcd = (x, y) => (!y ? x : gcd(y, x % y));
-  const lcm = (x, y) => x * y / gcd(x, y);
-  return arr.reduce((a, b) => lcm(a, b));
-};
-
-
arrayLcm([1, 2, 3, 4, 5]); // 60
-arrayLcm([4, 8, 12]); // 24
-
-

arrayMax

+

arrayMax

Returns the maximum value in an array.

Use Math.max() combined with the spread operator (...) to get the maximum value in the array.

const arrayMax = arr => Math.max(...arr);
@@ -1170,11 +1145,15 @@ Uses a mathematical formula to calculate the length of the array required.

fibonacciCountUntilNum(10); // 7
 

gcd

-

Calculates the greatest common divisor between two numbers.

-

Use recursion. +

Calculates the greatest common divisor between two or more numbers/arrays.

+

The helperGcdfunction uses recursion. Base case is when y equals 0. In this case, return x. Otherwise, return the GCD of y and the remainder of the division x/y.

-
const gcd = (x, y) => (!y ? x : gcd(y, x % y));
+
const gcd = (...arr) => {
+  let data = [].concat(...arr);
+  const helperGcd = (x, y) => (!y ? x : gcd(y, x % y));
+  return data.reduce((a, b) => helperGcd(a, b));
+};
 
gcd(8, 36); // 4
 
@@ -1241,15 +1220,18 @@ Return false if any of them divides the given number, else return < isPrime(12); // false

lcm

-

Returns the least common multiple of two numbers.

+

Returns the least common multiple of two or numbers/arrays.

Use the greatest common divisor (GCD) formula and Math.abs() to determine the least common multiple. The GCD formula uses recursion.

-
const lcm = (x, y) => {
+
const lcm = (...arr) => {
+  let data = [].concat(...arr);
   const gcd = (x, y) => (!y ? x : gcd(y, x % y));
-  return Math.abs(x * y) / gcd(x, y);
+  const helperLcm = (x, y) => x * y / gcd(x, y);
+  return arr.reduce((a, b) => helperLcm(a, b));
 };
 
lcm(12, 7); // 84
+lcm([1, 3, 4], 5); // 60
 

median

Returns the median of an array of numbers.

diff --git a/snippets/gcd.md b/snippets/gcd.md index 8c4011b4d..f450bbfa1 100644 --- a/snippets/gcd.md +++ b/snippets/gcd.md @@ -11,7 +11,7 @@ const gcd = (...arr) => { let data = [].concat(...arr); const helperGcd = (x, y) => (!y ? x : gcd(y, x % y)); return data.reduce((a, b) => helperGcd(a, b)); -} +}; ``` ```js diff --git a/snippets/lcm.md b/snippets/lcm.md index 215158c30..e7bb6a3e0 100644 --- a/snippets/lcm.md +++ b/snippets/lcm.md @@ -10,11 +10,11 @@ const lcm = (...arr) => { let data = [].concat(...arr); const gcd = (x, y) => (!y ? x : gcd(y, x % y)); const helperLcm = (x, y) => x * y / gcd(x, y); - return arr.reduce((a, b) => helperLcm(a, b)) -} + return arr.reduce((a, b) => helperLcm(a, b)); +}; ``` ```js lcm(12, 7); // 84 -lcm([1,3,4],5); // 60 +lcm([1, 3, 4], 5); // 60 ``` diff --git a/tag_database b/tag_database index 5f4e45246..8a579166f 100644 --- a/tag_database +++ b/tag_database @@ -1,7 +1,5 @@ anagrams:string arrayAverage:math -arrayGcd:array -arrayLcm:array arrayMax:array arrayMin:array arraySum:math From dd2462842ebdcd448e011fa61cd4288eb8207642 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 29 Dec 2017 11:39:09 +0000 Subject: [PATCH 04/36] Travis build: 489 --- README.md | 174 ++++++++++++++++++++++-------------------------- docs/index.html | 76 +++++++++++---------- snippets/max.md | 1 + tag_database | 8 +-- 4 files changed, 123 insertions(+), 136 deletions(-) diff --git a/README.md b/README.md index 76f4f0ded..fbb0bc525 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,6 @@
View contents -* [`arrayMax`](#arraymax) -* [`arrayMin`](#arraymin) * [`chunk`](#chunk) * [`compact`](#compact) * [`countOccurrences`](#countoccurrences) @@ -142,8 +140,6 @@
View contents -* [`arrayAverage`](#arrayaverage) -* [`arraySum`](#arraysum) * [`clampNumber`](#clampnumber) * [`collatz`](#collatz) * [`digitize`](#digitize) @@ -255,6 +251,18 @@
+### _Uncategorized_ + +
+View contents + +* [`average`](#average) +* [`max`](#max) +* [`min`](#min) +* [`sum`](#sum) + +
+ ## Adapter ### call @@ -425,52 +433,6 @@ arrayMax([1, 2, 4]); // 4 ## Array -### arrayMax - -Returns the maximum value in an array. - -Use `Math.max()` combined with the spread operator (`...`) to get the maximum value in the array. - -```js -const arrayMax = arr => Math.max(...arr); -``` - -
-Examples - -```js -arrayMax([10, 1, 5]); // 10 -``` - -
- - -[⬆ Back to top](#table-of-contents) - - -### arrayMin - -Returns the minimum value in an array. - -Use `Math.min()` combined with the spread operator (`...`) to get the minimum value in the array. - -```js -const arrayMin = arr => Math.min(...arr); -``` - -
-Examples - -```js -arrayMin([10, 1, 5]); // 1 -``` - -
- - -[⬆ Back to top](#table-of-contents) - - ### chunk Chunks an array into smaller arrays of a specified size. @@ -2251,52 +2213,6 @@ negate(isOdd)(1); // false ## Math -### arrayAverage - -Returns the average of an array of numbers. - -Use `Array.reduce()` to add each value to an accumulator, initialized with a value of `0`, divide by the `length` of the array. - -```js -const arrayAverage = arr => arr.reduce((acc, val) => acc + val, 0) / arr.length; -``` - -
-Examples - -```js -arrayAverage([1, 2, 3]); // 2 -``` - -
- - -[⬆ Back to top](#table-of-contents) - - -### arraySum - -Returns the sum of an array of numbers. - -Use `Array.reduce()` to add each value to an accumulator, initialized with a value of `0`. - -```js -const arraySum = arr => arr.reduce((acc, val) => acc + val, 0); -``` - -
-Examples - -```js -arraySum([1, 2, 3, 4]); // 10 -``` - -
- - -[⬆ Back to top](#table-of-contents) - - ### clampNumber Clamps `num` within the inclusive range specified by the boundary values `a` and `b`. @@ -4158,6 +4074,72 @@ validateNumber('10'); // true [⬆ Back to top](#table-of-contents) +## _Uncategorized_ + +### average + +Returns the average of an of two or more numbers/arrays. + +Use `Array.reduce()` to add each value to an accumulator, initialized with a value of `0`, divide by the `length` of the array. + +```js +const average = (...arr) => [].concat(...arr).reduce((acc, val) => acc + val, 0) / arr.length; +``` + +```js +average([1, 2, 3]); // 2 +``` + +[⬆ back to top](#table-of-contents) + +### max + +Returns the maximum value out of two or more numbers/arrays. + +Use `Math.max()` combined with the spread operator (`...`) to get the maximum value in the array. + +```js + +const max = (...arr) => Math.max(...[].concat(...arr); +``` + +```js +max([10, 1, 5]); // 10 +``` + +[⬆ back to top](#table-of-contents) + +### min + +Returns the minimum value in an array. + +Use `Math.min()` combined with the spread operator (`...`) to get the minimum value in the array. + +```js +const min = arr => Math.min(...[].concat(...arr)); +``` + +```js +min([10, 1, 5]); // 1 +``` + +[⬆ back to top](#table-of-contents) + +### sum + +Returns the sum of an of two or more numbers/arrays. + +Use `Array.reduce()` to add each value to an accumulator, initialized with a value of `0`. + +```js +const sum = (...arr) => [].concat(...arr).reduce((acc, val) => acc + val, 0); +``` + +```js +sum([1, 2, 3, 4]); // 10 +``` + +[⬆ back to top](#table-of-contents) ## Credits diff --git a/docs/index.html b/docs/index.html index 46e60878d..004f9145a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -107,9 +107,7 @@ spreadOver

Array -

arrayMax -arrayMin -chunk +chunk compact countOccurrences deepFlatten @@ -187,9 +185,7 @@ negate

Math -

arrayAverage -arraySum -clampNumber +clampNumber collatz digitize distance @@ -268,6 +264,12 @@ toOrdinalSuffix validateNumber +

Uncategorized +

average +max +min +sum +
 

Adapter

call

Given a key and a set of arguments, call them when given a context. Primarily useful in composition.

@@ -340,21 +342,7 @@ arrayMax([1, 2, 3]); // 3 arrayMax([1, 2, 4]); // 4

Array

-

arrayMax

-

Returns the maximum value in an array.

-

Use Math.max() combined with the spread operator (...) to get the maximum value in the array.

-
const arrayMax = arr => Math.max(...arr);
-
-
arrayMax([10, 1, 5]); // 10
-
-

arrayMin

-

Returns the minimum value in an array.

-

Use Math.min() combined with the spread operator (...) to get the minimum value in the array.

-
const arrayMin = arr => Math.min(...arr);
-
-
arrayMin([10, 1, 5]); // 1
-
-

chunk

+

chunk

Chunks an array into smaller arrays of a specified size.

Use Array.from() to create a new array, that fits the number of chunks that will be produced. Use Array.slice() to map each element of the new array to a chunk the length of size. @@ -1047,21 +1035,7 @@ runPromisesInSeries([() => delay(1000), () => delay(2000)]); // //executes negate(isOdd)(1); // false


Math

-

arrayAverage

-

Returns the average of an array of numbers.

-

Use Array.reduce() to add each value to an accumulator, initialized with a value of 0, divide by the length of the array.

-
const arrayAverage = arr => arr.reduce((acc, val) => acc + val, 0) / arr.length;
-
-
arrayAverage([1, 2, 3]); // 2
-
-

arraySum

-

Returns the sum of an array of numbers.

-

Use Array.reduce() to add each value to an accumulator, initialized with a value of 0.

-
const arraySum = arr => arr.reduce((acc, val) => acc + val, 0);
-
-
arraySum([1, 2, 3, 4]); // 10
-
-

clampNumber

+

clampNumber

Clamps num within the inclusive range specified by the boundary values a and b.

If num falls within the range, return num. Otherwise, return the nearest number in the range.

@@ -1836,6 +1810,36 @@ Use Number() to check if the coercion holds.

validateNumber('10'); // true
 
+

Uncategorized

+

average

+

Returns the average of an of two or more numbers/arrays.

+

Use Array.reduce() to add each value to an accumulator, initialized with a value of 0, divide by the length of the array.

+
const average = (...arr) => [].concat(...arr).reduce((acc, val) => acc + val, 0) / arr.length;
+
+
average([1, 2, 3]); // 2
+
+

max

+

Returns the maximum value out of two or more numbers/arrays.

+

Use Math.max() combined with the spread operator (...) to get the maximum value in the array.

+

+const max = (...arr) => Math.max(...[].concat(...arr);
+
+
max([10, 1, 5]); // 10
+
+

min

+

Returns the minimum value in an array.

+

Use Math.min() combined with the spread operator (...) to get the minimum value in the array.

+
const min = arr => Math.min(...[].concat(...arr));
+
+
min([10, 1, 5]); // 1
+
+

sum

+

Returns the sum of an of two or more numbers/arrays.

+

Use Array.reduce() to add each value to an accumulator, initialized with a value of 0.

+
const sum = (...arr) => [].concat(...arr).reduce((acc, val) => acc + val, 0);
+
+
sum([1, 2, 3, 4]); // 10
+

30 seconds of code is licensed under the CC0-1.0 license.
Icons made by Smashicons from www.flaticon.com is licensed by CC 3.0 BY.
Ribbon made by Tim Holman is licensed by The MIT License
Built with the mini.css framework.

diff --git a/snippets/max.md b/snippets/max.md index 9f6bde286..c90c6d655 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -5,6 +5,7 @@ Returns the maximum value out of two or more numbers/arrays. Use `Math.max()` combined with the spread operator (`...`) to get the maximum value in the array. ```js + const max = (...arr) => Math.max(...[].concat(...arr); ``` diff --git a/tag_database b/tag_database index 8a579166f..5c3a9153b 100644 --- a/tag_database +++ b/tag_database @@ -1,9 +1,6 @@ anagrams:string -arrayAverage:math -arrayMax:array -arrayMin:array -arraySum:math arrayToHtmlList:browser +average:uncategorized bottomVisible:browser call:adapter capitalize:string @@ -79,7 +76,9 @@ JSONToFile:node last:array lcm:math mapObject:array +max:uncategorized median:math +min:uncategorized negate:logic nthElement:array objectFromPairs:object @@ -121,6 +120,7 @@ sortCharactersInString:string speechSynthesis:media spreadOver:adapter standardDeviation:math +sum:uncategorized symmetricDifference:array tail:array take:array From 9bcdc168469976dcba410cdc0ab36d2d2edca0a2 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 29 Dec 2017 11:40:49 +0000 Subject: [PATCH 05/36] Travis build: 490 --- README.md | 1 + docs/index.html | 1 + snippets/max.md | 1 + 3 files changed, 3 insertions(+) diff --git a/README.md b/README.md index fbb0bc525..6a85eb82a 100644 --- a/README.md +++ b/README.md @@ -4100,6 +4100,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va ```js + const max = (...arr) => Math.max(...[].concat(...arr); ``` diff --git a/docs/index.html b/docs/index.html index 004f9145a..ad6207147 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1822,6 +1822,7 @@ Use Number() to check if the coercion holds.

Returns the maximum value out of two or more numbers/arrays.

Use Math.max() combined with the spread operator (...) to get the maximum value in the array.


+
 const max = (...arr) => Math.max(...[].concat(...arr);
 
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index c90c6d655..7c09c9725 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -6,6 +6,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 ```js
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 

From a9823509c03bd586e746cae4644beff2575211a1 Mon Sep 17 00:00:00 2001
From: Travis CI 
Date: Fri, 29 Dec 2017 11:42:20 +0000
Subject: [PATCH 06/36] Travis build: 491

---
 README.md       | 1 +
 docs/index.html | 1 +
 snippets/max.md | 1 +
 3 files changed, 3 insertions(+)

diff --git a/README.md b/README.md
index 6a85eb82a..09f3d8c7b 100644
--- a/README.md
+++ b/README.md
@@ -4101,6 +4101,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 ```js
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 
diff --git a/docs/index.html b/docs/index.html
index ad6207147..5e025847b 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1823,6 +1823,7 @@ Use Number() to check if the coercion holds.

Use Math.max() combined with the spread operator (...) to get the maximum value in the array.


 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index 7c09c9725..b2d9ba2a7 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -7,6 +7,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 ```js
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 

From dfa7c93f7f8028cb910f99b5c3635050f6e88897 Mon Sep 17 00:00:00 2001
From: Travis CI 
Date: Fri, 29 Dec 2017 11:43:36 +0000
Subject: [PATCH 07/36] Travis build: 492

---
 README.md       | 1 +
 docs/index.html | 1 +
 snippets/max.md | 1 +
 3 files changed, 3 insertions(+)

diff --git a/README.md b/README.md
index 09f3d8c7b..67ef26c52 100644
--- a/README.md
+++ b/README.md
@@ -4102,6 +4102,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 
diff --git a/docs/index.html b/docs/index.html
index 5e025847b..91fe1a5bb 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1824,6 +1824,7 @@ Use Number() to check if the coercion holds.


 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index b2d9ba2a7..0fe2586b7 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -8,6 +8,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 

From fb8f6dc88c002351e7c2b7ce43049470bfd1a9f6 Mon Sep 17 00:00:00 2001
From: Travis CI 
Date: Fri, 29 Dec 2017 11:44:56 +0000
Subject: [PATCH 08/36] Travis build: 494

---
 README.md       | 1 +
 docs/index.html | 1 +
 snippets/max.md | 1 +
 3 files changed, 3 insertions(+)

diff --git a/README.md b/README.md
index 67ef26c52..bcd856bbd 100644
--- a/README.md
+++ b/README.md
@@ -4103,6 +4103,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 
diff --git a/docs/index.html b/docs/index.html
index 91fe1a5bb..bfe5b59d5 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1825,6 +1825,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr);
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index 0fe2586b7..7ba4ad2f1 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -9,6 +9,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 

From 272300f1271085ddb6a867768f168b93f0f4238e Mon Sep 17 00:00:00 2001
From: Travis CI 
Date: Fri, 29 Dec 2017 11:46:32 +0000
Subject: [PATCH 09/36] Travis build: 496

---
 README.md       | 1 +
 docs/index.html | 1 +
 snippets/max.md | 1 +
 3 files changed, 3 insertions(+)

diff --git a/README.md b/README.md
index bcd856bbd..12b73701d 100644
--- a/README.md
+++ b/README.md
@@ -4104,6 +4104,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 
diff --git a/docs/index.html b/docs/index.html
index bfe5b59d5..fd39cde22 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1826,6 +1826,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr);
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index 7ba4ad2f1..8cf3153ff 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -10,6 +10,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 

From 2d4d244d0d6431e3cd5f8fd2b32df63fcdeb3147 Mon Sep 17 00:00:00 2001
From: Angelos Chalaris 
Date: Fri, 29 Dec 2017 13:46:52 +0200
Subject: [PATCH 10/36] Update build-script.js

---
 scripts/build-script.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/build-script.js b/scripts/build-script.js
index 891b51cce..61d1c693b 100644
--- a/scripts/build-script.js
+++ b/scripts/build-script.js
@@ -73,7 +73,7 @@ try {
     if(capitalize(tag, true)=='Uncategorized') {
       uncategorizedOutput +=`## _${capitalize(tag, true)}_\n`;
       for(let taggedSnippet of Object.entries(tagDbData).filter(v => v[1] === tag))
-        uncategorizedOutput += `\n${snippets[taggedSnippet[0]+'.md']+'\n[⬆ back to top](#table-of-contents)\n'}`;
+        uncategorizedOutput += `\n${snippets[taggedSnippet[0]+'.md']+'\n
[⬆ back to top](#table-of-contents)\n\n'}`; } else { output +=`## ${capitalize(tag, true)}\n`; for(let taggedSnippet of Object.entries(tagDbData).filter(v => v[1] === tag)){ From d9c4cae1b09195550a098d77e1f172d267daa434 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 29 Dec 2017 11:48:13 +0000 Subject: [PATCH 11/36] Travis build: 499 --- README.md | 13 +++++++++---- docs/index.html | 1 + snippets/max.md | 1 + 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 12b73701d..4e0a0218b 100644 --- a/README.md +++ b/README.md @@ -4090,7 +4090,8 @@ const average = (...arr) => [].concat(...arr).reduce((acc, val) => acc + val, 0) average([1, 2, 3]); // 2 ``` -[⬆ back to top](#table-of-contents) +
[⬆ back to top](#table-of-contents) + ### max @@ -4105,6 +4106,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr); ``` @@ -4112,7 +4114,8 @@ const max = (...arr) => Math.max(...[].concat(...arr); max([10, 1, 5]); // 10 ``` -[⬆ back to top](#table-of-contents) +
[⬆ back to top](#table-of-contents) + ### min @@ -4128,7 +4131,8 @@ const min = arr => Math.min(...[].concat(...arr)); min([10, 1, 5]); // 1 ``` -[⬆ back to top](#table-of-contents) +
[⬆ back to top](#table-of-contents) + ### sum @@ -4144,7 +4148,8 @@ const sum = (...arr) => [].concat(...arr).reduce((acc, val) => acc + val, 0); sum([1, 2, 3, 4]); // 10 ``` -[⬆ back to top](#table-of-contents) +
[⬆ back to top](#table-of-contents) + ## Credits diff --git a/docs/index.html b/docs/index.html index fd39cde22..1a2f482cc 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1827,6 +1827,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr);
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index 8cf3153ff..a4c558f87 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -11,6 +11,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 

From c7aa5577887bf7643e1f97ad56992cf5eb3b7ec3 Mon Sep 17 00:00:00 2001
From: Travis CI 
Date: Fri, 29 Dec 2017 11:49:39 +0000
Subject: [PATCH 12/36] Travis build: 502

---
 README.md       | 1 +
 docs/index.html | 1 +
 snippets/max.md | 1 +
 3 files changed, 3 insertions(+)

diff --git a/README.md b/README.md
index 4e0a0218b..fd4b8ca85 100644
--- a/README.md
+++ b/README.md
@@ -4107,6 +4107,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 
diff --git a/docs/index.html b/docs/index.html
index 1a2f482cc..31cb96ec6 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1828,6 +1828,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr);
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index a4c558f87..cebe29371 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -12,6 +12,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 

From 5826f0d67b876d4e277f63297c53234c5d1449c2 Mon Sep 17 00:00:00 2001
From: Travis CI 
Date: Fri, 29 Dec 2017 11:51:37 +0000
Subject: [PATCH 13/36] Travis build: 504

---
 README.md       | 1 +
 docs/index.html | 1 +
 snippets/max.md | 1 +
 3 files changed, 3 insertions(+)

diff --git a/README.md b/README.md
index fd4b8ca85..e87a7a70a 100644
--- a/README.md
+++ b/README.md
@@ -4108,6 +4108,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 
diff --git a/docs/index.html b/docs/index.html
index 31cb96ec6..3d0e7717d 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1829,6 +1829,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr);
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index cebe29371..fa12b8760 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -13,6 +13,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 

From 74da7dffda1cbd4865d4ad90ea38b042963eab07 Mon Sep 17 00:00:00 2001
From: Travis CI 
Date: Fri, 29 Dec 2017 11:52:54 +0000
Subject: [PATCH 14/36] Travis build: 506

---
 README.md       | 1 +
 docs/index.html | 1 +
 snippets/max.md | 1 +
 3 files changed, 3 insertions(+)

diff --git a/README.md b/README.md
index e87a7a70a..ea3a1fa7e 100644
--- a/README.md
+++ b/README.md
@@ -4109,6 +4109,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 
diff --git a/docs/index.html b/docs/index.html
index 3d0e7717d..8b1fcfd19 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1830,6 +1830,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr);
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index fa12b8760..e5e6beb15 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -14,6 +14,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 

From 152f0b04039d8fe6ee0f2bbafbf5d53ac9694f5e Mon Sep 17 00:00:00 2001
From: Travis CI 
Date: Fri, 29 Dec 2017 11:54:19 +0000
Subject: [PATCH 15/36] Travis build: 508

---
 README.md       | 1 +
 docs/index.html | 1 +
 snippets/max.md | 1 +
 3 files changed, 3 insertions(+)

diff --git a/README.md b/README.md
index ea3a1fa7e..9422dad7b 100644
--- a/README.md
+++ b/README.md
@@ -4110,6 +4110,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 
diff --git a/docs/index.html b/docs/index.html
index 8b1fcfd19..f5b11ff98 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1831,6 +1831,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr);
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index e5e6beb15..578e8b423 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -15,6 +15,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 

From 51f73ad0bdc60c2bae0becb238382e2d2fdf18c6 Mon Sep 17 00:00:00 2001
From: Travis CI 
Date: Fri, 29 Dec 2017 11:55:51 +0000
Subject: [PATCH 16/36] Travis build: 510

---
 README.md       | 1 +
 docs/index.html | 1 +
 snippets/max.md | 1 +
 3 files changed, 3 insertions(+)

diff --git a/README.md b/README.md
index 9422dad7b..ff5e6a15e 100644
--- a/README.md
+++ b/README.md
@@ -4111,6 +4111,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 
diff --git a/docs/index.html b/docs/index.html
index f5b11ff98..5bf64d564 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1832,6 +1832,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr);
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index 578e8b423..d903bff80 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -16,6 +16,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 

From 200823508464c6789649b4157c6f436906651021 Mon Sep 17 00:00:00 2001
From: Travis CI 
Date: Fri, 29 Dec 2017 11:57:20 +0000
Subject: [PATCH 17/36] Travis build: 512

---
 README.md       | 1 +
 docs/index.html | 1 +
 snippets/max.md | 1 +
 3 files changed, 3 insertions(+)

diff --git a/README.md b/README.md
index ff5e6a15e..74dd56a69 100644
--- a/README.md
+++ b/README.md
@@ -4112,6 +4112,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 
diff --git a/docs/index.html b/docs/index.html
index 5bf64d564..619807248 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1833,6 +1833,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr);
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index d903bff80..788a5d7d9 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -17,6 +17,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 

From a13e29d78711cac05dc655057481b30436ddd3ff Mon Sep 17 00:00:00 2001
From: Travis CI 
Date: Fri, 29 Dec 2017 11:58:38 +0000
Subject: [PATCH 18/36] Travis build: 514

---
 README.md       | 1 +
 docs/index.html | 1 +
 snippets/max.md | 1 +
 3 files changed, 3 insertions(+)

diff --git a/README.md b/README.md
index 74dd56a69..af30ad301 100644
--- a/README.md
+++ b/README.md
@@ -4113,6 +4113,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 
diff --git a/docs/index.html b/docs/index.html
index 619807248..b7c36276c 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1834,6 +1834,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr);
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index 788a5d7d9..c422b86fb 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -18,6 +18,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 

From bb106f6a069eee0b03408b5575dea039b6449723 Mon Sep 17 00:00:00 2001
From: Travis CI 
Date: Fri, 29 Dec 2017 11:59:51 +0000
Subject: [PATCH 19/36] Travis build: 515

---
 README.md       | 1 +
 docs/index.html | 1 +
 snippets/max.md | 1 +
 3 files changed, 3 insertions(+)

diff --git a/README.md b/README.md
index af30ad301..89ba6ed73 100644
--- a/README.md
+++ b/README.md
@@ -4114,6 +4114,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 
diff --git a/docs/index.html b/docs/index.html
index b7c36276c..8fc47ae44 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1835,6 +1835,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr);
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index c422b86fb..3265868b9 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -19,6 +19,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 

From d28c5de1444850542e1c75a56f37b3e034a72536 Mon Sep 17 00:00:00 2001
From: Travis CI 
Date: Fri, 29 Dec 2017 12:01:39 +0000
Subject: [PATCH 20/36] Travis build: 516

---
 README.md       | 1 +
 docs/index.html | 1 +
 snippets/max.md | 1 +
 3 files changed, 3 insertions(+)

diff --git a/README.md b/README.md
index 89ba6ed73..fcb494629 100644
--- a/README.md
+++ b/README.md
@@ -4115,6 +4115,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 
diff --git a/docs/index.html b/docs/index.html
index 8fc47ae44..9948ab399 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1836,6 +1836,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr);
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index 3265868b9..3070bd453 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -20,6 +20,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 

From 6519744f9740ca4b3edf777d36776a079e776a11 Mon Sep 17 00:00:00 2001
From: Travis CI 
Date: Fri, 29 Dec 2017 12:02:58 +0000
Subject: [PATCH 21/36] Travis build: 517

---
 README.md       | 1 +
 docs/index.html | 1 +
 snippets/max.md | 1 +
 3 files changed, 3 insertions(+)

diff --git a/README.md b/README.md
index fcb494629..28ff5729f 100644
--- a/README.md
+++ b/README.md
@@ -4116,6 +4116,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 
diff --git a/docs/index.html b/docs/index.html
index 9948ab399..f32dbeab8 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1837,6 +1837,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr);
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index 3070bd453..c7e761d95 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -21,6 +21,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 

From d00d8f5fa952d39bce4b7b4fd7780c093514ac3e Mon Sep 17 00:00:00 2001
From: Travis CI 
Date: Fri, 29 Dec 2017 12:04:13 +0000
Subject: [PATCH 22/36] Travis build: 518

---
 README.md       | 1 +
 docs/index.html | 1 +
 snippets/max.md | 1 +
 3 files changed, 3 insertions(+)

diff --git a/README.md b/README.md
index 28ff5729f..da44e3841 100644
--- a/README.md
+++ b/README.md
@@ -4117,6 +4117,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 
diff --git a/docs/index.html b/docs/index.html
index f32dbeab8..e1f764ce6 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1838,6 +1838,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr);
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index c7e761d95..828d3ca6f 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -22,6 +22,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 

From cb394712676c387c12a42ac825aaead8ff4b7d24 Mon Sep 17 00:00:00 2001
From: Travis CI 
Date: Fri, 29 Dec 2017 12:05:55 +0000
Subject: [PATCH 23/36] Travis build: 519

---
 README.md       | 1 +
 docs/index.html | 1 +
 snippets/max.md | 1 +
 3 files changed, 3 insertions(+)

diff --git a/README.md b/README.md
index da44e3841..2da6dbc3e 100644
--- a/README.md
+++ b/README.md
@@ -4118,6 +4118,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 
diff --git a/docs/index.html b/docs/index.html
index e1f764ce6..80634f562 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1839,6 +1839,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr);
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index 828d3ca6f..ca84a90f8 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -23,6 +23,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 

From c93b6644075a2fb3a5af92713095d5b7a6ab6717 Mon Sep 17 00:00:00 2001
From: Travis CI 
Date: Fri, 29 Dec 2017 12:07:20 +0000
Subject: [PATCH 24/36] Travis build: 520

---
 README.md       | 1 +
 docs/index.html | 1 +
 snippets/max.md | 1 +
 3 files changed, 3 insertions(+)

diff --git a/README.md b/README.md
index 2da6dbc3e..4f27fb819 100644
--- a/README.md
+++ b/README.md
@@ -4119,6 +4119,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 
diff --git a/docs/index.html b/docs/index.html
index 80634f562..b3b2a86e2 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1840,6 +1840,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr);
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index ca84a90f8..0d7163a9d 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -24,6 +24,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
 

From 1f15f00565e1d4c7a13f77aba9535be783f45267 Mon Sep 17 00:00:00 2001
From: Travis CI 
Date: Fri, 29 Dec 2017 12:09:05 +0000
Subject: [PATCH 25/36] Travis build: 521

---
 README.md       | 1 +
 docs/index.html | 1 +
 snippets/max.md | 1 +
 3 files changed, 3 insertions(+)

diff --git a/README.md b/README.md
index 4f27fb819..81fee88ae 100644
--- a/README.md
+++ b/README.md
@@ -4119,6 +4119,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```
diff --git a/docs/index.html b/docs/index.html
index b3b2a86e2..62404703b 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1841,6 +1841,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr);
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index 0d7163a9d..4de7673f6 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -24,6 +24,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```

From d9e9c793ce3b88d7b8eb74da8dd7294c2fb68cdf Mon Sep 17 00:00:00 2001
From: Travis CI 
Date: Fri, 29 Dec 2017 12:10:37 +0000
Subject: [PATCH 26/36] Travis build: 522

---
 README.md       | 1 +
 docs/index.html | 1 +
 snippets/max.md | 1 +
 3 files changed, 3 insertions(+)

diff --git a/README.md b/README.md
index 81fee88ae..7f438c88e 100644
--- a/README.md
+++ b/README.md
@@ -4119,6 +4119,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 
 
 const max = (...arr) => Math.max(...[].concat(...arr);
diff --git a/docs/index.html b/docs/index.html
index 62404703b..fa0c4f729 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1841,6 +1841,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr);
diff --git a/snippets/max.md b/snippets/max.md index 4de7673f6..e01ff3e6e 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -24,6 +24,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr); From c761bdb895669b1ca6d7a7802889b69e34250a1c Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 29 Dec 2017 12:12:32 +0000 Subject: [PATCH 27/36] Travis build: 524 --- README.md | 1 + docs/index.html | 1 + snippets/max.md | 1 + 3 files changed, 3 insertions(+) diff --git a/README.md b/README.md index 7f438c88e..985e42a46 100644 --- a/README.md +++ b/README.md @@ -4120,6 +4120,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr); diff --git a/docs/index.html b/docs/index.html index fa0c4f729..7ab4b5e0a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1841,6 +1841,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr); diff --git a/snippets/max.md b/snippets/max.md index e01ff3e6e..4ea329bbc 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -25,6 +25,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr); From 49a4f91c13cda81bff09f94607fbf36f76ae336d Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 29 Dec 2017 12:14:01 +0000 Subject: [PATCH 28/36] Travis build: 525 --- README.md | 1 + docs/index.html | 1 + snippets/max.md | 1 + 3 files changed, 3 insertions(+) diff --git a/README.md b/README.md index 985e42a46..db1f85bd4 100644 --- a/README.md +++ b/README.md @@ -4121,6 +4121,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr); diff --git a/docs/index.html b/docs/index.html index 7ab4b5e0a..f93c91b7a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1842,6 +1842,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr); diff --git a/snippets/max.md b/snippets/max.md index 4ea329bbc..d3afdb320 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -26,6 +26,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr); From 5fa78f8d98d55406f5df038ab22f12669dc81693 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 29 Dec 2017 12:15:45 +0000 Subject: [PATCH 29/36] Travis build: 526 --- README.md | 1 + docs/index.html | 1 + snippets/max.md | 1 + 3 files changed, 3 insertions(+) diff --git a/README.md b/README.md index db1f85bd4..496a99da5 100644 --- a/README.md +++ b/README.md @@ -4122,6 +4122,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr); diff --git a/docs/index.html b/docs/index.html index f93c91b7a..66bf07ea2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1843,6 +1843,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr); diff --git a/snippets/max.md b/snippets/max.md index d3afdb320..bfe055115 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -27,6 +27,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr); From f228ee2b1b7433085aeb7bc36cb25404cac29570 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 29 Dec 2017 12:17:57 +0000 Subject: [PATCH 30/36] Travis build: 527 --- README.md | 1 + docs/index.html | 1 + snippets/max.md | 1 + 3 files changed, 3 insertions(+) diff --git a/README.md b/README.md index 496a99da5..6acf03f2e 100644 --- a/README.md +++ b/README.md @@ -4123,6 +4123,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr); diff --git a/docs/index.html b/docs/index.html index 66bf07ea2..8d103b6e5 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1844,6 +1844,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr); diff --git a/snippets/max.md b/snippets/max.md index bfe055115..2f89e10b1 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -28,6 +28,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr); From 583745ef6a347ae07012ffac42f205ffa9706c04 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 29 Dec 2017 12:19:20 +0000 Subject: [PATCH 31/36] Travis build: 530 --- README.md | 1 + docs/index.html | 1 + snippets/max.md | 1 + 3 files changed, 3 insertions(+) diff --git a/README.md b/README.md index 6acf03f2e..a0065e55e 100644 --- a/README.md +++ b/README.md @@ -4124,6 +4124,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr); diff --git a/docs/index.html b/docs/index.html index 8d103b6e5..9ee9a148f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1845,6 +1845,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr); diff --git a/snippets/max.md b/snippets/max.md index 2f89e10b1..4abb07287 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -29,6 +29,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr); From 36d4a31d0b209b725e09b68173fbe09b9c364e25 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Fri, 29 Dec 2017 14:20:09 +0200 Subject: [PATCH 32/36] Update tag_database --- tag_database | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tag_database b/tag_database index 5c3a9153b..f552d03b2 100644 --- a/tag_database +++ b/tag_database @@ -1,6 +1,6 @@ anagrams:string arrayToHtmlList:browser -average:uncategorized +average:math bottomVisible:browser call:adapter capitalize:string @@ -76,9 +76,9 @@ JSONToFile:node last:array lcm:math mapObject:array -max:uncategorized +max:math median:math -min:uncategorized +min:math negate:logic nthElement:array objectFromPairs:object @@ -120,7 +120,7 @@ sortCharactersInString:string speechSynthesis:media spreadOver:adapter standardDeviation:math -sum:uncategorized +sum:math symmetricDifference:array tail:array take:array From 67a5d378b3234da33a53d66fdcae60774a619f78 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 29 Dec 2017 12:23:46 +0000 Subject: [PATCH 33/36] Travis build: 534 --- README.md | 232 ++++++++++++++++++++++++++---------------------- docs/index.html | 126 +++++++++++++------------- snippets/max.md | 1 + 3 files changed, 187 insertions(+), 172 deletions(-) diff --git a/README.md b/README.md index a0065e55e..3ffec3b78 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,7 @@
View contents +* [`average`](#average) * [`clampNumber`](#clampnumber) * [`collatz`](#collatz) * [`digitize`](#digitize) @@ -156,7 +157,9 @@ * [`isEven`](#iseven) * [`isPrime`](#isprime) * [`lcm`](#lcm) +* [`max`](#max) * [`median`](#median) +* [`min`](#min) * [`palindrome`](#palindrome) * [`percentile`](#percentile) * [`powerset`](#powerset) @@ -165,6 +168,7 @@ * [`randomNumberInRange`](#randomnumberinrange) * [`round`](#round) * [`standardDeviation`](#standarddeviation) +* [`sum`](#sum)
@@ -251,18 +255,6 @@
-### _Uncategorized_ - -
-View contents - -* [`average`](#average) -* [`max`](#max) -* [`min`](#min) -* [`sum`](#sum) - -
- ## Adapter ### call @@ -2213,6 +2205,29 @@ negate(isOdd)(1); // false ## Math +### average + +Returns the average of an of two or more numbers/arrays. + +Use `Array.reduce()` to add each value to an accumulator, initialized with a value of `0`, divide by the `length` of the array. + +```js +const average = (...arr) => [].concat(...arr).reduce((acc, val) => acc + val, 0) / arr.length; +``` + +
+Examples + +```js +average([1, 2, 3]); // 2 +``` + +
+ + +[⬆ Back to top](#table-of-contents) + + ### clampNumber Clamps `num` within the inclusive range specified by the boundary values `a` and `b`. @@ -2641,6 +2656,57 @@ lcm([1, 3, 4], 5); // 60 [⬆ Back to top](#table-of-contents) +### max + +Returns the maximum value out of two or more numbers/arrays. + +Use `Math.max()` combined with the spread operator (`...`) to get the maximum value in the array. + +```js + + + + + + + + + + + + + + + + + + + + + + + + + + + + +const max = (...arr) => Math.max(...[].concat(...arr); +``` + +
+Examples + +```js +max([10, 1, 5]); // 10 +``` + +
+ + +[⬆ Back to top](#table-of-contents) + + ### median Returns the median of an array of numbers. @@ -2670,6 +2736,29 @@ median([0, 10, -2, 7]); // 3.5 [⬆ Back to top](#table-of-contents) +### min + +Returns the minimum value in an array. + +Use `Math.min()` combined with the spread operator (`...`) to get the minimum value in the array. + +```js +const min = arr => Math.min(...[].concat(...arr)); +``` + +
+Examples + +```js +min([10, 1, 5]); // 1 +``` + +
+ + +[⬆ Back to top](#table-of-contents) + + ### palindrome Returns `true` if the given string is a palindrome, `false` otherwise. @@ -2880,6 +2969,29 @@ standardDeviation([10, 2, 38, 23, 38, 23, 21], true); // 12.29899614287479 (popu +[⬆ Back to top](#table-of-contents) + + +### sum + +Returns the sum of an of two or more numbers/arrays. + +Use `Array.reduce()` to add each value to an accumulator, initialized with a value of `0`. + +```js +const sum = (...arr) => [].concat(...arr).reduce((acc, val) => acc + val, 0); +``` + +
+Examples + +```js +sum([1, 2, 3, 4]); // 10 +``` + +
+ + [⬆ Back to top](#table-of-contents) ## Media @@ -4074,102 +4186,6 @@ validateNumber('10'); // true [⬆ Back to top](#table-of-contents) -## _Uncategorized_ - -### average - -Returns the average of an of two or more numbers/arrays. - -Use `Array.reduce()` to add each value to an accumulator, initialized with a value of `0`, divide by the `length` of the array. - -```js -const average = (...arr) => [].concat(...arr).reduce((acc, val) => acc + val, 0) / arr.length; -``` - -```js -average([1, 2, 3]); // 2 -``` - -
[⬆ back to top](#table-of-contents) - - -### max - -Returns the maximum value out of two or more numbers/arrays. - -Use `Math.max()` combined with the spread operator (`...`) to get the maximum value in the array. - -```js - - - - - - - - - - - - - - - - - - - - - - - - - - - -const max = (...arr) => Math.max(...[].concat(...arr); -``` - -```js -max([10, 1, 5]); // 10 -``` - -
[⬆ back to top](#table-of-contents) - - -### min - -Returns the minimum value in an array. - -Use `Math.min()` combined with the spread operator (`...`) to get the minimum value in the array. - -```js -const min = arr => Math.min(...[].concat(...arr)); -``` - -```js -min([10, 1, 5]); // 1 -``` - -
[⬆ back to top](#table-of-contents) - - -### sum - -Returns the sum of an of two or more numbers/arrays. - -Use `Array.reduce()` to add each value to an accumulator, initialized with a value of `0`. - -```js -const sum = (...arr) => [].concat(...arr).reduce((acc, val) => acc + val, 0); -``` - -```js -sum([1, 2, 3, 4]); // 10 -``` - -
[⬆ back to top](#table-of-contents) - ## Credits diff --git a/docs/index.html b/docs/index.html index 9ee9a148f..c9bb23101 100644 --- a/docs/index.html +++ b/docs/index.html @@ -185,7 +185,8 @@ negate

Math -

clampNumber +average +clampNumber collatz digitize distance @@ -201,7 +202,9 @@ isEven isPrime lcm +max median +min palindrome percentile powerset @@ -210,6 +213,7 @@ randomNumberInRange round standardDeviation +sum

Media

speechSynthesis @@ -264,12 +268,6 @@ toOrdinalSuffix validateNumber -

Uncategorized -

average -max -min -sum -
 

Adapter

call

Given a key and a set of arguments, call them when given a context. Primarily useful in composition.

@@ -1035,7 +1033,14 @@ runPromisesInSeries([() => delay(1000), () => delay(2000)]); // //executes negate(isOdd)(1); // false

Math

-

clampNumber

+

average

+

Returns the average of an of two or more numbers/arrays.

+

Use Array.reduce() to add each value to an accumulator, initialized with a value of 0, divide by the length of the array.

+
const average = (...arr) => [].concat(...arr).reduce((acc, val) => acc + val, 0) / arr.length;
+
+
average([1, 2, 3]); // 2
+
+

clampNumber

Clamps num within the inclusive range specified by the boundary values a and b.

If num falls within the range, return num. Otherwise, return the nearest number in the range.

@@ -1207,6 +1212,41 @@ The GCD formula uses recursion.

lcm(12, 7); // 84
 lcm([1, 3, 4], 5); // 60
 
+

max

+

Returns the maximum value out of two or more numbers/arrays.

+

Use Math.max() combined with the spread operator (...) to get the maximum value in the array.

+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+const max = (...arr) => Math.max(...[].concat(...arr);
+
+
max([10, 1, 5]); // 10
+

median

Returns the median of an array of numbers.

Find the middle of the array, use Array.sort() to sort the values. @@ -1220,6 +1260,13 @@ Return the number at the midpoint if length is odd, otherwise the a

median([5, 6, 50, 1, -5]); // 5
 median([0, 10, -2, 7]); // 3.5
 
+

min

+

Returns the minimum value in an array.

+

Use Math.min() combined with the spread operator (...) to get the minimum value in the array.

+
const min = arr => Math.min(...[].concat(...arr));
+
+
min([10, 1, 5]); // 1
+

palindrome

Returns true if the given string is a palindrome, false otherwise.

Convert string toLowerCase() and use replace() to remove non-alphanumeric characters from it. @@ -1305,6 +1352,13 @@ You can omit the second argument to get the sample standard deviation or set it

standardDeviation([10, 2, 38, 23, 38, 23, 21]); // 13.284434142114991 (sample)
 standardDeviation([10, 2, 38, 23, 38, 23, 21], true); // 12.29899614287479 (population)
 
+

sum

+

Returns the sum of an of two or more numbers/arrays.

+

Use Array.reduce() to add each value to an accumulator, initialized with a value of 0.

+
const sum = (...arr) => [].concat(...arr).reduce((acc, val) => acc + val, 0);
+
+
sum([1, 2, 3, 4]); // 10
+

Media

speechSynthesis

Performs speech synthesis (experimental).

@@ -1810,62 +1864,6 @@ Use Number() to check if the coercion holds.

validateNumber('10'); // true
 
-

Uncategorized

-

average

-

Returns the average of an of two or more numbers/arrays.

-

Use Array.reduce() to add each value to an accumulator, initialized with a value of 0, divide by the length of the array.

-
const average = (...arr) => [].concat(...arr).reduce((acc, val) => acc + val, 0) / arr.length;
-
-
average([1, 2, 3]); // 2
-
-

max

-

Returns the maximum value out of two or more numbers/arrays.

-

Use Math.max() combined with the spread operator (...) to get the maximum value in the array.

-

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-const max = (...arr) => Math.max(...[].concat(...arr);
-
-
max([10, 1, 5]); // 10
-
-

min

-

Returns the minimum value in an array.

-

Use Math.min() combined with the spread operator (...) to get the minimum value in the array.

-
const min = arr => Math.min(...[].concat(...arr));
-
-
min([10, 1, 5]); // 1
-
-

sum

-

Returns the sum of an of two or more numbers/arrays.

-

Use Array.reduce() to add each value to an accumulator, initialized with a value of 0.

-
const sum = (...arr) => [].concat(...arr).reduce((acc, val) => acc + val, 0);
-
-
sum([1, 2, 3, 4]); // 10
-