diff --git a/docs/index.html b/docs/index.html index 2227567e6..467dbe272 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,28 +1,16 @@ -30 seconds of code

logo 30 seconds of code

Curated collection of useful JavaScript snippets
that you can understand in 30 seconds or less.

319
snippets

122
contributors

3510
commits

21310
stars

Our philosophy

The core goal of 30 seconds of code is to provide a quality resource for beginner and advanced JavaScript developers alike. We want to help improve the JavaScript ecosystem, by lowering the barrier of entry for newcomers and help seasoned veterans pick up new tricks and remember old ones. In order to achieve this, we have collected hundreds of snippets that can be of use in a wide range of situations. We welcome new contributors and we like fresh ideas, as long as the code is short and easy to grasp in about 30 seconds. The only catch, if you may, is that a few of our snippets are not perfectly optimized for large, enterprise applications and they might not be deemed production-ready.


In order for 30 seconds of code to be as accessible and useful as possible, all of the snippets in the collection are licensed under the CC0-1.0 License, meaning they are absolutely free to use in any project you like. If you like what we do, you can always credit us, but that is not mandatory.


Today's picks

Our sophisticated robot helpers pick new snippets from our collection daily, so that you can discover new snippets to enhance your projects:

arrayToHtmlList

Converts the given array elements into <li> tags and appends them to the list of the given id.

Use Array.map(), document.querySelector(), and an anonymous inner closure to create a list of html tags.

const arrayToHtmlList = (arr, listID) =>
-  (el => (
-    (el = document.querySelector('#' + listID)),
-    (el.innerHTML += arr.map(item => `<li>${item}</li>`).join(''))
-  ))();
-
arrayToHtmlList(['item 1', 'item 2'], 'myListID');
-

getType

Returns the native type of a value.

Returns lowercased constructor name of value, "undefined" or "null" if value is undefined or null.

const getType = v =>
-  v === undefined ? 'undefined' : v === null ? 'null' : v.constructor.name.toLowerCase();
-
getType(new Set([1, 2, 3])); // 'set'
-

join

Joins all elements of an array into a string and returns this string. Uses a separator and an end separator.

Use Array.reduce() to combine elements into a string. Omit the second argument, separator, to use a default separator of ','. Omit the third argument, end, to use the same value as separator by default.

const join = (arr, separator = ',', end = separator) =>
-  arr.reduce(
-    (acc, val, i) =>
-      i === arr.length - 2
-        ? acc + val + end
-        : i === arr.length - 1
-          ? acc + val
-          : acc + val + separator,
-    ''
-  );
-
join(['pen', 'pineapple', 'apple', 'pen'], ',', '&'); // "pen,pineapple,apple&pen"
-join(['pen', 'pineapple', 'apple', 'pen'], ','); // "pen,pineapple,apple,pen"
-join(['pen', 'pineapple', 'apple', 'pen']); // "pen,pineapple,apple,pen"
-

Getting started


Related projects

The idea behind 30 seconds of code has inspired some people to create similar collections in other programming languages and environments. Here are the ones we like the most:


How to contribute

Do you have a cool idea for a new snippet? Maybe some code you use often and is not part of our collection? Contributing to 30 seconds of code is as simple as 1,2,3,4!

1

Create

Start by creating a snippet, according to the snippet template. Make sure to follow these simple guidelines:

  • Your snippet title must be unique and the same as the name of the implemented function.
  • Use the snippet description to explain what your snippet does and how it works.
  • Try to keep the snippet's code short and to the point. Use modern techniques and features.
  • Remember to provide an example of how your snippet works.
  • Your snippet should solve a real-world problem, no matter how simple.
  • Never modify README.md or any of the HTML files.
2

Tag

Run npm run tagger from your terminal, then open the tag_database file and tag your snippet appropriately. Multitagging is also supported, just make sure the first tag you specify is on of the major tags and the one that is most relevant to the implemneted function.

3

Test

You can optionally test your snippet to make our job easier. Simply run npm run tester to generate the test files for your snippet. Find the related folder for you snippet under the test directory and write some tests. Remember to run npm run tester again to make sure your tests are passing.

4

Pull request

If you have done everything mentioned above, you should now have an awesome snippet to add to our collection. Simply start a pull request and follow the guidelines provided. Remember to only submit one snippet per pull request, so that we can quickly evaluate and merge your code into the collection.

If you need additional pointers about writing a snippet, be sure to read the complete contribution guidelines.


30 seconds of code

logo 30 seconds of code

Curated collection of useful JavaScript snippets
that you can understand in 30 seconds or less.

319
snippets

122
contributors

3518
commits

21322
stars

Our philosophy

The core goal of 30 seconds of code is to provide a quality resource for beginner and advanced JavaScript developers alike. We want to help improve the JavaScript ecosystem, by lowering the barrier of entry for newcomers and help seasoned veterans pick up new tricks and remember old ones. In order to achieve this, we have collected hundreds of snippets that can be of use in a wide range of situations. We welcome new contributors and we like fresh ideas, as long as the code is short and easy to grasp in about 30 seconds. The only catch, if you may, is that a few of our snippets are not perfectly optimized for large, enterprise applications and they might not be deemed production-ready.


In order for 30 seconds of code to be as accessible and useful as possible, all of the snippets in the collection are licensed under the CC0-1.0 License, meaning they are absolutely free to use in any project you like. If you like what we do, you can always credit us, but that is not mandatory.


