From 3ce2342d3a00f58f919e25253459dd2a08994da1 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 29 Dec 2017 12:34:23 +0000 Subject: [PATCH] Travis build: 543 --- README.md | 439 ++++++++++++++++-------------------------------- docs/index.html | 1 + snippets/max.md | 1 + 3 files changed, 149 insertions(+), 292 deletions(-) diff --git a/README.md b/README.md index 22ed83bdb..366a3cffe 100644 --- a/README.md +++ b/README.md @@ -282,8 +282,7 @@ Promise.resolve([1, 2, 3]) - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### collectInto @@ -309,8 +308,7 @@ Pall(p1, p2, p3).then(console.log); - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### flip @@ -338,8 +336,7 @@ Object.assign(b, a); // == b - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### pipeFunctions @@ -365,8 +362,7 @@ multiplyAndAdd5(5, 2); // 15 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### promisify @@ -395,8 +391,7 @@ delay(2000).then(() => console.log('Hi!')); // // Promise resolves after 2s - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### spreadOver @@ -420,8 +415,7 @@ arrayMax([1, 2, 4]); // 4 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ## Array @@ -449,8 +443,7 @@ chunk([1, 2, 3, 4, 5], 2); // [[1,2],[3,4],[5]] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### compact @@ -472,8 +465,7 @@ compact([0, 1, false, 2, '', 3, 'a', 'e' * 23, NaN, 's', 34]); // [ 1, 2, 3, 'a' - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### countOccurrences @@ -495,8 +487,7 @@ countOccurrences([1, 1, 2, 1, 2, 3], 1); // 3 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### deepFlatten @@ -520,8 +511,7 @@ deepFlatten([1, [2], [[3], 4], 5]); // [1,2,3,4,5] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### difference @@ -546,8 +536,7 @@ difference([1, 2, 3], [1, 2, 4]); // [3] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### differenceWith @@ -569,8 +558,7 @@ differenceWith([1, 1.2, 1.5, 3], [1.9, 3], (a, b) => Math.round(a) == Math.round - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### distinctValuesOfArray @@ -592,8 +580,7 @@ distinctValuesOfArray([1, 2, 2, 3, 4, 4, 5]); // [1,2,3,4,5] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### dropElements @@ -619,8 +606,7 @@ dropElements([1, 2, 3, 4], n => n >= 3); // [3,4] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### dropRight @@ -644,8 +630,7 @@ dropRight([1, 2, 3], 42); // [] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### everyNth @@ -667,8 +652,7 @@ everyNth([1, 2, 3, 4, 5, 6], 2); // [ 2, 4, 6 ] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### filterNonUnique @@ -690,8 +674,7 @@ filterNonUnique([1, 2, 2, 3, 4, 4, 5]); // [1,3,5] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### flatten @@ -713,8 +696,7 @@ flatten([1, [2], 3, 4]); // [1,2,3,4] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### flattenDepth @@ -742,8 +724,7 @@ flattenDepth([1, [2], 3, 4]); // [1,2,3,4] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### groupBy @@ -771,8 +752,7 @@ groupBy(['one', 'two', 'three'], 'length'); // {3: ['one', 'two'], 5: ['three']} - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### head @@ -794,8 +774,7 @@ head([1, 2, 3]); // 1 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### initial @@ -817,8 +796,7 @@ initial([1, 2, 3]); // [1,2] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### initialize2DArray @@ -843,8 +821,7 @@ initialize2DArray(2, 2, 0); // [[0,0], [0,0]] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### initializeArrayWithRange @@ -869,8 +846,7 @@ initializeArrayWithRange(7, 3); // [3,4,5,6,7] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### initializeArrayWithValues @@ -893,8 +869,7 @@ initializeArrayWithValues(5, 2); // [2,2,2,2,2] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### intersection @@ -919,8 +894,7 @@ intersection([1, 2, 3], [4, 3, 2]); // [2,3] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### last @@ -942,8 +916,7 @@ last([1, 2, 3]); // 3 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### mapObject @@ -969,8 +942,7 @@ squareIt([1, 2, 3]); // { 1: 1, 2: 4, 3: 9 } - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### nthElement @@ -995,8 +967,7 @@ nthElement(['a', 'b', 'b'], -3); // 'a' - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### pick @@ -1019,8 +990,7 @@ pick({ a: 1, b: '2', c: 3 }, ['a', 'c']); // { 'a': 1, 'c': 3 } - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### pull @@ -1056,8 +1026,7 @@ console.log(myArray2); // [ 'b', 'b' ] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### pullAtIndex @@ -1093,8 +1062,7 @@ console.log(pulled); // [ 'b', 'd' ] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### pullAtValue @@ -1128,8 +1096,7 @@ console.log(pulled); // [ 'b', 'd' ] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### quickSort @@ -1161,8 +1128,7 @@ quickSort([4, 1, 3, 2], true); // [4,3,2,1] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### remove @@ -1191,8 +1157,7 @@ remove([1, 2, 3, 4], n => n % 2 == 0); // [2, 4] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### sample @@ -1215,8 +1180,7 @@ sample([3, 7, 9, 11]); // 9 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### shuffle @@ -1247,8 +1211,7 @@ console.log(foo); // [1,2,3] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### similarity @@ -1270,8 +1233,7 @@ similarity([1, 2, 3], [1, 2, 4]); // [1,2] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### symmetricDifference @@ -1297,8 +1259,7 @@ symmetricDifference([1, 2, 3], [1, 2, 4]); // [3,4] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### tail @@ -1321,8 +1282,7 @@ tail([1]); // [1] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### take @@ -1345,8 +1305,7 @@ take([1, 2, 3], 0); // [] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### takeRight @@ -1369,8 +1328,7 @@ takeRight([1, 2, 3]); // [3] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### union @@ -1392,8 +1350,7 @@ union([1, 2, 3], [4, 3, 2]); // [1,2,3,4] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### without @@ -1417,8 +1374,7 @@ without([2, 1, 2, 3], 1, 2); // [3] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### zip @@ -1448,8 +1404,7 @@ zip(['a'], [1, 2], [true, false]); // [['a', 1, true], [undefined, 2, false]] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### zipObject @@ -1473,8 +1428,7 @@ zipObject(['a', 'b'], [1, 2, 3]); // {a: 1, b: 2} - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ## Browser @@ -1498,8 +1452,7 @@ arrayToHtmlList(['item 1', 'item 2'], 'myListID'); - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### bottomVisible @@ -1523,8 +1476,7 @@ bottomVisible(); // true - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### currentURL @@ -1546,8 +1498,7 @@ currentURL(); // 'https://google.com' - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### detectDeviceType @@ -1573,8 +1524,7 @@ detectDeviceType(); // "Desktop" - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### elementIsVisibleInViewport @@ -1608,8 +1558,7 @@ elementIsVisibleInViewport(el, true); // true // (partially visible) - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### getScrollPosition @@ -1635,8 +1584,7 @@ getScrollPosition(); // {x: 0, y: 200} - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### getStyle @@ -1658,8 +1606,7 @@ getStyle(document.querySelector('p'), 'font-size'); // '16px' - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### getURLParameters @@ -1685,8 +1632,7 @@ getURLParameters('http://url.com/page?name=Adam&surname=Smith'); // {name: 'Adam - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### hasClass @@ -1708,8 +1654,7 @@ hasClass(document.querySelector('p.special'), 'special'); // true - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### hide @@ -1731,8 +1676,7 @@ hide(document.querySelectorAll('img')); // Hides all elements on the page - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### httpsRedirect @@ -1752,8 +1696,7 @@ const httpsRedirect = () => { - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### redirect @@ -1777,8 +1720,7 @@ redirect('https://google.com'); - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### scrollToTop @@ -1807,8 +1749,7 @@ scrollToTop(); - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### setStyle @@ -1830,8 +1771,7 @@ setStyle(document.querySelector('p'), 'font-size', '20px'); // The first

