diff --git a/snippets_archive/README.md b/snippets_archive/README.md index ba47f4c3f..abc633d5c 100644 --- a/snippets_archive/README.md +++ b/snippets_archive/README.md @@ -1,11 +1,7 @@ -![Logo](/logo.png) - -# Snippets Archive - -These snippets, while useful and interesting, didn't quite make it into the repository due to either having very specific use-cases or being outdated. However we felt like they might still be useful to some readers, so here they are. - -## Table of Contents - +![Logo](/logo.png "") +# Snippets Archive +These snippets, while useful and interesting, didn't quite make it into the repository due to either having very specific use-cases or being outdated. However we felt like they might still be useful to some readers, so here they are. +## Table of Contents * [`JSONToDate`](#jsontodate) * [`speechSynthesis`](#speechsynthesis) * [`binarySearch`](#binarysearch) @@ -24,9 +20,8 @@ These snippets, while useful and interesting, didn't quite make it into the repo * [`removeVowels`](#removevowels) * [`solveRPN`](#solverpn) * [`howManyTimes`](#howmanytimes) - ---- - + +--- ### JSONToDate Converts a JSON object to a date. @@ -38,19 +33,19 @@ const JSONToDate = arr => { const dt = new Date(parseInt(arr.toString().substr(6))); return `${dt.getDate()}/${dt.getMonth() + 1}/${dt.getFullYear()}`; }; -``` +```
-Examples - + Examples + ```js JSONToDate(/Date(1489525200000)/); // "14/3/2017" ```
+ -
[⬆ Back to top](#table-of-contents) - +[⬆ Back to top](#table-of-contents) ### speechSynthesis @@ -67,19 +62,19 @@ const speechSynthesis = message => { msg.voice = window.speechSynthesis.getVoices()[0]; window.speechSynthesis.speak(msg); }; -``` +```
-Examples - + Examples + ```js speechSynthesis('Hello, World'); // // plays the message ```
+ -
[⬆ Back to top](#table-of-contents) - +[⬆ Back to top](#table-of-contents) ### binarySearch @@ -99,20 +94,20 @@ const binarySearch = (arr, val, start = 0, end = arr.length - 1) => { if (arr[mid] < val) return binarySearch(arr, val, mid + 1, end); return mid; }; -``` +```
-Examples - + Examples + ```js binarySearch([1, 4, 6, 7, 12, 13, 15, 18, 19, 20, 22, 24], 6); // 2 binarySearch([1, 4, 6, 7, 12, 13, 15, 18, 19, 20, 22, 24], 21); // -1 ```
+ -
[⬆ Back to top](#table-of-contents) - +[⬆ Back to top](#table-of-contents) ### cleanObj @@ -132,20 +127,20 @@ const cleanObj = (obj, keysToKeep = [], childIndicator) => { }); return obj; }; -``` +```
-Examples - + Examples + ```js const testObj = { a: 1, b: 2, children: { a: 1, b: 2 } }; cleanObj(testObj, ['a'], 'children'); // { a: 1, children : { a: 1}} ```
+ -
[⬆ Back to top](#table-of-contents) - +[⬆ Back to top](#table-of-contents) ### collatz @@ -155,19 +150,19 @@ If `n` is even, return `n/2`. Otherwise, return `3n+1`. ```js const collatz = n => (n % 2 === 0 ? n / 2 : 3 * n + 1); -``` +```
-Examples - + Examples + ```js collatz(8); // 4 ```
+ -
[⬆ Back to top](#table-of-contents) - +[⬆ Back to top](#table-of-contents) ### countVowels @@ -177,20 +172,20 @@ Use a regular expression to count the number of vowels `(A, E, I, O, U)` in a `s ```js const countVowels = str => (str.match(/[aeiou]/gi) || []).length; -``` +```
-Examples - + Examples + ```js countVowels('foobar'); // 3 countVowels('gym'); // 0 ```
+ -
[⬆ Back to top](#table-of-contents) - +[⬆ Back to top](#table-of-contents) ### factors @@ -226,11 +221,11 @@ const factors = (num, primes = false) => { }, []); return primes ? array.filter(isPrime) : array; }; -``` +```
-Examples - + Examples + ```js factors(12); // [2,3,4,6,12] factors(12, true); // [2,3] @@ -239,9 +234,9 @@ factors(-12, true); // [2,3] ```
+ -
[⬆ Back to top](#table-of-contents) - +[⬆ Back to top](#table-of-contents) ### fibonacciCountUntilNum @@ -252,19 +247,19 @@ Use a mathematical formula to calculate the number of fibonacci numbers until `n ```js const fibonacciCountUntilNum = num => Math.ceil(Math.log(num * Math.sqrt(5) + 1 / 2) / Math.log((Math.sqrt(5) + 1) / 2)); -``` +```
-Examples - + Examples + ```js fibonacciCountUntilNum(10); // 7 ```
+ -
[⬆ Back to top](#table-of-contents) - +[⬆ Back to top](#table-of-contents) ### fibonacciUntilNum @@ -282,19 +277,19 @@ const fibonacciUntilNum = num => { [] ); }; -``` +```
-Examples - + Examples + ```js fibonacciUntilNum(10); // [ 0, 1, 1, 2, 3, 5, 8 ] ```
+ -
[⬆ Back to top](#table-of-contents) - +[⬆ Back to top](#table-of-contents) ### httpDelete @@ -313,11 +308,11 @@ const httpDelete = (url, callback, err = console.error) => { request.onerror = () => err(request); request.send(); }; -``` +```
-Examples - + Examples + ```js httpDelete('https://website.com/users/123', request => { console.log(request.responseText); @@ -325,9 +320,9 @@ httpDelete('https://website.com/users/123', request => { ```
+ -
[⬆ Back to top](#table-of-contents) - +[⬆ Back to top](#table-of-contents) ### httpPut @@ -348,11 +343,11 @@ const httpPut = (url, data, callback, err = console.error) => { request.onerror = () => err(request); request.send(data); }; -``` +```
-Examples - + Examples + ```js const password = "fooBaz"; const data = JSON.stringify(password); @@ -362,9 +357,9 @@ httpPut('https://website.com/users/123', data, request => { ```
+ -
[⬆ Back to top](#table-of-contents) - +[⬆ Back to top](#table-of-contents) ### isArmstrongNumber @@ -377,20 +372,20 @@ const isArmstrongNumber = digits => (arr => arr.reduce((a, d) => a + parseInt(d) ** arr.length, 0) == digits)( (digits + '').split('') ); -``` +```
-Examples - + Examples + ```js isArmstrongNumber(1634); // true isArmstrongNumber(56); // false ```
+ -
[⬆ Back to top](#table-of-contents) - +[⬆ Back to top](#table-of-contents) ### isSimilar @@ -399,26 +394,25 @@ Determines if the `pattern` matches with `str`. Use `String.toLowerCase()` to convert both strings to lowercase, then loop through `str` and determine if it contains all characters of `pattern` and in the correct order. Adapted from [here](https://github.com/forrestthewoods/lib_fts/blob/80f3f8c52db53428247e741b9efe2cde9667050c/code/fts_fuzzy_match.js#L18). -``` js +```js const isSimilar = (pattern, str) => [...str].reduce( (matchIndex, char) => char.toLowerCase() === (pattern[matchIndex] || '').toLowerCase() ? matchIndex + 1 : matchIndex, 0 ) === pattern.length ? true : false; -``` +``` - -``` js +
+ Examples + +```js isSimilar('rt','Rohit'); // true isSimilar('tr','Rohit'); // false -```
-Examples - ```
+ -
[⬆ Back to top](#table-of-contents) - +[⬆ Back to top](#table-of-contents) ### levenshteinDistance @@ -445,11 +439,11 @@ const levenshteinDistance = (string1, string2) => { } return matrix[string2.length][string1.length]; }; -``` +```
-Examples - + Examples + ```js levenshteinDistance('30-seconds-of-code','30-seconds-of-python-code'); // 7 const compareStrings = (string1,string2) => (100 - levenshteinDistance(string1,string2) / Math.max(string1.length,string2.length)); @@ -457,9 +451,9 @@ compareStrings('30-seconds-of-code', '30-seconds-of-python-code'); // 99.72 (%) ```
+ -
[⬆ Back to top](#table-of-contents) - +[⬆ Back to top](#table-of-contents) ### quickSort @@ -478,20 +472,20 @@ const quickSort = ([n, ...nums], desc) => n, ...quickSort(nums.filter(v => (!desc ? v > n : v <= n)), desc) ]; -``` +```
-Examples - + Examples + ```js quickSort([4, 1, 3, 2]); // [1,2,3,4] quickSort([4, 1, 3, 2], true); // [4,3,2,1] ```
+ -
[⬆ Back to top](#table-of-contents) - +[⬆ Back to top](#table-of-contents) ### removeVowels @@ -502,20 +496,20 @@ Omot `repl` to use a default value of `''`. ```js const removeVowels = (str, repl = '') => str.replace(/[aeiou]/gi,repl); -``` +```
-Examples - + Examples + ```js removeVowels("foobAr"); // "fbr" removeVowels("foobAr","*"); // "f**b*r" ```
+ -
[⬆ Back to top](#table-of-contents) - +[⬆ Back to top](#table-of-contents) ### solveRPN @@ -556,20 +550,20 @@ const solveRPN = rpn => { if (stack.length === 1) return stack.pop(); else throw `${rpn} is not a proper RPN. Please check it and try again`; }; -``` +```
-Examples - + Examples + ```js solveRPN('15 7 1 1 + - / 3 * 2 1 1 + + -'); // 5 solveRPN('2 3 ^'); // 8 ```
+ -
[⬆ Back to top](#table-of-contents) - +[⬆ Back to top](#table-of-contents) ### howManyTimes @@ -592,11 +586,11 @@ const howManyTimes = (num, divisor) => { } return i; }; -``` +```
-Examples - + Examples + ```js howManyTimes(100, 2); // 2 howManyTimes(100, 2.5); // 2 @@ -605,6 +599,7 @@ howManyTimes(100, -1); // Infinity ```
+ -
[⬆ Back to top](#table-of-contents) +[⬆ Back to top](#table-of-contents) diff --git a/test/testlog b/test/testlog index 183e988c5..6cf70f8ba 100644 --- a/test/testlog +++ b/test/testlog @@ -3,2099 +3,274 @@ # Starting... # 347 test suites found. -# PASS test/isPrimitive/isPrimitive.test.js +# PASS test/uniqueElements/uniqueElements.test.js -ok 1 — isPrimitive is a Function -ok 2 — isPrimitive(null) is primitive -ok 3 — isPrimitive(undefined) is primitive -ok 4 — isPrimitive(string) is primitive -ok 5 — isPrimitive(true) is primitive -ok 6 — isPrimitive(50) is primitive -ok 7 — isPrimitive('Hello') is primitive -ok 8 — isPrimitive(false) is primitive -ok 9 — isPrimitive(Symbol()) is primitive -ok 10 — isPrimitive([1, 2, 3]) is not primitive -ok 11 — isPrimitive({ a: 123 }) is not primitive -ok 12 — isPrimitive({ a: 123 }) takes less than 2s to run - -# PASS test/toKebabCase/toKebabCase.test.js - -ok 13 — toKebabCase is a Function -ok 14 — toKebabCase('camelCase') returns camel-case -ok 15 — toKebabCase('some text') returns some-text -ok 16 — toKebabCase('some-mixed-string With spaces-underscores-and-hyphens') returns some-mixed-string-with-spaces-underscores-and-hyphens -ok 17 — toKebabCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML') returns i-am-listening-to-fm-while-loading-different-url-on-my-browser-and-also-editing-some-xml-and-html -ok 18 — toKebabCase() returns undefined -ok 19 — toKebabCase([]) throws an erro -ok 20 — toKebabCase({}) throws an erro -ok 21 — toKebabCase(123) throws an erro -ok 22 — toKebabCase(IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML) takes less than 2s to run - -# PASS test/is/is.test.js - -ok 23 — is is a Function -ok 24 — Works for arrays with data -ok 25 — Works for empty arrays -ok 26 — Works for arrays, not objects -ok 27 — Works for objects -ok 28 — Works for maps -ok 29 — Works for regular expressions -ok 30 — Works for sets -ok 31 — Works for weak maps -ok 32 — Works for weak sets -ok 33 — Works for strings - returns true for primitive -ok 34 — Works for strings - returns true when using constructor -ok 35 — Works for numbers - returns true for primitive -ok 36 — Works for numbers - returns true when using constructor -ok 37 — Works for booleans - returns true for primitive -ok 38 — Works for booleans - returns true when using constructor -ok 39 — Works for functions - -# PASS test/yesNo/yesNo.test.js - -ok 40 — yesNo is a Function -ok 41 — yesNo(Y) returns true -ok 42 — yesNo(yes) returns true -ok 43 — yesNo(foo, true) returns true -ok 44 — yesNo(No) returns false -ok 45 — yesNo() returns false -ok 46 — yesNo(null) returns false -ok 47 — yesNo(undefined) returns false -ok 48 — yesNo([123, null]) returns false -ok 49 — yesNo([Yes, No]) returns false -ok 50 — yesNo({ 2: Yes }) returns false -ok 51 — yesNo([Yes, No], true) returns true -ok 52 — yesNo({ 2: Yes }, true) returns true - -# PASS test/toSafeInteger/toSafeInteger.test.js - -ok 53 — toSafeInteger is a Function -ok 54 — Number(toSafeInteger(3.2)) is a number -ok 55 — Converts a value to a safe integer -ok 56 — toSafeInteger('4.2') returns 4 -ok 57 — toSafeInteger(4.6) returns 5 -ok 58 — toSafeInteger([]) returns 0 -ok 59 — isNaN(toSafeInteger([1.5, 3124])) is true -ok 60 — isNaN(toSafeInteger('string')) is true -ok 61 — isNaN(toSafeInteger({})) is true -ok 62 — isNaN(toSafeInteger()) is true -ok 63 — toSafeInteger(Infinity) returns 9007199254740991 -ok 64 — toSafeInteger(3.2) takes less than 2s to run - -# PASS test/head/head.test.js - -ok 65 — head is a Function -ok 66 — head({ a: 1234}) returns undefined -ok 67 — head([1, 2, 3]) returns 1 -ok 68 — head({ 0: false}) returns false -ok 69 — head(String) returns S -ok 70 — head(null) throws an Error -ok 71 — head(undefined) throws an Error -ok 72 — head() throws an Error -ok 73 — head([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run - -# PASS test/union/union.test.js - -ok 74 — union is a Function -ok 75 — union([1, 2, 3], [4, 3, 2]) returns [1, 2, 3, 4] -ok 76 — union('str', 'asd') returns [ 's', 't', 'r', 'a', 'd' ] -ok 77 — union([[], {}], [1, 2, 3]) returns [[], {}, 1, 2, 3] -ok 78 — union([], []) returns [] -ok 79 — union() throws an error -ok 80 — union(true, 'str') throws an error -ok 81 — union('false', true) throws an error -ok 82 — union((123, {}) throws an error -ok 83 — union([], {}) throws an error -ok 84 — union(undefined, null) throws an error -ok 85 — union([1, 2, 3], [4, 3, 2]) takes less than 2s to run - -# PASS test/longestItem/longestItem.test.js - -ok 86 — longestItem is a Function -ok 87 — Returns the longest object from plain values -ok 88 — Returns the longest object from a spread array -ok 89 — Returns the longest object from mixed input -ok 90 — Returns the longest array -ok 91 — Returns the longest object when comparing arrays and strings -ok 92 — Returns undefined without any input -ok 93 — Returns first found of all similar -ok 94 — Throws TypeError if all inputs are undefined - -# PASS test/zip/zip.test.js - -ok 95 — zip is a Function -ok 96 — zip([a, b], [1, 2], [true, false]) returns [[a, 1, true], [b, 2, false]] -ok 97 — zip([a], [1, 2], [true, false]) returns [[a, 1, true], [undefined, 2, false]] -ok 98 — zip([]) returns [] -ok 99 — zip(123) returns [] -ok 100 — zip([a, b], [1, 2], [true, false]) returns an Array -ok 101 — zip([a], [1, 2], [true, false]) returns an Array -ok 102 — zip(null) throws an error -ok 103 — zip(undefined) throws an error - -# PASS test/isSorted/isSorted.test.js - -ok 104 — isSorted is a Function -ok 105 — Array is sorted in ascending order -ok 106 — Array is sorted in ascending order -ok 107 — Array is sorted in ascending order -ok 108 — Array is sorted in ascending order -ok 109 — Array is sorted in descending order -ok 110 — Array is sorted in descending order -ok 111 — Array is sorted in descending order -ok 112 — Array is sorted in descending order -ok 113 — Array is empty -ok 114 — Array is not sorted, direction changed in array -ok 115 — Array is not sorted, direction changed in array - -# PASS test/all/all.test.js - -ok 116 — all is a Function -ok 117 — Returns true for arrays with no falsey values -ok 118 — Returns false for arrays with 0 -ok 119 — Returns false for arrays with NaN -ok 120 — Returns false for arrays with undefined -ok 121 — Returns false for arrays with null -ok 122 — Returns false for arrays with empty strings -ok 123 — Returns true with predicate function -ok 124 — Returns false with a predicate function - -# PASS test/equals/equals.test.js - -ok 125 — equals is a Function -ok 126 — { a: [2, {e: 3}], b: [4], c: 'foo' } is equal to { a: [2, {e: 3}], b: [4], c: 'foo' } -ok 127 — [1,2,3] is equal to [1,2,3] -ok 128 — { a: [2, 3], b: [4] } is not equal to { a: [2, 3], b: [6] } -ok 129 — [1,2,3] is not equal to [1,2,4] -ok 130 — [1, 2, 3] should be equal to { 0: 1, 1: 2, 2: 3 }) - type is different, but their enumerable properties match. - -# PASS test/pluralize/pluralize.test.js - -ok 131 — pluralize is a Function -ok 132 — Produces the plural of the word -ok 133 — Produces the singular of the word -ok 134 — Produces the plural of the word -ok 135 — Prodices the defined plural of the word -ok 136 — Works with a dictionary - -# PASS test/CSVToArray/CSVToArray.test.js - -ok 137 — CSVToArray is a Function -ok 138 — CSVToArray works with default delimiter -ok 139 — CSVToArray works with custom delimiter -ok 140 — CSVToArray omits the first row -ok 141 — CSVToArray omits the first row and works with a custom delimiter - -# PASS test/randomIntArrayInRange/randomIntArrayInRange.test.js - -ok 142 — randomIntArrayInRange is a Function -ok 143 — The returned array contains only integers -ok 144 — The returned array has the proper length -ok 145 — The returned array's values lie between provided lowerLimit and upperLimit (both inclusive). - -# PASS test/randomIntegerInRange/randomIntegerInRange.test.js - -ok 146 — randomIntegerInRange is a Function -ok 147 — The returned value is an integer -ok 148 — The returned value lies between provided lowerLimit and upperLimit (both inclusive). - -# PASS test/offset/offset.test.js - -ok 149 — offset is a Function -ok 150 — Offset of 0 returns the same array. -ok 151 — Offset > 0 returns the offsetted array. -ok 152 — Offset < 0 returns the reverse offsetted array. -ok 153 — Offset greater than the length of the array returns the same array. -ok 154 — Offset less than the negative length of the array returns the same array. -ok 155 — Offsetting empty array returns an empty array. - -# PASS test/initializeArrayWithRange/initializeArrayWithRange.test.js - -ok 156 — initializeArrayWithRange is a Function -ok 157 — Initializes an array containing the numbers in the specified range (witout start value) -ok 158 — Initializes an array containing the numbers in the specified range -ok 159 — Initializes an array containing the numbers in the specified range (with step) - -# PASS test/orderBy/orderBy.test.js - -ok 160 — orderBy is a Function -ok 161 — Returns a sorted array of objects ordered by properties and orders. -ok 162 — Returns a sorted array of objects ordered by properties and orders. - -# PASS test/randomNumberInRange/randomNumberInRange.test.js - -ok 163 — randomNumberInRange is a Function -ok 164 — The returned value is a number -ok 165 — The returned value lies between provided lowerLimit and upperLimit (both inclusive). - -# PASS test/allEqual/allEqual.test.js - -ok 166 — allEqual is a Function -ok 167 — Truthy numbers -ok 168 — Falsy numbers -ok 169 — Truthy strings -ok 170 — Falsy numbers -ok 171 — Truthy trues -ok 172 — Truthy falses -ok 173 — Falsy trues -ok 174 — Falsy falses - -# PASS test/sampleSize/sampleSize.test.js - -ok 175 — sampleSize is a Function -ok 176 — Returns a single element without n specified -ok 177 — Returns a random sample of specified size from an array -ok 178 — Returns all elements in an array if n >= length -ok 179 — Returns an empty array if original array is empty -ok 180 — Returns an empty array if n = 0 - -# PASS test/any/any.test.js - -ok 181 — any is a Function -ok 182 — Returns true for arrays with at least one truthy value -ok 183 — Returns false for arrays with no truthy values -ok 184 — Returns false for arrays with no truthy values -ok 185 — Returns true with predicate function -ok 186 — Returns false with a predicate function - -# PASS test/without/without.test.js - -ok 187 — without is a Function -ok 188 — without([2, 1, 2, 3], 1, 2) returns [3] -ok 189 — without([]) returns [] -ok 190 — without([3, 1, true, '3', true], '3', true) returns [3, 1] -ok 191 — without('string'.split(''), 's', 't', 'g') returns ['r', 'i', 'n'] -ok 192 — without() throws an error -ok 193 — without(null) throws an error -ok 194 — without(undefined) throws an error -ok 195 — without(123) throws an error -ok 196 — without({}) throws an error - -# PASS test/isEmpty/isEmpty.test.js - -ok 197 — isEmpty is a Function -ok 198 — Returns true for empty Map -ok 199 — Returns true for empty Set -ok 200 — Returns true for empty array -ok 201 — Returns true for empty object -ok 202 — Returns true for empty string -ok 203 — Returns false for non-empty array -ok 204 — Returns false for non-empty object -ok 205 — Returns false for non-empty string -ok 206 — Returns true - type is not considered a collection -ok 207 — Returns true - type is not considered a collection +ok 1 — uniqueElements is a Function +ok 2 — uniqueElements([1, 2, 2, 3, 4, 4, 5]) returns [1,2,3,4,5] +ok 3 — uniqueElements([1, 23, 53]) returns [1, 23, 53] +ok 4 — uniqueElements([true, 0, 1, false, false, undefined, null, '']) returns [true, 0, 1, false, false, undefined, null, ''] +ok 5 — uniqueElements() returns [] +ok 6 — uniqueElements(null) returns [] +ok 7 — uniqueElements(undefined) returns [] +ok 8 — uniqueElements('strt') returns ['s', 't', 'r'] +ok 9 — uniqueElements(1, 1, 2543, 534, 5) throws an error +ok 10 — uniqueElements({}) throws an error +ok 11 — uniqueElements(true) throws an error +ok 12 — uniqueElements(false) throws an error +ok 13 — uniqueElements([true, 0, 1, false, false, undefined, null]) takes less than 2s to run # PASS test/toSnakeCase/toSnakeCase.test.js -ok 208 — toSnakeCase is a Function -ok 209 — toSnakeCase('camelCase') returns camel_case -ok 210 — toSnakeCase('some text') returns some_text -ok 211 — toSnakeCase('some-mixed_string With spaces_underscores-and-hyphens') returns some_mixed_string_with_spaces_underscores_and_hyphens -ok 212 — toSnakeCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML') returns i_am_listening_to_fm_while_loading_different_url_on_my_browser_and_also_editing_some_xml_and_html -ok 213 — toSnakeCase() returns undefined -ok 214 — toSnakeCase([]) throws an error -ok 215 — toSnakeCase({}) throws an error -ok 216 — toSnakeCase(123) throws an error -ok 217 — toSnakeCase(IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML) takes less than 2s to run +ok 14 — toSnakeCase is a Function +ok 15 — toSnakeCase('camelCase') returns camel_case +ok 16 — toSnakeCase('some text') returns some_text +ok 17 — toSnakeCase('some-mixed_string With spaces_underscores-and-hyphens') returns some_mixed_string_with_spaces_underscores_and_hyphens +ok 18 — toSnakeCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML') returns i_am_listening_to_fm_while_loading_different_url_on_my_browser_and_also_editing_some_xml_and_html +ok 19 — toSnakeCase() returns undefined +ok 20 — toSnakeCase([]) throws an error +ok 21 — toSnakeCase({}) throws an error +ok 22 — toSnakeCase(123) throws an error +ok 23 — toSnakeCase(IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML) takes less than 2s to run -# PASS test/toCurrency/toCurrency.test.js +# PASS test/toKebabCase/toKebabCase.test.js -ok 218 — toCurrency is a Function -ok 219 — currency: Euro | currencyLangFormat: Local -ok 220 — currency: US Dollar | currencyLangFormat: English (United States) -ok 221 — currency: Japanese Yen | currencyLangFormat: Local - -# PASS test/mapObject/mapObject.test.js - -ok 222 — mapObject is a Function -ok 223 — mapObject([1, 2, 3], a => a * a) returns { 1: 1, 2: 4, 3: 9 } -ok 224 — mapObject([1, 2, 3, 4], (a, b) => b - a) returns { 1: -1, 2: -1, 3: -1, 4: -1 } -ok 225 — mapObject([1, 2, 3, 4], (a, b) => a - b) returns { 1: 1, 2: 1, 3: 1, 4: 1 } - -# PASS test/average/average.test.js - -ok 226 — average is a Function -ok 227 — average(true) returns 0 -ok 228 — average(false) returns 1 -ok 229 — average(9, 1) returns 5 -ok 230 — average(153, 44, 55, 64, 71, 1122, 322774, 2232, 23423, 234, 3631) returns 32163.909090909092 -ok 231 — average(1, 2, 3) returns 2 -ok 232 — average(null) returns 0 -ok 233 — average(1, 2, 3) returns NaN -ok 234 — average(String) returns NaN -ok 235 — average({ a: 123}) returns NaN -ok 236 — average([undefined, 0, string]) returns NaN -ok 237 — average([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run - -# PASS test/validateNumber/validateNumber.test.js - -ok 238 — validateNumber is a Function -ok 239 — validateNumber(9) returns true -ok 240 — validateNumber(234asd.slice(0, 2)) returns true -ok 241 — validateNumber(1232) returns true -ok 242 — validateNumber(1232 + 13423) returns true -ok 243 — validateNumber(1232 * 2342 * 123) returns true -ok 244 — validateNumber(1232.23423536) returns true -ok 245 — validateNumber(234asd) returns false -ok 246 — validateNumber(e234d) returns false -ok 247 — validateNumber(false) returns false -ok 248 — validateNumber(true) returns false -ok 249 — validateNumber(null) returns false -ok 250 — validateNumber(123 * asd) returns false - -# PASS test/quickSort/quickSort.test.js - -ok 251 — quickSort is a Function -ok 252 — quickSort([5, 6, 4, 3, 1, 2]) returns [1, 2, 3, 4, 5, 6] -ok 253 — quickSort([-1, 0, -2]) returns [-2, -1, 0] -ok 254 — quickSort() throws an error -ok 255 — quickSort(123) throws an error -ok 256 — quickSort({ 234: string}) throws an error -ok 257 — quickSort(null) throws an error -ok 258 — quickSort(undefined) throws an error -ok 259 — quickSort([11, 1, 324, 23232, -1, 53, 2, 524, 32, 13, 156, 133, 62, 12, 4]) takes less than 2s to run +ok 24 — toKebabCase is a Function +ok 25 — toKebabCase('camelCase') returns camel-case +ok 26 — toKebabCase('some text') returns some-text +ok 27 — toKebabCase('some-mixed-string With spaces-underscores-and-hyphens') returns some-mixed-string-with-spaces-underscores-and-hyphens +ok 28 — toKebabCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML') returns i-am-listening-to-fm-while-loading-different-url-on-my-browser-and-also-editing-some-xml-and-html +ok 29 — toKebabCase() returns undefined +ok 30 — toKebabCase([]) throws an erro +ok 31 — toKebabCase({}) throws an erro +ok 32 — toKebabCase(123) throws an erro +ok 33 — toKebabCase(IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML) takes less than 2s to run # PASS test/toCamelCase/toCamelCase.test.js -ok 260 — toCamelCase is a Function -ok 261 — toCamelCase('some_database_field_name') returns someDatabaseFieldName -ok 262 — toCamelCase('Some label that needs to be camelized') returns someLabelThatNeedsToBeCamelized -ok 263 — toCamelCase('some-javascript-property') return someJavascriptProperty -ok 264 — toCamelCase('some-mixed_string with spaces_underscores-and-hyphens') returns someMixedStringWithSpacesUnderscoresAndHyphens -ok 265 — toCamelCase() throws a error -ok 266 — toCamelCase([]) throws a error -ok 267 — toCamelCase({}) throws a error -ok 268 — toCamelCase(123) throws a error -ok 269 — toCamelCase(some-mixed_string with spaces_underscores-and-hyphens) takes less than 2s to run +ok 34 — toCamelCase is a Function +ok 35 — toCamelCase('some_database_field_name') returns someDatabaseFieldName +ok 36 — toCamelCase('Some label that needs to be camelized') returns someLabelThatNeedsToBeCamelized +ok 37 — toCamelCase('some-javascript-property') return someJavascriptProperty +ok 38 — toCamelCase('some-mixed_string with spaces_underscores-and-hyphens') returns someMixedStringWithSpacesUnderscoresAndHyphens +ok 39 — toCamelCase() throws a error +ok 40 — toCamelCase([]) throws a error +ok 41 — toCamelCase({}) throws a error +ok 42 — toCamelCase(123) throws a error +ok 43 — toCamelCase(some-mixed_string with spaces_underscores-and-hyphens) takes less than 2s to run -# PASS test/fromCamelCase/fromCamelCase.test.js +# PASS test/is/is.test.js -ok 270 — fromCamelCase is a Function -ok 271 — Converts a string from camelcase -ok 272 — Converts a string from camelcase -ok 273 — Converts a string from camelcase +ok 44 — is is a Function +ok 45 — Works for arrays with data +ok 46 — Works for empty arrays +ok 47 — Works for arrays, not objects +ok 48 — Works for objects +ok 49 — Works for maps +ok 50 — Works for regular expressions +ok 51 — Works for sets +ok 52 — Works for weak maps +ok 53 — Works for weak sets +ok 54 — Works for strings - returns true for primitive +ok 55 — Works for strings - returns true when using constructor +ok 56 — Works for numbers - returns true for primitive +ok 57 — Works for numbers - returns true when using constructor +ok 58 — Works for booleans - returns true for primitive +ok 59 — Works for booleans - returns true when using constructor +ok 60 — Works for functions -# PASS test/mapString/mapString.test.js +# PASS test/average/average.test.js -ok 274 — mapString is a Function -ok 275 — mapString returns a capitalized string -ok 276 — mapString can deal with indexes -ok 277 — mapString can deal with the full string +ok 61 — average is a Function +ok 62 — average(true) returns 0 +ok 63 — average(false) returns 1 +ok 64 — average(9, 1) returns 5 +ok 65 — average(153, 44, 55, 64, 71, 1122, 322774, 2232, 23423, 234, 3631) returns 32163.909090909092 +ok 66 — average(1, 2, 3) returns 2 +ok 67 — average(null) returns 0 +ok 68 — average(1, 2, 3) returns NaN +ok 69 — average(String) returns NaN +ok 70 — average({ a: 123}) returns NaN +ok 71 — average([undefined, 0, string]) returns NaN +ok 72 — average([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run -# PASS test/reduceWhich/reduceWhich.test.js +# PASS test/union/union.test.js -ok 278 — reduceWhich is a Function -ok 279 — Returns the minimum of an array -ok 280 — Returns the maximum of an array -ok 281 — Returns the object with the minimum specified value in an array +ok 73 — union is a Function +ok 74 — union([1, 2, 3], [4, 3, 2]) returns [1, 2, 3, 4] +ok 75 — union('str', 'asd') returns [ 's', 't', 'r', 'a', 'd' ] +ok 76 — union([[], {}], [1, 2, 3]) returns [[], {}, 1, 2, 3] +ok 77 — union([], []) returns [] +ok 78 — union() throws an error +ok 79 — union(true, 'str') throws an error +ok 80 — union('false', true) throws an error +ok 81 — union((123, {}) throws an error +ok 82 — union([], {}) throws an error +ok 83 — union(undefined, null) throws an error +ok 84 — union([1, 2, 3], [4, 3, 2]) takes less than 2s to run -# PASS test/geometricProgression/geometricProgression.test.js +# PASS test/validateNumber/validateNumber.test.js -ok 282 — geometricProgression is a Function -ok 283 — Initializes an array containing the numbers in the specified range -ok 284 — Initializes an array containing the numbers in the specified range -ok 285 — Initializes an array containing the numbers in the specified range +ok 85 — validateNumber is a Function +ok 86 — validateNumber(9) returns true +ok 87 — validateNumber(234asd.slice(0, 2)) returns true +ok 88 — validateNumber(1232) returns true +ok 89 — validateNumber(1232 + 13423) returns true +ok 90 — validateNumber(1232 * 2342 * 123) returns true +ok 91 — validateNumber(1232.23423536) returns true +ok 92 — validateNumber(234asd) returns false +ok 93 — validateNumber(e234d) returns false +ok 94 — validateNumber(false) returns false +ok 95 — validateNumber(true) returns false +ok 96 — validateNumber(null) returns false +ok 97 — validateNumber(123 * asd) returns false -# PASS test/approximatelyEqual/approximatelyEqual.test.js +# PASS test/toSafeInteger/toSafeInteger.test.js -ok 286 — approximatelyEqual is a Function -ok 287 — Works for PI / 2 -ok 288 — Works for 0.1 + 0.2 === 0.3 -ok 289 — Works for exactly equal values -ok 290 — Works for a custom epsilon +ok 98 — toSafeInteger is a Function +ok 99 — Number(toSafeInteger(3.2)) is a number +ok 100 — Converts a value to a safe integer +ok 101 — toSafeInteger('4.2') returns 4 +ok 102 — toSafeInteger(4.6) returns 5 +ok 103 — toSafeInteger([]) returns 0 +ok 104 — isNaN(toSafeInteger([1.5, 3124])) is true +ok 105 — isNaN(toSafeInteger('string')) is true +ok 106 — isNaN(toSafeInteger({})) is true +ok 107 — isNaN(toSafeInteger()) is true +ok 108 — toSafeInteger(Infinity) returns 9007199254740991 +ok 109 — toSafeInteger(3.2) takes less than 2s to run -# PASS test/filterNonUniqueBy/filterNonUniqueBy.test.js +# PASS test/isPrimitive/isPrimitive.test.js -ok 291 — filterNonUniqueBy is a Function -ok 292 — filterNonUniqueBy works for properties -ok 293 — filterNonUniqueBy works for nested properties - -# PASS test/last/last.test.js - -ok 294 — last is a Function -ok 295 — last({ a: 1234}) returns undefined -ok 296 — last([1, 2, 3]) returns 3 -ok 297 — last({ 0: false}) returns undefined -ok 298 — last(String) returns g -ok 299 — last(null) throws an Error -ok 300 — last(undefined) throws an Error -ok 301 — last() throws an Error -ok 302 — last([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run - -# PASS test/capitalize/capitalize.test.js - -ok 303 — capitalize is a Function -ok 304 — Capitalizes the first letter of a string -ok 305 — Capitalizes the first letter of a string -ok 306 — Works with characters -ok 307 — "Works with single character words - -# PASS test/chunk/chunk.test.js - -ok 308 — chunk is a Function -ok 309 — chunk([1, 2, 3, 4, 5], 2) returns [[1,2],[3,4],[5]] -ok 310 — chunk([]) returns [] -ok 311 — chunk(123) returns [] -ok 312 — chunk({ a: 123}) returns [] -ok 313 — chunk(string, 2) returns [ st, ri, ng ] -ok 314 — chunk() throws an error -ok 315 — chunk(undefined) throws an error -ok 316 — chunk(null) throws an error -ok 317 — chunk(This is a string, 2) takes less than 2s to run - -# PASS test/words/words.test.js - -ok 318 — words is a Function -ok 319 — words('I love javaScript!!') returns [I, love, javaScript] -ok 320 — words('python, javaScript & coffee') returns [python, javaScript, coffee] -ok 321 — words(I love javaScript!!) returns an array -ok 322 — words() throws an error -ok 323 — words(null) throws an error -ok 324 — words(undefined) throws an error -ok 325 — words({}) throws an error -ok 326 — words([]) throws an error -ok 327 — words(1234) throws an error - -# PASS test/none/none.test.js - -ok 328 — none is a Function -ok 329 — Returns true for arrays with no truthy values -ok 330 — Returns false for arrays with at least one truthy value -ok 331 — Returns true with a predicate function -ok 332 — Returns false with predicate function - -# PASS test/JSONtoCSV/JSONtoCSV.test.js - -ok 333 — JSONtoCSV is a Function -ok 334 — JSONtoCSV works with default delimiter -ok 335 — JSONtoCSV works with custom delimiter - -# PASS test/uniqueElements/uniqueElements.test.js - -ok 336 — uniqueElements is a Function -ok 337 — uniqueElements([1, 2, 2, 3, 4, 4, 5]) returns [1,2,3,4,5] -ok 338 — uniqueElements([1, 23, 53]) returns [1, 23, 53] -ok 339 — uniqueElements([true, 0, 1, false, false, undefined, null, '']) returns [true, 0, 1, false, false, undefined, null, ''] -ok 340 — uniqueElements() returns [] -ok 341 — uniqueElements(null) returns [] -ok 342 — uniqueElements(undefined) returns [] -ok 343 — uniqueElements('strt') returns ['s', 't', 'r'] -ok 344 — uniqueElements(1, 1, 2543, 534, 5) throws an error -ok 345 — uniqueElements({}) throws an error -ok 346 — uniqueElements(true) throws an error -ok 347 — uniqueElements(false) throws an error -ok 348 — uniqueElements([true, 0, 1, false, false, undefined, null]) takes less than 2s to run - -# PASS test/dig/dig.test.js - -ok 349 — dig is a Function -ok 350 — Dig target success -ok 351 — Dig target with falsey value -ok 352 — Dig target with array -ok 353 — Unknown target return undefined - -# PASS test/uniqueElementsByRight/uniqueElementsByRight.test.js - -ok 354 — uniqueElementsByRight is a Function -ok 355 — uniqueElementsByRight works for properties -ok 356 — uniqueElementsByRight works for nested properties - -# PASS test/mask/mask.test.js - -ok 357 — mask is a Function -ok 358 — Replaces all but the last num of characters with the specified mask character -ok 359 — Replaces all but the last num of characters with the specified mask character -ok 360 — Replaces all but the last num of characters with the specified mask character - -# PASS test/deepClone/deepClone.test.js - -ok 361 — deepClone is a Function -ok 362 — Shallow cloning works -ok 363 — Deep cloning works -ok 364 — Array shallow cloning works -ok 365 — Array deep cloning works - -# PASS test/round/round.test.js - -ok 366 — round is a Function -ok 367 — round(1.005, 2) returns 1.01 -ok 368 — round(123.3423345345345345344, 11) returns 123.34233453453 -ok 369 — round(3.342, 11) returns 3.342 -ok 370 — round(1.005) returns 1 -ok 371 — round([1.005, 2]) returns NaN -ok 372 — round(string) returns NaN -ok 373 — round() returns NaN -ok 374 — round(132, 413, 4134) returns NaN -ok 375 — round({a: 132}, 413) returns NaN -ok 376 — round(123.3423345345345345344, 11) takes less than 2s to run - -# PASS test/binomialCoefficient/binomialCoefficient.test.js - -ok 377 — binomialCoefficient is a Function -ok 378 — Returns the appropriate value -ok 379 — Returns the appropriate value -ok 380 — Returns the appropriate value -ok 381 — Returns NaN -ok 382 — Returns NaN - -# PASS test/isAnagram/isAnagram.test.js - -ok 383 — isAnagram is a Function -ok 384 — Checks valid anagram -ok 385 — Works with spaces -ok 386 — Ignores case -ok 387 — Ignores special characters - -# PASS test/converge/converge.test.js - -ok 388 — converge is a Function -ok 389 — Produces the average of the array -ok 390 — Produces the strange concatenation - -# PASS test/inRange/inRange.test.js - -ok 391 — inRange is a Function -ok 392 — The given number falls within the given range -ok 393 — The given number falls within the given range -ok 394 — The given number does not falls within the given range -ok 395 — The given number does not falls within the given range - -# PASS test/factorial/factorial.test.js - -ok 396 — factorial is a Function -ok 397 — Calculates the factorial of 720 -ok 398 — Calculates the factorial of 0 -ok 399 — Calculates the factorial of 1 -ok 400 — Calculates the factorial of 4 -ok 401 — Calculates the factorial of 10 - -# PASS test/randomHexColorCode/randomHexColorCode.test.js - -ok 402 — randomHexColorCode is a Function -ok 403 — randomHexColorCode has to proper length -ok 404 — The color code starts with "#" -ok 405 — The color code contains only valid hex-digits - -# PASS test/join/join.test.js - -ok 406 — join is a Function -ok 407 — Joins all elements of an array into a string and returns this string -ok 408 — Joins all elements of an array into a string and returns this string -ok 409 — Joins all elements of an array into a string and returns this string - -# PASS test/castArray/castArray.test.js - -ok 410 — castArray is a Function -ok 411 — Works for single values -ok 412 — Works for arrays with one value -ok 413 — Works for arrays with multiple value -ok 414 — Works for strings -ok 415 — Works for objects - -# PASS test/invertKeyValues/invertKeyValues.test.js - -ok 416 — invertKeyValues is a Function -ok 417 — invertKeyValues({ a: 1, b: 2, c: 1 }) returns { 1: [ 'a', 'c' ], 2: [ 'b' ] } -ok 418 — invertKeyValues({ a: 1, b: 2, c: 1 }, value => 'group' + value) returns { group1: [ 'a', 'c' ], group2: [ 'b' ] } +ok 110 — isPrimitive is a Function +ok 111 — isPrimitive(null) is primitive +ok 112 — isPrimitive(undefined) is primitive +ok 113 — isPrimitive(string) is primitive +ok 114 — isPrimitive(true) is primitive +ok 115 — isPrimitive(50) is primitive +ok 116 — isPrimitive('Hello') is primitive +ok 117 — isPrimitive(false) is primitive +ok 118 — isPrimitive(Symbol()) is primitive +ok 119 — isPrimitive([1, 2, 3]) is not primitive +ok 120 — isPrimitive({ a: 123 }) is not primitive +ok 121 — isPrimitive({ a: 123 }) takes less than 2s to run # PASS test/zipObject/zipObject.test.js -ok 419 — zipObject is a Function -ok 420 — zipObject([a, b, c], [1, 2]) returns {a: 1, b: 2, c: undefined} -ok 421 — zipObject([a, b], [1, 2, 3]) returns {a: 1, b: 2} -ok 422 — zipObject([a, b, c], string) returns { a: s, b: t, c: r } -ok 423 — zipObject([a], string) returns { a: s } -ok 424 — zipObject() throws an error -ok 425 — zipObject((['string'], null) throws an error -ok 426 — zipObject(null, [1]) throws an error -ok 427 — zipObject('string') throws an error -ok 428 — zipObject('test', 'string') throws an error - -# PASS test/binarySearch/binarySearch.test.js - -ok 429 — binarySearch is a Function -ok 430 — Finds item in array -ok 431 — Returns -1 when not found -ok 432 — Works with empty arrays -ok 433 — Works for one element arrays - -# PASS test/toOrdinalSuffix/toOrdinalSuffix.test.js - -ok 434 — toOrdinalSuffix is a Function -ok 435 — Adds an ordinal suffix to a number -ok 436 — Adds an ordinal suffix to a number -ok 437 — Adds an ordinal suffix to a number -ok 438 — Adds an ordinal suffix to a number - -# PASS test/uniqueElementsBy/uniqueElementsBy.test.js - -ok 439 — uniqueElementsBy is a Function -ok 440 — uniqueElementsBy works for properties -ok 441 — uniqueElementsBy works for nested properties - -# PASS test/isString/isString.test.js - -ok 442 — isString is a Function -ok 443 — foo is a string -ok 444 — "10" is a string -ok 445 — Empty string is a string -ok 446 — 10 is not a string -ok 447 — true is not string - -# PASS test/stringPermutations/stringPermutations.test.js - -ok 448 — stringPermutations is a Function -ok 449 — Generates all stringPermutations of a string -ok 450 — Works for single-letter strings -ok 451 — Works for empty strings - -# PASS test/tomorrow/tomorrow.test.js - -ok 452 — tomorrow is a Function -ok 453 — Returns the correct year -ok 454 — Returns the correct month -ok 455 — Returns the correct date - -# PASS test/untildify/untildify.test.js - -ok 456 — untildify is a Function -ok 457 — Contains no tildes -ok 458 — Does not alter the rest of the path -ok 459 — Does not alter paths without tildes - -# PASS test/URLJoin/URLJoin.test.js - -ok 460 — URLJoin is a Function -ok 461 — Returns proper URL -ok 462 — Returns proper URL - -# PASS test/dropRight/dropRight.test.js - -ok 463 — dropRight is a Function -ok 464 — Returns a new array with n elements removed from the right -ok 465 — Returns a new array with n elements removed from the right -ok 466 — Returns a new array with n elements removed from the right - -# PASS test/capitalizeEveryWord/capitalizeEveryWord.test.js - -ok 467 — capitalizeEveryWord is a Function -ok 468 — Capitalizes the first letter of every word in a string -ok 469 — Works with characters -ok 470 — Works with one word string - -# PASS test/sortedIndex/sortedIndex.test.js - -ok 471 — sortedIndex is a Function -ok 472 — Returns the lowest index at which value should be inserted into array in order to maintain its sort order. -ok 473 — Returns the lowest index at which value should be inserted into array in order to maintain its sort order. - -# PASS test/unzip/unzip.test.js - -ok 474 — unzip is a Function -ok 475 — unzip([['a', 1, true], ['b', 2, false]]) equals [['a','b'], [1, 2], [true, false]] -ok 476 — unzip([['a', 1, true], ['b', 2]]) equals [['a','b'], [1, 2], [true]] - -# PASS test/hexToRGB/hexToRGB.test.js - -ok 477 — hexToRGB is a Function -ok 478 — Converts a color code to a rgb() or rgba() string -ok 479 — Converts a color code to a rgb() or rgba() string -ok 480 — Converts a color code to a rgb() or rgba() string - -# PASS test/reducedFilter/reducedFilter.test.js - -ok 481 — reducedFilter is a Function -ok 482 — Filter an array of objects based on a condition while also filtering out unspecified keys. - -# PASS test/collectInto/collectInto.test.js - -ok 483 — collectInto is a Function -ok 484 — Works with multiple promises - -# PASS test/uniqueSymmetricDifference/uniqueSymmetricDifference.test.js - -ok 485 — uniqueSymmetricDifference is a Function -ok 486 — Returns the symmetric difference between two arrays. -ok 487 — Does not return duplicates from one array - -# PASS test/sumPower/sumPower.test.js - -ok 488 — sumPower is a Function -ok 489 — Returns the sum of the powers of all the numbers from start to end -ok 490 — Returns the sum of the powers of all the numbers from start to end -ok 491 — Returns the sum of the powers of all the numbers from start to end - -# PASS test/standardDeviation/standardDeviation.test.js - -ok 492 — standardDeviation is a Function -ok 493 — Returns the standard deviation of an array of numbers -ok 494 — Returns the standard deviation of an array of numbers - -# PASS test/shuffle/shuffle.test.js - -ok 495 — shuffle is a Function -ok 496 — Shuffles the array -ok 497 — New array contains all original elements -ok 498 — Works for empty arrays -ok 499 — Works for single-element arrays - -# PASS test/CSVToJSON/CSVToJSON.test.js - -ok 500 — CSVToJSON is a Function -ok 501 — CSVToJSON works with default delimiter -ok 502 — CSVToJSON works with custom delimiter - -# PASS test/isObjectLike/isObjectLike.test.js - -ok 503 — isObjectLike is a Function -ok 504 — Returns true for an object -ok 505 — Returns true for an array -ok 506 — Returns false for a function -ok 507 — Returns false for null - -# PASS test/partition/partition.test.js - -ok 508 — partition is a Function -ok 509 — Groups the elements into two arrays, depending on the provided function's truthiness for each element. - -# PASS test/isObject/isObject.test.js - -ok 510 — isObject is a Function -ok 511 — isObject([1, 2, 3, 4]) is a object -ok 512 — isObject([]) is a object -ok 513 — isObject({ a:1 }) is a object -ok 514 — isObject(true) is not a object - -# PASS test/formatDuration/formatDuration.test.js - -ok 515 — formatDuration is a Function -ok 516 — Returns the human readable format of the given number of milliseconds -ok 517 — Returns the human readable format of the given number of milliseconds - -# PASS test/prettyBytes/prettyBytes.test.js - -ok 518 — prettyBytes is a Function -ok 519 — Converts a number in bytes to a human-readable string. -ok 520 — Converts a number in bytes to a human-readable string. -ok 521 — Converts a number in bytes to a human-readable string. - -# PASS test/isAbsoluteURL/isAbsoluteURL.test.js - -ok 522 — isAbsoluteURL is a Function -ok 523 — Given string is an absolute URL -ok 524 — Given string is an absolute URL -ok 525 — Given string is not an absolute URL - -# PASS test/byteSize/byteSize.test.js - -ok 526 — byteSize is a Function -ok 527 — Works for a single letter -ok 528 — Works for a common string -ok 529 — Works for emoji - -# PASS test/symmetricDifferenceWith/symmetricDifferenceWith.test.js - -ok 530 — symmetricDifferenceWith is a Function -ok 531 — Returns the symmetric difference between two arrays, using a provided function as a comparator - -# PASS test/matches/matches.test.js - -ok 532 — matches is a Function -ok 533 — Matches returns true for two similar objects -ok 534 — Matches returns false for two non-similar objects - -# PASS test/pad/pad.test.js - -ok 535 — pad is a Function -ok 536 — cat is padded on both sides -ok 537 — length of string is 8 -ok 538 — pads 42 with "0" -ok 539 — does not truncates if string exceeds length - -# PASS test/isValidJSON/isValidJSON.test.js - -ok 540 — isValidJSON is a Function -ok 541 — {"name":"Adam","age":20} is a valid JSON -ok 542 — {"name":"Adam",age:"20"} is not a valid JSON -ok 543 — null is a valid JSON - -# PASS test/groupBy/groupBy.test.js - -ok 544 — groupBy is a Function -ok 545 — Groups the elements of an array based on the given function -ok 546 — Groups the elements of an array based on the given function - -# PASS test/uncurry/uncurry.test.js - -ok 547 — uncurry is a Function -ok 548 — Works without a provided value for n -ok 549 — Works with n = 2 -ok 550 — Works with n = 3 - -# PASS test/reject/reject.test.js - -ok 551 — reject is a Function -ok 552 — Works with numbers -ok 553 — Works with strings - -# PASS test/functionName/functionName.test.js - -ok 554 — functionName is a Function -ok 555 — Works for native functions -ok 556 — Works for functions -ok 557 — Works for arrow functions - -# PASS test/lowercaseKeys/lowercaseKeys.test.js - -ok 558 — lowercaseKeys is a Function -ok 559 — Lowercases object keys -ok 560 — Does not mutate original object - -# PASS test/collatz/collatz.test.js - -ok 561 — collatz is a Function -ok 562 — When n is even, divide by 2 -ok 563 — When n is odd, times by 3 and add 1 -ok 564 — Eventually reaches 1 - -# PASS test/matchesWith/matchesWith.test.js - -ok 565 — matchesWith is a Function -ok 566 — Returns true for two objects with similar values, based on the provided function - -# PASS test/UUIDGeneratorNode/UUIDGeneratorNode.test.js - -ok 567 — UUIDGeneratorNode is a Function -ok 568 — Contains dashes in the proper places -ok 569 — Only contains hexadecimal digits - -# PASS test/intersectionWith/intersectionWith.test.js - -ok 570 — intersectionWith is a Function -ok 571 — Returns a list of elements that exist in both arrays, using a provided comparator function - -# PASS test/luhnCheck/luhnCheck.test.js - -ok 572 — luhnCheck is a Function -ok 573 — validates identification number -ok 574 — validates identification number -ok 575 — validates identification number - -# PASS test/drop/drop.test.js - -ok 576 — drop is a Function -ok 577 — Works without the last argument -ok 578 — Removes appropriate element count as specified -ok 579 — Empties array given a count greater than length - -# PASS test/differenceBy/differenceBy.test.js - -ok 580 — differenceBy is a Function -ok 581 — Works using a native function and numbers -ok 582 — Works with arrow function and objects - -# PASS test/memoize/memoize.test.js - -ok 583 — memoize is a Function -ok 584 — Function works properly -ok 585 — Function works properly -ok 586 — Cache stores values - -# PASS test/functions/functions.test.js - -ok 587 — functions is a Function -ok 588 — Returns own methods -ok 589 — Returns own and inherited methods - -# PASS test/pipeAsyncFunctions/pipeAsyncFunctions.test.js - -ok 590 — pipeAsyncFunctions is a Function -ok 591 — pipeAsyncFunctions result should be 15 - -# PASS test/renameKeys/renameKeys.test.js - -ok 592 — renameKeys is a Function -ok 593 — renameKeys is a Function - -# PASS test/symmetricDifference/symmetricDifference.test.js - -ok 594 — symmetricDifference is a Function -ok 595 — Returns the symmetric difference between two arrays. -ok 596 — Returns duplicates from one array - -# PASS test/nthArg/nthArg.test.js - -ok 597 — nthArg is a Function -ok 598 — Returns the nth argument -ok 599 — Returns undefined if arguments too few -ok 600 — Works for negative values - -# PASS test/isPromiseLike/isPromiseLike.test.js - -ok 601 — isPromiseLike is a Function -ok 602 — Returns true for a promise-like object -ok 603 — Returns false for an empty object - -# PASS test/findLastKey/findLastKey.test.js - -ok 604 — findLastKey is a Function -ok 605 — eturns the appropriate key - -# PASS test/elo/elo.test.js - -ok 606 — elo is a Function -ok 607 — Standard 1v1s -ok 608 — Standard 1v1s -ok 609 — 4 player FFA, all same rank - -# PASS test/isArrayLike/isArrayLike.test.js - -ok 610 — isArrayLike is a Function -ok 611 — Returns true for a string -ok 612 — Returns true for an array -ok 613 — Returns false for null - -# PASS test/sample/sample.test.js - -ok 614 — sample is a Function -ok 615 — Returns a random element from the array -ok 616 — Works for single-element arrays -ok 617 — Returns undefined for empty array - -# PASS test/isLowerCase/isLowerCase.test.js - -ok 618 — isLowerCase is a Function -ok 619 — passed string is a lowercase -ok 620 — passed string is a lowercase -ok 621 — passed value is not a lowercase - -# PASS test/symmetricDifferenceBy/symmetricDifferenceBy.test.js - -ok 622 — symmetricDifferenceBy is a Function -ok 623 — Returns the symmetric difference between two arrays, after applying the provided function to each array element of both - -# PASS test/bindKey/bindKey.test.js - -ok 624 — bindKey is a Function -ok 625 — Binds function to an object context - -# PASS test/flattenObject/flattenObject.test.js - -ok 626 — flattenObject is a Function -ok 627 — Flattens an object with the paths for keys -ok 628 — Works with arrays - -# PASS test/averageBy/averageBy.test.js - -ok 629 — averageBy is a Function -ok 630 — Produces the right result with a function -ok 631 — Produces the right result with a property name - -# PASS test/arrayToCSV/arrayToCSV.test.js - -ok 632 — arrayToCSV is a Function -ok 633 — arrayToCSV works with default delimiter -ok 634 — arrayToCSV works with custom delimiter - -# PASS test/unzipWith/unzipWith.test.js - -ok 635 — unzipWith is a Function -ok 636 — unzipWith([[1, 10, 100], [2, 20, 200]], (...args) => args.reduce((acc, v) => acc + v, 0)) equals [3, 30, 300] - -# PASS test/findKey/findKey.test.js - -ok 637 — findKey is a Function -ok 638 — Returns the appropriate key - -# PASS test/pullAtValue/pullAtValue.test.js - -ok 639 — pullAtValue is a Function -ok 640 — Pulls the specified values -ok 641 — Pulls the specified values - -# PASS test/merge/merge.test.js - -ok 642 — merge is a Function -ok 643 — Merges two objects - -# PASS test/pullAtIndex/pullAtIndex.test.js - -ok 644 — pullAtIndex is a Function -ok 645 — Pulls the given values -ok 646 — Pulls the given values - -# PASS test/truthCheckCollection/truthCheckCollection.test.js - -ok 647 — truthCheckCollection is a Function -ok 648 — second argument is truthy on all elements of a collection - -# PASS test/promisify/promisify.test.js - -ok 649 — promisify is a Function -ok 650 — Returns a promise -ok 651 — Runs the function provided - -# PASS test/takeRight/takeRight.test.js - -ok 652 — takeRight is a Function -ok 653 — Returns an array with n elements removed from the end -ok 654 — Returns an array with n elements removed from the end - -# PASS test/runPromisesInSeries/runPromisesInSeries.test.js - -ok 655 — runPromisesInSeries is a Function -ok 656 — Runs promises in series - -# PASS test/isUpperCase/isUpperCase.test.js - -ok 657 — isUpperCase is a Function -ok 658 — ABC is all upper case -ok 659 — abc is not all upper case -ok 660 — A3@$ is all uppercase - -# PASS test/minBy/minBy.test.js - -ok 661 — minBy is a Function -ok 662 — Produces the right result with a function -ok 663 — Produces the right result with a property name - -# PASS test/reduceSuccessive/reduceSuccessive.test.js - -ok 664 — reduceSuccessive is a Function -ok 665 — Returns the array of successively reduced values - -# PASS test/getURLParameters/getURLParameters.test.js - -ok 666 — getURLParameters is a Function -ok 667 — Returns an object containing the parameters of the current URL - -# PASS test/transform/transform.test.js - -ok 668 — transform is a Function -ok 669 — Transforms an object - -# PASS test/maxBy/maxBy.test.js - -ok 670 — maxBy is a Function -ok 671 — Produces the right result with a function -ok 672 — Produces the right result with a property name - -# PASS test/gcd/gcd.test.js - -ok 673 — gcd is a Function -ok 674 — Calculates the greatest common divisor between two or more numbers/arrays -ok 675 — Calculates the greatest common divisor between two or more numbers/arrays - -# PASS test/extendHex/extendHex.test.js - -ok 676 — extendHex is a Function -ok 677 — Extends a 3-digit color code to a 6-digit color code -ok 678 — Extends a 3-digit color code to a 6-digit color code - -# PASS test/pipeFunctions/pipeFunctions.test.js - -ok 679 — pipeFunctions is a Function -ok 680 — Performs left-to-right function composition - -# PASS test/isTravisCI/isTravisCI.test.js - -ok 681 — isTravisCI is a Function -ok 682 — Running on Travis, correctly evaluates - -# PASS test/take/take.test.js - -ok 683 — take is a Function -ok 684 — Returns an array with n elements removed from the beginning. -ok 685 — Returns an array with n elements removed from the beginning. - -# PASS test/coalesceFactory/coalesceFactory.test.js - -ok 686 — coalesceFactory is a Function -ok 687 — Returns a customized coalesce function - -# PASS test/bind/bind.test.js - -ok 688 — bind is a Function -ok 689 — Binds to an object context - -# PASS test/isNil/isNil.test.js - -ok 690 — isNil is a Function -ok 691 — Returns true for null -ok 692 — Returns true for undefined -ok 693 — Returns false for an empty string - -# PASS test/intersectionBy/intersectionBy.test.js - -ok 694 — intersectionBy is a Function -ok 695 — Returns a list of elements that exist in both arrays, after applying the provided function to each array element of both - -# PASS test/isPlainObject/isPlainObject.test.js - -ok 696 — isPlainObject is a Function -ok 697 — Returns true for a plain object -ok 698 — Returns false for a Map (example of non-plain object) - -# PASS test/spreadOver/spreadOver.test.js - -ok 699 — spreadOver is a Function -ok 700 — Takes a variadic function and returns a closure that accepts an array of arguments to map to the inputs of the function. - -# PASS test/nthElement/nthElement.test.js - -ok 701 — nthElement is a Function -ok 702 — Returns the nth element of an array. -ok 703 — Returns the nth element of an array. - -# PASS test/shallowClone/shallowClone.test.js - -ok 704 — shallowClone is a Function -ok 705 — Shallow cloning works -ok 706 — Does not clone deeply - -# PASS test/overArgs/overArgs.test.js - -ok 707 — overArgs is a Function -ok 708 — Invokes the provided function with its arguments transformed - -# PASS test/indexOfAll/indexOfAll.test.js - -ok 709 — indexOfAll is a Function -ok 710 — Returns all indices of val in an array -ok 711 — Returns all indices of val in an array - -# PASS test/decapitalize/decapitalize.test.js - -ok 712 — decapitalize is a Function -ok 713 — Works with default parameter -ok 714 — Works with second parameter set to true - -# PASS test/hashNode/hashNode.test.js - -ok 715 — hashNode is a Function -ok 716 — Produces the appropriate hash - -# PASS test/chainAsync/chainAsync.test.js - -ok 717 — chainAsync is a Function -ok 718 — Calls all functions in an array - -# PASS test/cleanObj/cleanObj.test.js - -ok 719 — cleanObj is a Function -ok 720 — Removes any properties except the ones specified from a JSON object - -# PASS test/countBy/countBy.test.js - -ok 721 — countBy is a Function -ok 722 — Works for functions -ok 723 — Works for property names - -# PASS test/partialRight/partialRight.test.js - -ok 724 — partialRight is a Function -ok 725 — Appends arguments - -# PASS test/getDaysDiffBetweenDates/getDaysDiffBetweenDates.test.js - -ok 726 — getDaysDiffBetweenDates is a Function -ok 727 — Returns the difference in days between two dates - -# PASS test/minN/minN.test.js - -ok 728 — minN is a Function -ok 729 — Returns the n minimum elements from the provided array -ok 730 — Returns the n minimum elements from the provided array - -# PASS test/splitLines/splitLines.test.js - -ok 731 — splitLines is a Function -ok 732 — Splits a multiline string into an array of lines. - -# PASS test/composeRight/composeRight.test.js - -ok 733 — composeRight is a Function -ok 734 — Performs left-to-right function composition - -# PASS test/when/when.test.js - -ok 735 — when is a Function -ok 736 — Returns the proper result -ok 737 — Returns the proper result - -# PASS test/maxN/maxN.test.js - -ok 738 — maxN is a Function -ok 739 — Returns the n maximum elements from the provided array -ok 740 — Returns the n maximum elements from the provided array - -# PASS test/permutations/permutations.test.js - -ok 741 — permutations is a Function -ok 742 — Generates all permutations of an array - -# PASS test/initializeArrayWithValues/initializeArrayWithValues.test.js - -ok 743 — initializeArrayWithValues is a Function -ok 744 — Initializes and fills an array with the specified values - -# PASS test/compose/compose.test.js - -ok 745 — compose is a Function -ok 746 — Performs right-to-left function composition - -# PASS test/sortedLastIndexBy/sortedLastIndexBy.test.js - -ok 747 — sortedLastIndexBy is a Function -ok 748 — Returns the highest index to insert the element without messing up the list order - -# PASS test/mapValues/mapValues.test.js - -ok 749 — mapValues is a Function -ok 750 — Maps values - -# PASS test/percentile/percentile.test.js - -ok 751 — percentile is a Function -ok 752 — Uses the percentile formula to calculate how many numbers in the given array are less or equal to the given value. - -# PASS test/flatten/flatten.test.js - -ok 753 — flatten is a Function -ok 754 — Flattens an array -ok 755 — Flattens an array - -# PASS test/unionWith/unionWith.test.js - -ok 756 — unionWith is a Function -ok 757 — Produces the appropriate results - -# PASS test/partial/partial.test.js - -ok 758 — partial is a Function -ok 759 — Prepends arguments - -# PASS test/differenceWith/differenceWith.test.js - -ok 760 — differenceWith is a Function -ok 761 — Filters out all values from an array - -# PASS test/palindrome/palindrome.test.js - -ok 762 — palindrome is a Function -ok 763 — Given string is a palindrome -ok 764 — Given string is not a palindrome - -# PASS test/bifurcateBy/bifurcateBy.test.js - -ok 765 — bifurcateBy is a Function -ok 766 — Splits the collection into two groups - -# PASS test/bindAll/bindAll.test.js - -ok 767 — bindAll is a Function -ok 768 — Binds to an object context - -# PASS test/dropRightWhile/dropRightWhile.test.js - -ok 769 — dropRightWhile is a Function -ok 770 — Removes elements from the end of an array until the passed function returns true. - -# PASS test/lcm/lcm.test.js - -ok 771 — lcm is a Function -ok 772 — Returns the least common multiple of two or more numbers. -ok 773 — Returns the least common multiple of two or more numbers. - -# PASS test/median/median.test.js - -ok 774 — median is a Function -ok 775 — Returns the median of an array of numbers -ok 776 — Returns the median of an array of numbers - -# PASS test/degreesToRads/degreesToRads.test.js - -ok 777 — degreesToRads is a Function -ok 778 — Returns the appropriate value - -# PASS test/attempt/attempt.test.js - -ok 779 — attempt is a Function -ok 780 — Returns a value -ok 781 — Returns an error - -# PASS test/sortedIndexBy/sortedIndexBy.test.js - -ok 782 — sortedIndexBy is a Function -ok 783 — Returns the lowest index to insert the element without messing up the list order - -# PASS test/forOwnRight/forOwnRight.test.js - -ok 784 — forOwnRight is a Function -ok 785 — Iterates over an element's key-value pairs in reverse - -# PASS test/bifurcate/bifurcate.test.js - -ok 786 — bifurcate is a Function -ok 787 — Splits the collection into two groups - -# PASS test/size/size.test.js - -ok 788 — size is a Function -ok 789 — Get size of arrays, objects or strings. -ok 790 — Get size of arrays, objects or strings. - -# PASS test/compact/compact.test.js - -ok 791 — compact is a Function -ok 792 — Removes falsey values from an array - -# PASS test/sortedLastIndex/sortedLastIndex.test.js - -ok 793 — sortedLastIndex is a Function -ok 794 — Returns the highest index to insert the element without messing up the list order - -# PASS test/rearg/rearg.test.js - -ok 795 — rearg is a Function -ok 796 — Reorders arguments in invoked function - -# PASS test/unescapeHTML/unescapeHTML.test.js - -ok 797 — unescapeHTML is a Function -ok 798 — Unescapes escaped HTML characters. - -# PASS test/flip/flip.test.js - -ok 799 — flip is a Function -ok 800 — Flips argument order - -# PASS test/isFunction/isFunction.test.js - -ok 801 — isFunction is a Function -ok 802 — passed value is a function -ok 803 — passed value is not a function - -# PASS test/pickBy/pickBy.test.js - -ok 804 — pickBy is a Function -ok 805 — Creates an object composed of the properties the given function returns truthy for. - -# PASS test/omitBy/omitBy.test.js - -ok 806 — omitBy is a Function -ok 807 — Creates an object composed of the properties the given function returns falsey for - -# PASS test/isBoolean/isBoolean.test.js - -ok 808 — isBoolean is a Function -ok 809 — passed value is not a boolean -ok 810 — passed value is not a boolean - -# PASS test/initialize2DArray/initialize2DArray.test.js - -ok 811 — initialize2DArray is a Function -ok 812 — Initializes a 2D array of given width and height and value - -# PASS test/unflattenObject/unflattenObject.test.js - -ok 813 — unflattenObject is a Function -ok 814 — Unflattens an object with the paths for keys - -# PASS test/sortCharactersInString/sortCharactersInString.test.js - -ok 815 — sortCharactersInString is a Function -ok 816 — Alphabetically sorts the characters in a string. - -# PASS test/get/get.test.js - -ok 817 — get is a Function -ok 818 — Retrieve a property indicated by the selector from an object. - -# PASS test/escapeHTML/escapeHTML.test.js - -ok 819 — escapeHTML is a Function -ok 820 — Escapes a string for use in HTML - -# PASS test/pullBy/pullBy.test.js - -ok 821 — pullBy is a Function -ok 822 — Pulls the specified values - -# PASS test/objectFromPairs/objectFromPairs.test.js - -ok 823 — objectFromPairs is a Function -ok 824 — Creates an object from the given key-value pairs. - -# PASS test/objectToPairs/objectToPairs.test.js - -ok 825 — objectToPairs is a Function -ok 826 — Creates an array of key-value pair arrays from an object. - -# PASS test/findLastIndex/findLastIndex.test.js - -ok 827 — findLastIndex is a Function -ok 828 — Finds last index for which the given function returns true - -# PASS test/stableSort/stableSort.test.js - -ok 829 — stableSort is a Function -ok 830 — Array is properly sorted - -# PASS test/isNumber/isNumber.test.js - -ok 831 — isNumber is a Function -ok 832 — passed argument is a number -ok 833 — passed argument is not a number - -# PASS test/unfold/unfold.test.js - -ok 834 — unfold is a Function -ok 835 — Works with a given function, producing an array - -# PASS test/isArray/isArray.test.js - -ok 836 — isArray is a Function -ok 837 — passed value is an array -ok 838 — passed value is not an array - -# PASS test/forEachRight/forEachRight.test.js - -ok 839 — forEachRight is a Function -ok 840 — Iterates over the array in reverse - -# PASS test/takeRightWhile/takeRightWhile.test.js - -ok 841 — takeRightWhile is a Function -ok 842 — Removes elements until the function returns true - -# PASS test/xProd/xProd.test.js - -ok 843 — xProd is a Function -ok 844 — xProd([1, 2], ['a', 'b']) returns [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] - -# PASS test/isNull/isNull.test.js - -ok 845 — isNull is a Function -ok 846 — passed argument is a null -ok 847 — passed argument is a null - -# PASS test/stripHTMLTags/stripHTMLTags.test.js - -ok 848 — stripHTMLTags is a Function -ok 849 — Removes HTML tags - -# PASS test/pick/pick.test.js - -ok 850 — pick is a Function -ok 851 — Picks the key-value pairs corresponding to the given keys from an object. - -# PASS test/toDecimalMark/toDecimalMark.test.js - -ok 852 — toDecimalMark is a Function -ok 853 — convert a float-point arithmetic to the Decimal mark form - -# PASS test/remove/remove.test.js - -ok 854 — remove is a Function -ok 855 — Removes elements from an array for which the given function returns false - -# PASS test/filterNonUnique/filterNonUnique.test.js - -ok 856 — filterNonUnique is a Function -ok 857 — Filters out the non-unique values in an array - -# PASS test/curry/curry.test.js - -ok 858 — curry is a Function -ok 859 — curries a Math.pow -ok 860 — curries a Math.min - -# PASS test/ary/ary.test.js - -ok 861 — ary is a Function -ok 862 — Discards arguments with index >=n - -# PASS test/truncateString/truncateString.test.js - -ok 863 — truncateString is a Function -ok 864 — Truncates a "boomerang" up to a specified length. - -# PASS test/similarity/similarity.test.js - -ok 865 — similarity is a Function -ok 866 — Returns an array of elements that appear in both arrays. - -# PASS test/omit/omit.test.js - -ok 867 — omit is a Function -ok 868 — Omits the key-value pairs corresponding to the given keys from an object - -# PASS test/delay/delay.test.js - -ok 869 — delay is a Function -ok 870 — Works as expecting, passing arguments properly - -# PASS test/defaults/defaults.test.js - -ok 871 — defaults is a Function -ok 872 — Assigns default values for undefined properties - -# PASS test/removeNonASCII/removeNonASCII.test.js - -ok 873 — removeNonASCII is a Function -ok 874 — Removes non-ASCII characters - -# PASS test/forOwn/forOwn.test.js - -ok 875 — forOwn is a Function -ok 876 — Iterates over an element's key-value pairs - -# PASS test/countOccurrences/countOccurrences.test.js - -ok 877 — countOccurrences is a Function -ok 878 — Counts the occurrences of a value in an array - -# PASS test/dropWhile/dropWhile.test.js - -ok 879 — dropWhile is a Function -ok 880 — Removes elements in an array until the passed function returns true. - -# PASS test/intersection/intersection.test.js - -ok 881 — intersection is a Function -ok 882 — Returns a list of elements that exist in both arrays - -# PASS test/over/over.test.js - -ok 883 — over is a Function -ok 884 — Applies given functions over multiple arguments - -# PASS test/pull/pull.test.js - -ok 885 — pull is a Function -ok 886 — Pulls the specified values - -# PASS test/findLast/findLast.test.js - -ok 887 — findLast is a Function -ok 888 — Finds last element for which the given function returns true - -# PASS test/takeWhile/takeWhile.test.js - -ok 889 — takeWhile is a Function -ok 890 — Removes elements until the function returns true - -# PASS test/isEven/isEven.test.js - -ok 891 — isEven is a Function -ok 892 — 4 is even number -ok 893 — 5 is not an even number - -# PASS test/escapeRegExp/escapeRegExp.test.js - -ok 894 — escapeRegExp is a Function -ok 895 — Escapes a string to use in a regular expression - -# PASS test/clampNumber/clampNumber.test.js - -ok 896 — clampNumber is a Function -ok 897 — Clamps num within the inclusive range specified by the boundary values a and b - -# PASS test/coalesce/coalesce.test.js - -ok 898 — coalesce is a Function -ok 899 — Returns the first non-null/undefined argument - -# PASS test/cloneRegExp/cloneRegExp.test.js - -ok 900 — cloneRegExp is a Function -ok 901 — Clones regular expressions properly - -# PASS test/parseCookie/parseCookie.test.js - -ok 902 — parseCookie is a Function -ok 903 — Parses the cookie - -# PASS test/atob/atob.test.js - -ok 904 — atob is a Function -ok 905 — atob("Zm9vYmFy") equals "foobar" -ok 906 — atob("Z") returns "" - -# PASS test/distance/distance.test.js - -ok 907 — distance is a Function -ok 908 — Calculates the distance between two points - -# PASS test/fibonacci/fibonacci.test.js - -ok 909 — fibonacci is a Function -ok 910 — Generates an array, containing the Fibonacci sequence - -# PASS test/tail/tail.test.js - -ok 911 — tail is a Function -ok 912 — Returns tail -ok 913 — Returns tail - -# PASS test/hammingDistance/hammingDistance.test.js - -ok 914 — hammingDistance is a Function -ok 915 — retuns hamming disance between 2 values - -# PASS test/negate/negate.test.js - -ok 916 — negate is a Function -ok 917 — Negates a predicate function - -# PASS test/times/times.test.js - -ok 918 — times is a Function -ok 919 — Runs a function the specified amount of times - -# PASS test/primes/primes.test.js - -ok 920 — primes is a Function -ok 921 — Generates primes up to a given number, using the Sieve of Eratosthenes. - -# PASS test/powerset/powerset.test.js - -ok 922 — powerset is a Function -ok 923 — Returns the powerset of a given array of numbers. - -# PASS test/serializeCookie/serializeCookie.test.js - -ok 924 — serializeCookie is a Function -ok 925 — Serializes the cookie - -# PASS test/difference/difference.test.js - -ok 926 — difference is a Function -ok 927 — Returns the difference between two arrays - -# PASS test/RGBToHex/RGBToHex.test.js - -ok 928 — RGBToHex is a Function -ok 929 — Converts the values of RGB components to a color code. - -# PASS test/initial/initial.test.js - -ok 930 — initial is a Function -ok 931 — Returns all the elements of an array except the last one - -# PASS test/unary/unary.test.js - -ok 932 — unary is a Function -ok 933 — Discards arguments after the first one - -# PASS test/reverseString/reverseString.test.js - -ok 934 — reverseString is a Function -ok 935 — Reverses a string. - -# PASS test/radsToDegrees/radsToDegrees.test.js - -ok 936 — radsToDegrees is a Function -ok 937 — Returns the appropriate value - -# PASS test/unionBy/unionBy.test.js - -ok 938 — unionBy is a Function -ok 939 — Produces the appropriate results - -# PASS test/everyNth/everyNth.test.js - -ok 940 — everyNth is a Function -ok 941 — Returns every nth element in an array - -# PASS test/deepFlatten/deepFlatten.test.js - -ok 942 — deepFlatten is a Function -ok 943 — Deep flattens an array - -# PASS test/sleep/sleep.test.js - -ok 944 — sleep is a Function -ok 945 — Works as expected - -# PASS test/isUndefined/isUndefined.test.js - -ok 946 — isUndefined is a Function -ok 947 — Returns true for undefined - -# PASS test/isSymbol/isSymbol.test.js - -ok 948 — isSymbol is a Function -ok 949 — Checks if the given argument is a symbol - -# PASS test/isDivisible/isDivisible.test.js - -ok 950 — isDivisible is a Function -ok 951 — The number 6 is divisible by 3 - -# PASS test/digitize/digitize.test.js - -ok 952 — digitize is a Function -ok 953 — Converts a number to an array of digits - -# PASS test/call/call.test.js - -ok 954 — call is a Function -ok 955 — Calls function on given object - -# PASS test/mapKeys/mapKeys.test.js - -ok 956 — mapKeys is a Function -ok 957 — Maps keys - -# PASS test/debounce/debounce.test.js - -ok 958 — debounce is a Function -ok 959 — Works as expected - -# PASS test/getType/getType.test.js - -ok 960 — getType is a Function -ok 961 — Returns the native type of a value - -# PASS test/sdbm/sdbm.test.js - -ok 962 — sdbm is a Function -ok 963 — Hashes the input string into a whole number. - -# PASS test/btoa/btoa.test.js - -ok 964 — btoa is a Function -ok 965 — btoa("foobar") equals "Zm9vYmFy" - -# PASS test/sum/sum.test.js - -ok 966 — sum is a Function -ok 967 — Returns the sum of two or more numbers/arrays. - -# PASS test/isPrime/isPrime.test.js - -ok 968 — isPrime is a Function -ok 969 — passed number is a prime - -# PASS test/initializeArrayWithRangeRight/initializeArrayWithRangeRight.test.js - -ok 970 — initializeArrayWithRangeRight is a Function - -# PASS test/getMeridiemSuffixOfInteger/getMeridiemSuffixOfInteger.test.js - -ok 971 — getMeridiemSuffixOfInteger is a Function - -# PASS test/elementIsVisibleInViewport/elementIsVisibleInViewport.test.js - -ok 972 — elementIsVisibleInViewport is a Function - -# PASS test/isArmstrongNumber/isArmstrongNumber.test.js - -ok 973 — isArmstrongNumber is a Function - -# PASS test/initializeNDArray/initializeNDArray.test.js - -ok 974 — initializeNDArray is a Function - -# PASS test/copyToClipboard/copyToClipboard.test.js - -ok 975 — copyToClipboard is a Function - -# PASS test/UUIDGeneratorBrowser/UUIDGeneratorBrowser.test.js - -ok 976 — UUIDGeneratorBrowser is a Function - -# PASS test/arrayToHtmlList/arrayToHtmlList.test.js - -ok 977 — arrayToHtmlList is a Function - -# PASS test/speechSynthesis/speechSynthesis.test.js - -ok 978 — speechSynthesis is a Function - -# PASS test/isBrowserTabFocused/isBrowserTabFocused.test.js - -ok 979 — isBrowserTabFocused is a Function - -# PASS test/getColonTimeFromDate/getColonTimeFromDate.test.js - -ok 980 — getColonTimeFromDate is a Function - -# PASS test/mostPerformant/mostPerformant.test.js - -ok 981 — mostPerformant is a Function - -# PASS test/fibonacciCountUntilNum/fibonacciCountUntilNum.test.js - -ok 982 — fibonacciCountUntilNum is a Function - -# PASS test/bottomVisible/bottomVisible.test.js - -ok 983 — bottomVisible is a Function - -# PASS test/recordAnimationFrames/recordAnimationFrames.test.js - -ok 984 — recordAnimationFrames is a Function - -# PASS test/createEventHub/createEventHub.test.js - -ok 985 — createEventHub is a Function - -# PASS test/isArrayBuffer/isArrayBuffer.test.js - -ok 986 — isArrayBuffer is a Function - -# PASS test/createElement/createElement.test.js - -ok 987 — createElement is a Function - -# PASS test/httpsRedirect/httpsRedirect.test.js - -ok 988 — httpsRedirect is a Function - -# PASS test/readFileLines/readFileLines.test.js - -ok 989 — readFileLines is a Function - -# PASS test/detectDeviceType/detectDeviceType.test.js - -ok 990 — detectDeviceType is a Function - -# PASS test/isTypedArray/isTypedArray.test.js - -ok 991 — isTypedArray is a Function - -# PASS test/getScrollPosition/getScrollPosition.test.js - -ok 992 — getScrollPosition is a Function - -# PASS test/nodeListToArray/nodeListToArray.test.js - -ok 993 — nodeListToArray is a Function - -# PASS test/fibonacciUntilNum/fibonacciUntilNum.test.js - -ok 994 — fibonacciUntilNum is a Function - -# PASS test/triggerEvent/triggerEvent.test.js - -ok 995 — triggerEvent is a Function - -# PASS test/observeMutations/observeMutations.test.js - -ok 996 — observeMutations is a Function - -# PASS test/onUserInputChange/onUserInputChange.test.js - -ok 997 — onUserInputChange is a Function - -# PASS test/levenshteinDistance/levenshteinDistance.test.js - -ok 998 — levenshteinDistance is a Function - -# PASS test/elementContains/elementContains.test.js - -ok 999 — elementContains is a Function - -# PASS test/smoothScroll/smoothScroll.test.js - -ok 1000 — smoothScroll is a Function - -# PASS test/insertBefore/insertBefore.test.js - -ok 1001 — insertBefore is a Function - -# PASS test/removeVowels/removeVowels.test.js - -ok 1002 — removeVowels is a Function - -# PASS test/howManyTimes/howManyTimes.test.js - -ok 1003 — howManyTimes is a Function - -# PASS test/insertAfter/insertAfter.test.js - -ok 1004 — insertAfter is a Function - -# PASS test/toggleClass/toggleClass.test.js - -ok 1005 — toggleClass is a Function - -# PASS test/scrollToTop/scrollToTop.test.js - -ok 1006 — scrollToTop is a Function - -# PASS test/httpDelete/httpDelete.test.js - -ok 1007 — httpDelete is a Function - -# PASS test/countVowels/countVowels.test.js - -ok 1008 — countVowels is a Function - -# PASS test/JSONToDate/JSONToDate.test.js - -ok 1009 — JSONToDate is a Function - -# PASS test/deepFreeze/deepFreeze.test.js - -ok 1010 — deepFreeze is a Function - -# PASS test/JSONToFile/JSONToFile.test.js - -ok 1011 — JSONToFile is a Function - -# PASS test/currentURL/currentURL.test.js - -ok 1012 — currentURL is a Function - -# PASS test/isWeakSet/isWeakSet.test.js - -ok 1013 — isWeakSet is a Function - -# PASS test/isSimilar/isSimilar.test.js - -ok 1014 — isSimilar is a Function - -# PASS test/timeTaken/timeTaken.test.js - -ok 1015 — timeTaken is a Function - -# PASS test/isBrowser/isBrowser.test.js - -ok 1016 — isBrowser is a Function - -# PASS test/getStyle/getStyle.test.js - -ok 1017 — getStyle is a Function - -# PASS test/redirect/redirect.test.js - -ok 1018 — redirect is a Function - -# PASS test/hashBrowser/hashBrowser.test.js - -ok 1019 — hashBrowser is a Function - -# PASS test/hasFlags/hasFlags.test.js - -ok 1020 — hasFlags is a Function - -# PASS test/setStyle/setStyle.test.js - -ok 1021 — setStyle is a Function - -# PASS test/isRegExp/isRegExp.test.js - -ok 1022 — isRegExp is a Function - -# PASS test/isWeakMap/isWeakMap.test.js - -ok 1023 — isWeakMap is a Function - -# PASS test/colorize/colorize.test.js - -ok 1024 — colorize is a Function - -# PASS test/throttle/throttle.test.js - -ok 1025 — throttle is a Function - -# PASS test/httpPut/httpPut.test.js - -ok 1026 — httpPut is a Function - -# PASS test/hasClass/hasClass.test.js - -ok 1027 — hasClass is a Function - -# PASS test/solveRPN/solveRPN.test.js - -ok 1028 — solveRPN is a Function - -# PASS test/httpPost/httpPost.test.js - -ok 1029 — httpPost is a Function - -# PASS test/counter/counter.test.js - -ok 1030 — counter is a Function - -# PASS test/runAsync/runAsync.test.js - -ok 1031 — runAsync is a Function - -# PASS test/zipWith/zipWith.test.js - -ok 1032 — zipWith is a Function - -# PASS test/factors/factors.test.js - -ok 1033 — factors is a Function - -# PASS test/defer/defer.test.js - -ok 1034 — defer is a Function - -# PASS test/httpGet/httpGet.test.js - -ok 1035 — httpGet is a Function - -# PASS test/off/off.test.js - -ok 1036 — off is a Function - -# PASS test/on/on.test.js - -ok 1037 — on is a Function - -# PASS test/hz/hz.test.js - -ok 1038 — hz is a Function - -# PASS test/toHash/toHash.test.js - -ok 1039 — toHash is a Function - -# PASS test/isSet/isSet.test.js - -ok 1040 — isSet is a Function - -# PASS test/sumBy/sumBy.test.js - -ok 1041 — sumBy is a Function - -# PASS test/show/show.test.js - -ok 1042 — show is a Function - -# PASS test/once/once.test.js - -ok 1043 — once is a Function - -# PASS test/prefix/prefix.test.js - -ok 1044 — prefix is a Function - -# PASS test/isMap/isMap.test.js - -ok 1045 — isMap is a Function - -# PASS test/hide/hide.test.js - -ok 1046 — hide is a Function - -# PASS test/nest/nest.test.js - -ok 1047 — nest is a Function - -1..1047 - -# Test Suites: 100% ██████████, 347 passed, 347 total -# Tests: 100% ██████████, 1047 passed, 1047 total -# Time: 48.693s - -# Ran all test suites. - +ok 122 — zipObject is a Function +ok 123 — zipObject([a, b, c], [1, 2]) returns {a: 1, b: 2, c: undefined} +ok 124 — zipObject([a, b], [1, 2, 3]) returns {a: 1, b: 2} +ok 125 — zipObject([a, b, c], string) returns { a: s, b: t, c: r } +ok 126 — zipObject([a], string) returns { a: s } +ok 127 — zipObject() throws an error +ok 128 — zipObject((['string'], null) throws an error +ok 129 — zipObject(null, [1]) throws an error +ok 130 — zipObject('string') throws an error +ok 131 — zipObject('test', 'string') throws an error + +# PASS test/quickSort/quickSort.test.js + +ok 132 — quickSort is a Function +ok 133 — quickSort([5, 6, 4, 3, 1, 2]) returns [1, 2, 3, 4, 5, 6] +ok 134 — quickSort([-1, 0, -2]) returns [-2, -1, 0] +ok 135 — quickSort() throws an error +ok 136 — quickSort(123) throws an error +ok 137 — quickSort({ 234: string}) throws an error +ok 138 — quickSort(null) throws an error +ok 139 — quickSort(undefined) throws an error +ok 140 — quickSort([11, 1, 324, 23232, -1, 53, 2, 524, 32, 13, 156, 133, 62, 12, 4]) takes less than 2s to run + +# PASS test/round/round.test.js + +ok 141 — round is a Function +ok 142 — round(1.005, 2) returns 1.01 +ok 143 — round(123.3423345345345345344, 11) returns 123.34233453453 +ok 144 — round(3.342, 11) returns 3.342 +ok 145 — round(1.005) returns 1 +ok 146 — round([1.005, 2]) returns NaN +ok 147 — round(string) returns NaN +ok 148 — round() returns NaN +ok 149 — round(132, 413, 4134) returns NaN +ok 150 — round({a: 132}, 413) returns NaN +ok 151 — round(123.3423345345345345344, 11) takes less than 2s to run + +# PASS test/yesNo/yesNo.test.js + +ok 152 — yesNo is a Function +ok 153 — yesNo(Y) returns true +ok 154 — yesNo(yes) returns true +ok 155 — yesNo(foo, true) returns true +ok 156 — yesNo(No) returns false +ok 157 — yesNo() returns false +ok 158 — yesNo(null) returns false +ok 159 — yesNo(undefined) returns false +ok 160 — yesNo([123, null]) returns false +ok 161 — yesNo([Yes, No]) returns false +ok 162 — yesNo({ 2: Yes }) returns false +ok 163 — yesNo([Yes, No], true) returns true +ok 164 — yesNo({ 2: Yes }, true) returns true + +# PASS test/isSorted/isSorted.test.js + +ok 165 — isSorted is a Function +ok 166 — Array is sorted in ascending order +ok 167 — Array is sorted in ascending order +ok 168 — Array is sorted in ascending order +ok 169 — Array is sorted in ascending order +ok 170 — Array is sorted in descending order +ok 171 — Array is sorted in descending order +ok 172 — Array is sorted in descending order +ok 173 — Array is sorted in descending order +ok 174 — Array is empty +ok 175 — Array is not sorted, direction changed in array +ok 176 — Array is not sorted, direction changed in array + +# PASS test/words/words.test.js + +ok 177 — words is a Function +ok 178 — words('I love javaScript!!') returns [I, love, javaScript] +ok 179 — words('python, javaScript & coffee') returns [python, javaScript, coffee] +ok 180 — words(I love javaScript!!) returns an array +ok 181 — words() throws an error +ok 182 — words(null) throws an error +ok 183 — words(undefined) throws an error +ok 184 — words({}) throws an error +ok 185 — words([]) throws an error +ok 186 — words(1234) throws an error + +# PASS test/longestItem/longestItem.test.js + +ok 187 — longestItem is a Function +ok 188 — Returns the longest object from plain values +ok 189 — Returns the longest object from a spread array +ok 190 — Returns the longest object from mixed input +ok 191 — Returns the longest array +ok 192 — Returns the longest object when comparing arrays and strings +ok 193 — Returns undefined without any input +ok 194 — Returns first found of all similar +ok 195 — Throws TypeError if all inputs are undefined + +# PASS test/without/without.test.js + +ok 196 — without is a Function +ok 197 — without([2, 1, 2, 3], 1, 2) returns [3] +ok 198 — without([]) returns [] +ok 199 — without([3, 1, true, '3', true], '3', true) returns [3, 1] +ok 200 — without('string'.split(''), 's', 't', 'g') returns ['r', 'i', 'n'] +ok 201 — without() throws an error +ok 202 — without(null) throws an error +ok 203 — without(undefined) throws an error +ok 204 — without(123) throws an error +ok 205 — without({}) throws an error + +# PASS test/chunk/chunk.test.js + +ok 206 — chunk is a Function +ok 207 — chunk([1, 2, 3, 4, 5], 2) returns [[1,2],[3,4],[5]] +ok 208 — chunk([]) returns [] +ok 209 — chunk(123) returns [] +ok 210 — chunk({ a: 123}) returns [] +ok 211 — chunk(string, 2) returns [ st, ri, ng ] +ok 212 — chunk() throws an error +ok 213 — chunk(undefined) throws an error +ok 214 — chunk(null) throws an error +ok 215 — chunk(This is a string, 2) takes less than 2s to run