Today's picks

Our sophisticated robot helpers pick new snippets from our collection daily, so that you can discover new snippets to enhance your projects:

flatten

Flattens an array up to the specified depth.

Use recursion, decrementing depth by 1 for each level of depth. Use Array.reduce() and Array.concat() to merge elements or arrays. Base case, for depth equal to 1 stops recursion. Omit the second argument, depth to flatten only to a depth of 1 (single flatten).

const flatten = (arr, depth = 1) =>
+  arr.reduce((a, v) => a.concat(depth > 1 && Array.isArray(v) ? flatten(v, depth - 1) : v), []);
+
flatten([1, [2], 3, 4]); // [1, 2, 3, 4]
+flatten([1, [2, [3, [4, 5], 6], 7], 8], 2); // [1, 2, 3, [4, 5], 6, 7, 8]
+

mask

Replaces all but the last num of characters with the specified mask character.

Use String.slice() to grab the portion of the characters that need to be masked and use String.replace() with a regexp to replace every character with the mask character. Concatenate the masked characters with the remaining unmasked portion of the string. Omit the second argument, num, to keep a default of 4 characters unmasked. If num is negative, the unmasked characters will be at the start of the string. Omit the third argument, mask, to use a default character of '*' for the mask.

const mask = (cc, num = 4, mask = '*') =>
+  ('' + cc).slice(0, -num).replace(/./g, mask) + ('' + cc).slice(-num);
+
mask(1234567890); // '******7890'
+mask(1234567890, 3); // '*******890'
+mask(1234567890, -4, '
+      
+

Getting started


Related projects

The idea behind 30 seconds of code has inspired some people to create similar collections in other programming languages and environments. Here are the ones we like the most:


How to contribute

Do you have a cool idea for a new snippet? Maybe some code you use often and is not part of our collection? Contributing to 30 seconds of code is as simple as 1,2,3,4!

1

Create

Start by creating a snippet, according to the snippet template. Make sure to follow these simple guidelines:

  • Your snippet title must be unique and the same as the name of the implemented function.
  • Use the snippet description to explain what your snippet does and how it works.
  • Try to keep the snippet's code short and to the point. Use modern techniques and features.
  • Remember to provide an example of how your snippet works.
  • Your snippet should solve a real-world problem, no matter how simple.
  • Never modify README.md or any of the HTML files.
2

Tag

Run npm run tagger from your terminal, then open the tag_database file and tag your snippet appropriately. Multitagging is also supported, just make sure the first tag you specify is on of the major tags and the one that is most relevant to the implemneted function.

3

Test

You can optionally test your snippet to make our job easier. Simply run npm run tester to generate the test files for your snippet. Find the related folder for you snippet under the test directory and write some tests. Remember to run npm run tester again to make sure your tests are passing.

4

Pull request

If you have done everything mentioned above, you should now have an awesome snippet to add to our collection. Simply start a pull request and follow the guidelines provided. Remember to only submit one snippet per pull request, so that we can quickly evaluate and merge your code into the collection.

If you need additional pointers about writing a snippet, be sure to read the complete contribution guidelines.


\ No newline at end of file +};
); // '$$567890'

parseCookie

Parse an HTTP Cookie header string and return an object of all cookie name-value pairs.

Use String.split(';') to separate key-value pairs from each other. Use Array.map() and String.split('=') to separate keys from values in each pair. Use Array.reduce() and decodeURIComponent() to create an object with all key-value pairs.

const parseCookie = str =>
+  str
+    .split(';')
+    .map(v => v.split('='))
+    .reduce((acc, v) => {
+      acc[decodeURIComponent(v[0].trim())] = decodeURIComponent(v[1].trim());
+      return acc;
+    }, {});
+
parseCookie('foo=bar; equation=E%3Dmc%5E2'); // { foo: 'bar', equation: 'E=mc^2' }
+

Getting started


Related projects

The idea behind 30 seconds of code has inspired some people to create similar collections in other programming languages and environments. Here are the ones we like the most:


How to contribute

Do you have a cool idea for a new snippet? Maybe some code you use often and is not part of our collection? Contributing to 30 seconds of code is as simple as 1,2,3,4!

1

Create

Start by creating a snippet, according to the snippet template. Make sure to follow these simple guidelines:

  • Your snippet title must be unique and the same as the name of the implemented function.
  • Use the snippet description to explain what your snippet does and how it works.
  • Try to keep the snippet's code short and to the point. Use modern techniques and features.
  • Remember to provide an example of how your snippet works.
  • Your snippet should solve a real-world problem, no matter how simple.
  • Never modify README.md or any of the HTML files.
2

Tag

Run npm run tagger from your terminal, then open the tag_database file and tag your snippet appropriately. Multitagging is also supported, just make sure the first tag you specify is on of the major tags and the one that is most relevant to the implemneted function.

3

Test

You can optionally test your snippet to make our job easier. Simply run npm run tester to generate the test files for your snippet. Find the related folder for you snippet under the test directory and write some tests. Remember to run npm run tester again to make sure your tests are passing.

4

Pull request

If you have done everything mentioned above, you should now have an awesome snippet to add to our collection. Simply start a pull request and follow the guidelines provided. Remember to only submit one snippet per pull request, so that we can quickly evaluate and merge your code into the collection.

If you need additional pointers about writing a snippet, be sure to read the complete contribution guidelines.


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