ele - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### show @@ -1853,8 +1793,7 @@ show(document.querySelectorAll('img')); // Shows all elements on the page - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### toggleClass @@ -1876,8 +1815,7 @@ toggleClass(document.querySelector('p.special'), 'special'); // The paragraph wi - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### UUIDGeneratorBrowser @@ -1902,8 +1840,7 @@ UUIDGeneratorBrowser(); // '7982fcfe-5721-4632-bede-6000885be57d' - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ## Date @@ -1927,8 +1864,7 @@ getDaysDiffBetweenDates(new Date('2017-12-13'), new Date('2017-12-22')); // 9 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### JSONToDate @@ -1953,8 +1889,7 @@ JSONToDate(/Date(1489525200000)/); // "14/3/2017" - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### toEnglishDate @@ -1984,8 +1919,7 @@ toEnglishDate('09/21/2010'); // '21/09/2010' - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### tomorrow @@ -2006,8 +1940,7 @@ tomorrow(); // 2017-12-27 (if current date is 2017-12-26) - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ## Function @@ -2046,8 +1979,7 @@ chainAsync([ - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### compose @@ -2073,8 +2005,7 @@ multiplyAndAdd5(5, 2); // 15 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### curry @@ -2101,8 +2032,7 @@ curry(Math.min, 3)(10)(50)(2); // 2 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### functionName @@ -2124,8 +2054,7 @@ functionName(Math.max); // max (logged in debug channel of console) - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### runPromisesInSeries @@ -2148,8 +2077,7 @@ runPromisesInSeries([() => delay(1000), () => delay(2000)]); // //executes each - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### sleep @@ -2175,8 +2103,7 @@ async function sleepyWork() { - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ## Logic @@ -2200,8 +2127,7 @@ negate(isOdd)(1); // false - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ## Math @@ -2224,8 +2150,7 @@ average([1, 2, 3]); // 2 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### clampNumber @@ -2250,8 +2175,7 @@ clampNumber(3, 2, 4); // 3 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### collatz @@ -2274,8 +2198,7 @@ collatz(5); // 16 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### digitize @@ -2298,8 +2221,7 @@ digitize(123); // [1, 2, 3] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### distance @@ -2321,8 +2243,7 @@ distance(1, 1, 2, 3); // 2.23606797749979 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### factorial @@ -2352,8 +2273,7 @@ factorial(6); // 720 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### fibonacci @@ -2380,8 +2300,7 @@ fibonacci(6); // 720 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### fibonacciCountUntilNum @@ -2404,8 +2323,7 @@ fibonacciCountUntilNum(10); // 7 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### fibonacciUntilNum @@ -2435,8 +2353,7 @@ fibonacciCountUntilNum(10); // 7 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### gcd @@ -2464,8 +2381,7 @@ gcd(8, 36); // 4 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### hammingDistance @@ -2488,8 +2404,7 @@ hammingDistance(2, 3); // 1 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### inRange @@ -2518,8 +2433,7 @@ inrange(3, 2); // false - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### isArmstrongNumber @@ -2546,8 +2460,7 @@ isArmstrongNumber(56); // false - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### isDivisible @@ -2569,8 +2482,7 @@ isDivisible(6, 3); // true - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### isEven @@ -2593,8 +2505,7 @@ isEven(3); // false - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### isPrime @@ -2622,8 +2533,7 @@ isPrime(12); // false - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### lcm @@ -2652,8 +2562,7 @@ lcm([1, 3, 4], 5); // 60 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### max @@ -2694,6 +2603,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr); @@ -2708,8 +2618,7 @@ max([10, 1, 5]); // 10 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### median @@ -2737,8 +2646,7 @@ median([0, 10, -2, 7]); // 3.5 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### min @@ -2760,8 +2668,7 @@ min([10, 1, 5]); // 1 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### palindrome @@ -2793,8 +2700,7 @@ palindrome('taco cat'); // true - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### percentile @@ -2817,8 +2723,7 @@ percentile([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 6); // 55 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### powerset @@ -2840,8 +2745,7 @@ powerset([1, 2]); // [[], [1], [2], [2,1]] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### primes @@ -2869,8 +2773,7 @@ primes(10); // [2,3,5,7] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### randomIntegerInRange @@ -2892,8 +2795,7 @@ randomIntegerInRange(0, 5); // 2 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### randomNumberInRange @@ -2915,8 +2817,7 @@ randomNumberInRange(2, 10); // 6.0211363285087005 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### round @@ -2939,8 +2840,7 @@ round(1.005, 2); // 1.01 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### standardDeviation @@ -2973,8 +2873,7 @@ standardDeviation([10, 2, 38, 23, 38, 23, 21], true); // 12.29899614287479 (popu - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### sum @@ -2996,8 +2895,7 @@ sum([1, 2, 3, 4]); // 10 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ## Media @@ -3027,8 +2925,7 @@ speechSynthesis('Hello, World'); // // plays the message - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ## Node @@ -3053,8 +2950,7 @@ JSONToFile({ test: 'is passed' }, 'testJsonFile'); // writes the object to 'test - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### readFileLines @@ -3092,8 +2988,7 @@ console.log(arr); // ['line1', 'line2', 'line3'] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### UUIDGeneratorNode @@ -3119,8 +3014,7 @@ UUIDGeneratorNode(); // '79c7c136-60ee-40a2-beb2-856f1feabefc' - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ## Object @@ -3154,8 +3048,7 @@ cleanObj(testObj, ['a'], 'children'); // { a: 1, children : { a: 1}} - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### objectFromPairs @@ -3177,8 +3070,7 @@ objectFromPairs([['a', 1], ['b', 2]]); // {a: 1, b: 2} - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### objectToPairs @@ -3200,8 +3092,7 @@ objectToPairs({ a: 1, b: 2 }); // [['a',1],['b',2]]) - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### orderBy @@ -3240,8 +3131,7 @@ orderBy(users, ['name', 'age']); // [{name: 'barney', age: 34}, {name: 'barney', - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### select @@ -3265,8 +3155,7 @@ select(obj, 'selector.to.val'); // 'val to select' - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### shallowClone @@ -3290,8 +3179,7 @@ a === b; // false - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### truthCheckCollection @@ -3313,8 +3201,7 @@ truthCheckCollection([{ user: 'Tinky-Winky', sex: 'male' }, { user: 'Dipsy', sex - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ## String @@ -3349,8 +3236,7 @@ anagrams('abc'); // ['abc','acb','bac','bca','cab','cba'] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### Capitalize @@ -3375,8 +3261,7 @@ capitalize('fooBar', true); // 'Foobar' - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### capitalizeEveryWord @@ -3398,8 +3283,7 @@ capitalizeEveryWord('hello world!'); // 'Hello World!' - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### countVowels @@ -3422,8 +3306,7 @@ countVowels('gym'); // 0 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### escapeRegExp @@ -3445,8 +3328,7 @@ escapeRegExp('(test)'); // \\(test\\) - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### fromCamelCase @@ -3475,8 +3357,7 @@ fromCamelCase('someJavascriptProperty', '_'); // 'some_javascript_property' - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### repeatString @@ -3501,8 +3382,7 @@ repeatString('abc'); // 'abcabc' - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### reverseString @@ -3529,8 +3409,7 @@ reverseString('foobar'); // 'raboof' - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### sortCharactersInString @@ -3556,8 +3435,7 @@ sortCharactersInString('cabbage'); // 'aabbceg' - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### toCamelCase @@ -3591,8 +3469,7 @@ toCamelCase('some-mixed_string with spaces_underscores-and-hyphens'); // 'someMi - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### toKebabCase @@ -3624,8 +3501,7 @@ toKebabCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSo - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### toSnakeCase @@ -3659,8 +3535,7 @@ toSnakeCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSo - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### truncateString @@ -3684,8 +3559,7 @@ truncateString('boomerang', 7); // 'boom...' - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### words @@ -3709,8 +3583,7 @@ words('python, javaScript & coffee'); // ["python", "javaScript", "coffee"] - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ## Utility @@ -3733,8 +3606,7 @@ coalesce(null, undefined, '', NaN, 'Waldo'); // "" - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### coalesceFactory @@ -3757,8 +3629,7 @@ customCoalesce(undefined, null, NaN, '', 'Waldo'); // "Waldo" - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### extendHex @@ -3787,8 +3658,7 @@ extendHex('05a'); // '#0055aa' - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### getType @@ -3811,8 +3681,7 @@ getType(new Set([1, 2, 3])); // "set" - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### hexToRGB @@ -3854,8 +3723,7 @@ hexToRGB('#fff'); // 'rgb(255, 255, 255)' - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### isArray @@ -3878,8 +3746,7 @@ isArray([1]); // true - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### isBoolean @@ -3902,8 +3769,7 @@ isBoolean(false); // true - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### isFunction @@ -3926,8 +3792,7 @@ isFunction(x => x); // true - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### isNumber @@ -3949,8 +3814,7 @@ isNumber(1); // true ``` - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### isString @@ -3973,8 +3837,7 @@ isString('10'); // true - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### isSymbol @@ -3997,8 +3860,7 @@ isSymbol(Symbol('x')); // true - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### randomHexColorCode @@ -4025,8 +3887,7 @@ randomHexColorCode(); // "#4144c6" - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### RGBToHex @@ -4048,8 +3909,7 @@ RGBToHex(255, 165, 1); // 'ffa501' - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### sbdm @@ -4079,8 +3939,7 @@ console.log(sdbm('age')); // 808122783 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### timeTaken @@ -4108,8 +3967,7 @@ timeTaken(() => Math.pow(2, 10)); // 1024 - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### toDecimalMark @@ -4129,8 +3987,7 @@ toDecimalMark(12305030388.9087); // "12,305,030,388.9087" - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### toOrdinalSuffix @@ -4163,8 +4020,7 @@ toOrdinalSuffix('123'); // "123rd" - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ### validateNumber @@ -4188,8 +4044,7 @@ validateNumber('10'); // true - -[⬆ Back to top](#table-of-contents) +
[⬆ Back to top](#table-of-contents) ## Credits diff --git a/docs/index.html b/docs/index.html index 956610134..d30ecfb77 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1246,6 +1246,7 @@ lcm([1, 3, 4], 5); // 60 + const max = (...arr) => Math.max(...[].concat(...arr); diff --git a/snippets/max.md b/snippets/max.md index 6481b2565..121b4956a 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -36,6 +36,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr);