diff --git a/snippet_data/snippets.json b/snippet_data/snippets.json index 723c7a9c2..b268e3e13 100644 --- a/snippet_data/snippets.json +++ b/snippet_data/snippets.json @@ -18,7 +18,7 @@ }, "meta": { "archived": false, - "hash": "8a036b5ffee127e5456d59e36f3c9abb24f1692f6a398b61c20ebacaae8380e4" + "hash": "2cf407f0e2df6eb320de1906d8cb4f1d252ac189af3a390dda264e8637a44e7e" } }, { @@ -39,7 +39,7 @@ }, "meta": { "archived": false, - "hash": "2801b6d7350ed3dd502d1efbaf32f0f3e8671002843ac3930e7e38a7e085213d" + "hash": "690147b9d4d90d37d9f42ec6596decc3e99eb8104f51d27a392ee3b50041878e" } }, { @@ -60,7 +60,7 @@ }, "meta": { "archived": false, - "hash": "15bee4484e96a2d052368ef9dd743819b30d8d883b52575bee65fdc194dc9e93" + "hash": "b045bd03ea755493fcab7b7092b0fb01bf8ce24b56e5605ea2d0bb037b91f11e" } }, { @@ -102,7 +102,7 @@ }, "meta": { "archived": false, - "hash": "47f27df615f87cf59e53ae3a618249f8413dd9d9c8939296a8b8f3785697de3d" + "hash": "3508f9a15d8a0b0541d12373b8ea697773434fbfd946bb63fc4f0246e4f193ea" } }, { @@ -123,7 +123,7 @@ }, "meta": { "archived": false, - "hash": "71d7b2d9a38cff92cda899e1be04c7995f097781b48ef89e3f766e27d9272fa7" + "hash": "ca7374613a03d90327f8754747ec14e3234f5df975cb8744da6ead6d7d3d2a83" } }, { @@ -144,7 +144,7 @@ }, "meta": { "archived": false, - "hash": "41109ef32647c55ece0a9dba06c840250979124e790c944d732683d27ac26f1f" + "hash": "9c673d0dc5ea5d1b7c63506253c39e512127c377d349b2df1f847788e67bebf1" } }, { @@ -207,7 +207,7 @@ }, "meta": { "archived": false, - "hash": "992835ed744ef767f4cdf46f9881cca57a73695e2a8637a383490bf44369d31b" + "hash": "1275c6ed1d6ac5e1218831c45cdff88de135f803f45cdbb68dbbad0fbb55e967" } }, { @@ -229,7 +229,7 @@ }, "meta": { "archived": false, - "hash": "0ad10d648c24e0c27cfbb5cf65f18ad3fc7e072e6459c0bfc2d9936a0e497a03" + "hash": "58c2e46ed0bf8dfb7c3d36c280dff4a64ff056fc1a01b0972db8c81733d8c5dc" } }, { @@ -249,7 +249,7 @@ }, "meta": { "archived": false, - "hash": "dd427f7304a3c161c95f9b1ae11f0adbe0d687076a5ed16ce2404ed29c136067" + "hash": "5f32ce21c3b3ef31d3281c0700eaca0761742fda556be7002596020947fd37a5" } }, { @@ -270,7 +270,7 @@ }, "meta": { "archived": false, - "hash": "65534a8995d70358bf0faeb62cfa1e241147c8142e0bb62dd9015219cf367f9f" + "hash": "e09263bc0fa973e3e2435dfd61a764c0af080b73882f6c32b3534a5c4387fc43" } }, { @@ -291,7 +291,7 @@ }, "meta": { "archived": false, - "hash": "4909c73d0435a32df36abef06a58c21362ed3991aedc95421516a5d0ea83264a" + "hash": "8ffda25a0268a6f772c6912d370248c9329561c1ce1ea941e0622136459f7ef5" } }, { @@ -312,7 +312,7 @@ }, "meta": { "archived": false, - "hash": "791096ce761f35096c86403c6bc290381982d7a9bfc9bda4b70270aaf6ec4df2" + "hash": "3a8deee8bdc80c3df541ee5a9c31591af4c451362c2d86344ae4c937a04b2d12" } }, { @@ -333,7 +333,7 @@ }, "meta": { "archived": false, - "hash": "cfbb9759a71b09d9351a02f39f828578290e389aeb5390ce760957ee43be0297" + "hash": "28b9b15af52a4abd2caaba94c5ceeea765ec89982122104cf5dc111c3f56383f" } }, { @@ -457,7 +457,7 @@ }, "meta": { "archived": false, - "hash": "6f2f03a62a2b6f4a1a79d9864543d87297a1e2550ca5988d23b110fbc5c6a870" + "hash": "b9e5abf13f56d58cb8d7abe800d90956a6b4d1954ac81b08f671ce994319dff6" } }, { @@ -478,7 +478,7 @@ }, "meta": { "archived": false, - "hash": "a5d1dd83d8cceafaa3d628655b8595942b549835f90e587202ef972c31e2ca3a" + "hash": "4ebf63ac48859f5011de39740d2650f7929257c9d1d468d1789e45f6a33b577e" } }, { @@ -500,7 +500,7 @@ }, "meta": { "archived": false, - "hash": "b746ad19e2ea713891fb4c625a4c0cbaaad08e2189ecfbb1763ecaf8f2802ec7" + "hash": "a6add43aea896ec237dfada48cfe67edab4b111e290472da8ff2c0ece70f2320" } }, { @@ -540,7 +540,7 @@ }, "meta": { "archived": false, - "hash": "ae5220ae568a7482ee8f82b1af8816f5be99211ff99d7f290a0408d41ca58014" + "hash": "c9c64e0f8c0ec964e32434d873b28d0803a60737eceb19c67ab86edb3f352d48" } }, { @@ -601,7 +601,7 @@ }, "meta": { "archived": false, - "hash": "9b2c0c5b8dda71c75580f5f7214e93fffddf6ac872f39206fe26793ab60403ce" + "hash": "3928d6f7c78cb72d1fe428be6bbdd5ee3ddcdb360b999d25048f84306e521918" } }, { @@ -621,7 +621,7 @@ }, "meta": { "archived": false, - "hash": "3f2182bea1d9f17e2f315f6e8d72b3c31a42ff427e2a90d38fe50d6b86483f2e" + "hash": "f6180d269df84f10e4642d5d52d442be990138b7114aef048f95eabd121c3738" } }, { @@ -685,7 +685,7 @@ }, "meta": { "archived": false, - "hash": "2b349628df5c87359dfe7b113c4002212490693bb1dc1342f25775018764efd7" + "hash": "0f631b67b8460ed99917ff1468051e1e075ef02b280838ec14ad3fede2f48c7f" } }, { @@ -705,7 +705,7 @@ }, "meta": { "archived": false, - "hash": "99383d2b505d6afcd239d6369ab28b319b0ea0b1bcf2cc9176ac5762516e4413" + "hash": "6e9c4e34847a623fbf069fc1d64208178e9f992c7239bc80973512174a9242ff" } }, { @@ -725,7 +725,7 @@ }, "meta": { "archived": false, - "hash": "dd019505c88315f8744dd12bc7a66f5bd2aac07e2bbb3f6b3be100a1c1b96484" + "hash": "6e78bb3feef4d2fab6dbfced1c5f617869ea1c9f25b909d96dcfd7619df84aeb" } }, { @@ -745,7 +745,7 @@ }, "meta": { "archived": false, - "hash": "12ac9307e4f8d368f6c1fa85caa9a16365fbbbd09ede026992155067f18b20f9" + "hash": "5f363fa3bb93198f77488fc587bf8a124a04116348a81585d4b4a45b9fcb9989" } }, { @@ -787,7 +787,7 @@ }, "meta": { "archived": false, - "hash": "3d377baf4b065d0780e77bbded1bd2eac67ee72161bf3ff6fea061bb0e852453" + "hash": "aa72dce75869846337dd22e5cd3aa1f587ca3b37d07dc376082a77542793cb86" } }, { @@ -827,7 +827,7 @@ }, "meta": { "archived": false, - "hash": "8d268b66806bbfee8a6bf73bd4979d061fcdc77f23729acca7a3d30b454bd70c" + "hash": "f4471dcfb3a53fe8fd2f9e5566d5cf028aa69f4ddba69d6b5acd94c6e6aee133" } }, { @@ -856,7 +856,7 @@ "type": "snippet", "attributes": { "fileName": "createEventHub.md", - "text": "Creates a pub/sub ([publish–subscribe](https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern)) event hub with `emit`, `on`, and `off` methods.\r\n\r\nUse `Object.create(null)` to create an empty `hub` object that does not inherit properties from `Object.prototype`.\r\nFor `emit`, resolve the array of handlers based on the `event` argument and then run each one with `Array.prototype.forEach()` by passing in the data as an argument.\r\nFor `on`, create an array for the event if it does not yet exist, then use `Array.prototype.push()` to add the handler\r\nto the array.\r\nFor `off`, use `Array.prototype.findIndex()` to find the index of the handler in the event array and remove it using `Array.prototype.splice()`.", + "text": "Creates a pub/sub ([publish–subscribe](https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern)) event hub with `emit`, `on`, and `off` methods.\n\nUse `Object.create(null)` to create an empty `hub` object that does not inherit properties from `Object.prototype`.\nFor `emit`, resolve the array of handlers based on the `event` argument and then run each one with `Array.prototype.forEach()` by passing in the data as an argument.\nFor `on`, create an array for the event if it does not yet exist, then use `Array.prototype.push()` to add the handler\nto the array.\nFor `off`, use `Array.prototype.findIndex()` to find the index of the handler in the event array and remove it using `Array.prototype.splice()`.", "codeBlocks": [ "const createEventHub = () => ({\n hub: Object.create(null),\n emit(event, data) {\n (this.hub[event] || []).forEach(handler => handler(data));\n },\n on(event, handler) {\n if (!this.hub[event]) this.hub[event] = [];\n this.hub[event].push(handler);\n },\n off(event, handler) {\n const i = (this.hub[event] || []).findIndex(h => h === handler);\n if (i > -1) this.hub[event].splice(i, 1);\n }\n});", "const handler = data => console.log(data);\nconst hub = createEventHub();\nlet increment = 0;\n\n// Subscribe: listen for different types of events\nhub.on('message', handler);\nhub.on('message', () => console.log('Message event fired'));\nhub.on('increment', () => increment++);\n\n// Publish: emit events to invoke all handlers subscribed to them, passing the data to them as an argument\nhub.emit('message', 'hello world'); // logs 'hello world' and 'Message event fired'\nhub.emit('message', { hello: 'world' }); // logs the object and 'Message event fired'\nhub.emit('increment'); // `increment` variable is now 1\n\n// Unsubscribe: stop a specific handler from listening to the 'message' event\nhub.off('message', handler);" @@ -869,7 +869,7 @@ }, "meta": { "archived": false, - "hash": "e952a30a27c1465ea9ac465d4b7de3f9dda6e58279c176bc7c0e98fb6d99f1fc" + "hash": "02438b83d413dbd5aede2eed7381f3038c4627135b63130ffdca48fdb6fbbc91" } }, { @@ -891,7 +891,7 @@ }, "meta": { "archived": false, - "hash": "323a85ce03cc446dcfc3dfd8a89b4501b217b0e846fa73b99a6c3e2ee51a1caf" + "hash": "c48af79621162e51752aaa5f4a672eda54d60de68cc8ba0b0f6df5cea73b1314" } }, { @@ -913,7 +913,7 @@ }, "meta": { "archived": false, - "hash": "de42726725b56d870fa0a7b16dc327589bbeba5a6d821d5f43d09b8a478a139a" + "hash": "5559217e1be7deb18edbfac311d772041fa7db09e1087551dcdfa945ef855f6a" } }, { @@ -975,7 +975,7 @@ }, "meta": { "archived": false, - "hash": "2c956f3d572d8d1a8534827e4ff3e8c41f47ca6e4e899715146413162d8cd72a" + "hash": "d7b9e0ff472527d78c9056a20a9cae4a9068874fb2ea10bbd6d3b6b66e13796d" } }, { @@ -996,7 +996,7 @@ }, "meta": { "archived": false, - "hash": "c787309273fe531dcbc4ebc32b078cef19b3205c78f1e5c3863acac06ce23df4" + "hash": "9a23c1de52d2ddc6a014f5ed46a904921bc361eff91f51cfd4883ada4c4125a8" } }, { @@ -1017,7 +1017,7 @@ }, "meta": { "archived": false, - "hash": "348cfded2d11812e84ba6416f258b90bf01ec50515f0aa97052c1f166b51a489" + "hash": "920453d0015cea2810cab4930a98143e76489460ef32d1478564c0db80a02f76" } }, { @@ -1038,7 +1038,7 @@ }, "meta": { "archived": false, - "hash": "31714831376eeddd863a295af778632f584468745fbeb4e9a6f62b5275ea3562" + "hash": "701a5d546676f215b52c3386cde017ee68496827808e55dbeda1434ec0a2f79e" } }, { @@ -1079,7 +1079,7 @@ }, "meta": { "archived": false, - "hash": "067c820cb1b4afca0eca5ff9c3f9a835360224ac513fc50b247118adf54fea2b" + "hash": "3d09493a2600221b39194711824b21c9c3f7f04225fe91c913bbd16ed28f56cd" } }, { @@ -1180,7 +1180,7 @@ }, "meta": { "archived": false, - "hash": "e516410de0d0625f9673ba17858a2aeaea84918ebd58e27f53cd300519992ffd" + "hash": "db6d2c9f6c8a2b2e4b4030dd1092603d4201df29530105359949b18029963b30" } }, { @@ -1201,7 +1201,7 @@ }, "meta": { "archived": false, - "hash": "34b876f5bf471d60d20a0e04c8e489de256ce0d5cef28de3bd70789d1b93d919" + "hash": "66f4d7780b5cd3da5359db05c86afb19b3329499bc2ba7277225f01fd1829fb6" } }, { @@ -1222,7 +1222,7 @@ }, "meta": { "archived": false, - "hash": "e80b6619b9690e2a5d5cfd9d5fbe77fc25b6698e580e4b36e2c3c5fc54e3e572" + "hash": "197971487205f39337e5fe2bbf01566944a0bfe06347b5bbc7f21e32a67d37c4" } }, { @@ -1243,7 +1243,7 @@ }, "meta": { "archived": false, - "hash": "0f53175b7bf367b55e612ccca6061c8e2a3db68af00950af2fda92746055cc05" + "hash": "f982b4e8e3ec3c8b0c2ef4f19b38dac90df6ebe2dd4daa0126c917ebc07d3e62" } }, { @@ -1264,7 +1264,7 @@ }, "meta": { "archived": false, - "hash": "24c310daf1753360f1227331a36b1bfa6e1a165a65ca1c74acd9d90050b67bbe" + "hash": "306bfe9a8dc6fcedbf4dfa88b7bf2aac511556a1629ddb33f9e301c1e92b4321" } }, { @@ -1304,7 +1304,7 @@ }, "meta": { "archived": false, - "hash": "d890ae5478fb895bf8dd02c48afd2ba157a8a10953459486a1ef1a3907960344" + "hash": "6ab35042dbb8b16be8ea108cf5029b34ac9fb166ca331ad2ed6a52188f5b0ba3" } }, { @@ -1324,7 +1324,7 @@ }, "meta": { "archived": false, - "hash": "363950cfd962ab27b0a0e8cac684d67a6e2b68e889af62e01ab1b4723ec0e2aa" + "hash": "421ed9a64e720bd3ba5969e067f94a3d0c3f515b9e8af5ed420a9bbce48d75cb" } }, { @@ -1345,7 +1345,7 @@ }, "meta": { "archived": false, - "hash": "78b914b8c51d1cfdac70746979b8e25d8649c4543d14da14e2950f63f889e2e4" + "hash": "2ae245946d7c0d704aa1bbadf43afad388c09ac5dba409439b8ea79c1d4ad944" } }, { @@ -1366,7 +1366,7 @@ }, "meta": { "archived": false, - "hash": "5d6353c95ab328b21e84f4a5cf2c49bea9516e4945a91658bed14309c8919990" + "hash": "17dd9d9ebf61759b170b90253df1d726e761adead262a1733a0192ba21cd15d1" } }, { @@ -1449,7 +1449,7 @@ }, "meta": { "archived": false, - "hash": "7682a58d7745903fc19aa4341b8594d85714d563cfda1b44779bc0663338c3cf" + "hash": "7e9e7d7f802e363947ecaf97defebf01225c8a38d6ca8a4c6584e9837db6ec24" } }, { @@ -1471,7 +1471,7 @@ }, "meta": { "archived": false, - "hash": "ae852a538f18374cd16ddd80cbac643bcbd6ed1ff70c49fa01b59e517fad69c9" + "hash": "677770bd04bba27f729ea484bfdeff66cc5f0aea6562eb6ec49feaf9339a677c" } }, { @@ -1492,7 +1492,7 @@ }, "meta": { "archived": false, - "hash": "d328f5aca40c6ee25ff1d6ad4fe813a6bdd2e7dc2bf01567ba8cf8fd2470be83" + "hash": "824dc191c0c2cdc20738ba3b53ce77af5d25b3dc6662a78ff0d95609446a211e" } }, { @@ -1512,7 +1512,7 @@ }, "meta": { "archived": false, - "hash": "bcf1b2900f8cd6ca9b62cc02e102cb94b494ab142d8f1d6f99dbaae0677d0fe9" + "hash": "ed7fda7cda998a02fa4d69483826a834a795e3c5aaacabed229b76247dec6fbf" } }, { @@ -1533,7 +1533,7 @@ }, "meta": { "archived": false, - "hash": "f0f0a6da4c1fc17507cc956b0fa76d12efa81379b5626eb5ab739714ba139864" + "hash": "5eba7a884e9f26ee2bb9a51cda8e17777fc3957814a3071013f9d4f9958af102" } }, { @@ -1575,7 +1575,7 @@ }, "meta": { "archived": false, - "hash": "51d2fb1f44adfb7dde99fbe118ed9101b6e8848512cfd29324cccff15c4e3c1d" + "hash": "a6d182258648783ab09e72d4c40ac9de0dd3687a3b82c27715efab34d1836e1c" } }, { @@ -1595,7 +1595,7 @@ }, "meta": { "archived": false, - "hash": "877b483838474be7c56214009f8bc87fb53cdbef9c194839eee5c14a413d28ab" + "hash": "be45889694178d9cb40497b8b5e1815b836b6a069881cf83998abddc242234fc" } }, { @@ -1616,7 +1616,7 @@ }, "meta": { "archived": false, - "hash": "39812240e9f09488915843a8ecb6373908513a7a469c00b120779ca462c651c5" + "hash": "06a87242bde67fb030fbebf69effe858a5d30e21ca803937a533ab352d8240fc" } }, { @@ -1637,7 +1637,7 @@ }, "meta": { "archived": false, - "hash": "3ffa31973db7065ca8be2e550838839b555e07e8022647f8288da7ae3dc9680c" + "hash": "a6e1a401f74fecda3805e745a4032b6467d3c4f97d0c810b288b59f441db144d" } }, { @@ -1657,7 +1657,7 @@ }, "meta": { "archived": false, - "hash": "5ee9242026e09ac101ace1edb4c5b1d01ab00dd5c718118ab2bf5cb38193abab" + "hash": "d9b9b99af0ced3ae231521d4100dc5779436dbd624a2c3b9aa11a3ef9fb2edb6" } }, { @@ -1678,7 +1678,7 @@ }, "meta": { "archived": false, - "hash": "1af02f52c6aef95d92a27280477d30d4a677600433809267a04ed8bcb5b8f549" + "hash": "99268ad91de24fd7c06a35e0e401603da2087fe4b3ec349d6aebe0ae89a579a8" } }, { @@ -1686,7 +1686,7 @@ "type": "snippet", "attributes": { "fileName": "findLastKey.md", - "text": "Returns the last key that satisfies the provided testing function. \nOtherwise `undefined` is returned.\n\nUse `Object.keys(obj)` to get all the properties of the object, `Array.prototype.reverse()` to reverse their order and `Array.prototype.find()` to test the provided function for each key-value pair. \nThe callback receives three arguments - the value, the key and the object.", + "text": "Returns the last key that satisfies the provided testing function.\nOtherwise `undefined` is returned.\n\nUse `Object.keys(obj)` to get all the properties of the object, `Array.prototype.reverse()` to reverse their order and `Array.prototype.find()` to test the provided function for each key-value pair.\nThe callback receives three arguments - the value, the key and the object.", "codeBlocks": [ "const findLastKey = (obj, fn) =>\n Object.keys(obj)\n .reverse()\n .find(key => fn(obj[key], key, obj));", "findLastKey(\n {\n barney: { age: 36, active: true },\n fred: { age: 40, active: false },\n pebbles: { age: 1, active: true }\n },\n o => o['active']\n); // 'pebbles'" @@ -1699,7 +1699,7 @@ }, "meta": { "archived": false, - "hash": "17bc347fe95237440b4a583687347cc0b002f8d90c2570166afea3e2a63c777e" + "hash": "736507ed960071c1d5e228e2e2689f480e5dc4bb26c6822e5afac8df9b41e872" } }, { @@ -1719,7 +1719,7 @@ }, "meta": { "archived": false, - "hash": "976416611eef7ea7ec02cfa6ddc08711f633e2a87d4f04b3b255cf5cd6bd9b9f" + "hash": "986e50245ceb51d4bb3baeae10d6e4d162df5c60811f690f4a5e6b4fd36bc2fa" } }, { @@ -1740,7 +1740,7 @@ }, "meta": { "archived": false, - "hash": "445459e7eb304ee9069d72088883128e487c8bbac8f5b13f518b0332a99758a4" + "hash": "0283161af6234908ed0a3403a8e7fb2f33a576deb745f2902e622eb41584b33a" } }, { @@ -1782,7 +1782,7 @@ }, "meta": { "archived": false, - "hash": "c1d57024a1a572f9b8a4f7449aae2065e62fbd942709b9f4f6f09b64f518a1ca" + "hash": "878603be104f98fed0dca2d7c06ece8c4f6906a79ed0329e60bc9964c7b035ff" } }, { @@ -1805,7 +1805,7 @@ }, "meta": { "archived": false, - "hash": "fcaccacf92e1a1e5f8610cf78b840a6b897fc5e6cadb54d7a32efadb71b99f80" + "hash": "72c557bd9def493e3a138705f5cb66f993228bd7e51b11fa84f85841bc035524" } }, { @@ -1825,7 +1825,7 @@ }, "meta": { "archived": false, - "hash": "9f0a397890471bc6cab05493ae03780a0edca56e684c896a7f2e3fc773ab4642" + "hash": "eaaf3b173bbc54d7e83464bc8c96bc9e48a21bcffe606b05134aec2cf0191995" } }, { @@ -1845,7 +1845,7 @@ }, "meta": { "archived": false, - "hash": "6f320512c0362081df614d61e17ed8562bb7ee07bbcb62def3f3ac459b5be6bf" + "hash": "ed80f090fa9c7f999c3a2a296ab6c5bc66d53de16af625ca49455ad00200312d" } }, { @@ -1865,7 +1865,7 @@ }, "meta": { "archived": false, - "hash": "09fc37c37860d58380c6ce23d61f872193415d1cfe7446fe7ff6943d0b7d9968" + "hash": "2093c36c482cf2a34c6c3b095fc6c18dc22693138d66d7527a0fe570156106b8" } }, { @@ -1907,7 +1907,7 @@ }, "meta": { "archived": false, - "hash": "89af4f514247f8d9702dfa3d6a77df187ca7ab5994dd8074da1f293cec24ff61" + "hash": "61abf38f71e57dad7cf5abef9d19950014819f3775371caab92f4433a07d07de" } }, { @@ -1948,7 +1948,7 @@ }, "meta": { "archived": false, - "hash": "b94f3a44fb67360e307a17096a743c8616f1a194ba08a549064d090ef86c31ee" + "hash": "6041519112ff2d31db7b7076bc472cdcdfac0f293f2616b1af53f02313e46938" } }, { @@ -1968,7 +1968,7 @@ }, "meta": { "archived": false, - "hash": "85d56939e95b4f3015a2ee7b7a74ed2855e4e387ce5eb03d7d3c6c3a071dcf5c" + "hash": "db5e6f745e0157873ab4c0840da8675d3d20b8fe2ecbbb4e9f24744606b0dde9" } }, { @@ -1988,7 +1988,7 @@ }, "meta": { "archived": false, - "hash": "757e7f51ea8c8b5803769c92b60966580c3fa3a227036cb3ca41406c22c6632b" + "hash": "4a8abb281739c1b068d979b8d49038ea063ece4aa570cc8444926ebd30306ff1" } }, { @@ -2112,7 +2112,7 @@ }, "meta": { "archived": false, - "hash": "1083da3e052cd8a654bc85150a434fe1a31729be0b78c2fa573887a9a7318ba3" + "hash": "defd32f6b9e8d045213a7cbe4a68686ec229c472e46837afb6c7bd1b3df3ccae" } }, { @@ -2133,7 +2133,7 @@ }, "meta": { "archived": false, - "hash": "16d1dadd1272a4627adf5788c6419a8c0ea578db3769f13995471067e621198e" + "hash": "3d356c5e5780be7b393fe37e2bee159be965aae0ebc4474979e28385ea8af18a" } }, { @@ -2194,7 +2194,7 @@ }, "meta": { "archived": false, - "hash": "3ea93481e9752f37b1b4fae54740a49df11068de7fea73e7a90db2d79019eb29" + "hash": "f045367ac2eab790b4e7783704bdce034b8f750aac38a96b2a6bfac4badec938" } }, { @@ -2367,7 +2367,7 @@ }, "meta": { "archived": false, - "hash": "15f1d0142c25cc971b11c18db69dbc7cc4492877661a7b7b471add15dd6c5316" + "hash": "a233bf70be2dc7a0696d852561462c21f14974dbf43d888696fb8b7c36d0ca63" } }, { @@ -2416,7 +2416,7 @@ "type": "snippet", "attributes": { "fileName": "indexOfAll.md", - "text": "Returns all indices of `val` in an array. \nIf `val` never occurs, returns `[]`.\n\nUse `Array.prototype.reduce()` to loop over elements and store indices for matching elements.\nReturn the array of indices.", + "text": "Returns all indices of `val` in an array.\nIf `val` never occurs, returns `[]`.\n\nUse `Array.prototype.reduce()` to loop over elements and store indices for matching elements.\nReturn the array of indices.", "codeBlocks": [ "const indexOfAll = (arr, val) => arr.reduce((acc, el, i) => (el === val ? [...acc, i] : acc), []);", "indexOfAll([1, 2, 3, 1, 2, 3], 1); // [0,3]\nindexOfAll([1, 2, 3], 4); // []" @@ -2428,7 +2428,7 @@ }, "meta": { "archived": false, - "hash": "2db4f4d3ab61ceefe294bc6399d0fc5558dcde87f659381bc0caed52de6be663" + "hash": "c55f08e2dacfc794891f331a8ab6038a6600aa3a27d73b04d6d8e20142ee38e7" } }, { @@ -2468,7 +2468,7 @@ }, "meta": { "archived": false, - "hash": "bb9a475bb49367ff2cb0a58f47992d69f2fecbc5f614c1a6e41c469495e93af3" + "hash": "9c91703349f7d2e9ae8806ca1374f893a06389e7caf6b6410cd4edcdc0cdc641" } }, { @@ -2510,7 +2510,7 @@ }, "meta": { "archived": false, - "hash": "25359e2d70e26266be459ea522d6272581c099089ae79b5bc48116cfb88cc088" + "hash": "d70f1e3ff938d3aa378038d316bb2d131da5fdd2ea62ef512de3336910e6f342" } }, { @@ -2552,7 +2552,7 @@ }, "meta": { "archived": false, - "hash": "30158adba400501632e1ac4d55a5f0fcc2d9416f77aee9156844450689c929dc" + "hash": "029121e79e5690c63a06bab363cd71f0c0b44fc5ac13d442b7e1103efe113cdd" } }, { @@ -2633,7 +2633,7 @@ }, "meta": { "archived": false, - "hash": "6881cbf9db3aea50022a0413b840f4d378e9e98e10de1a0abddca5a7f7282050" + "hash": "42ad71d6d0ee0fc1ab7b29ba38f2ecce382f811e44b7557e7cc53f49d61596a0" } }, { @@ -2654,7 +2654,7 @@ }, "meta": { "archived": false, - "hash": "78c90426a81372be83af6ef2bdee0147263361673ab99fa2315ead2720d991b8" + "hash": "9b88b7b1786c6d7b7c2e1de6c89019feb07fea89f8a17f082c18357cac67abc9" } }, { @@ -2675,7 +2675,7 @@ }, "meta": { "archived": false, - "hash": "66050987342924eff56a42b04bb50287f8d46d8f504d186478141dbcd2fb1f4b" + "hash": "43f99f032f4c3d1b685d3ca05b76e4c4857168cf7b94f93454421d328bf8aaa2" } }, { @@ -2696,7 +2696,7 @@ }, "meta": { "archived": false, - "hash": "9a0cd8cae3d3901bf78fad156e810f80738e7ee3e51b288dc89fa7b9eb54c866" + "hash": "ecbcab22d1ee4d676863be930fadc0396b8688def0a782e8fb3fec98aac436a4" } }, { @@ -2718,7 +2718,7 @@ }, "meta": { "archived": false, - "hash": "b89d0ccfdf527ef90c49a4b4e54b9d5106691abe8c94a94ba8fda3a43c77391b" + "hash": "06baccfa0f48458c6d2eb043960851545f3c358f50c4687c2d570676d73f42a9" } }, { @@ -2762,7 +2762,7 @@ }, "meta": { "archived": false, - "hash": "2bda59143e64383a94ba8fd9c519db16b50566b2810030493a1d77d229ce7841" + "hash": "9404ec22658a648e7b7bcf314b764e4be17e235b14ffdf03654325844fb51005" } }, { @@ -2811,7 +2811,7 @@ "type": "snippet", "attributes": { "fileName": "isBrowser.md", - "text": "Determines if the current runtime environment is a browser so that front-end modules can run on the server (Node) without throwing errors.\n\nUse `Array.prototype.includes()` on the `typeof` values of both `window` and `document` (globals usually only available in a browser environment unless they were explicitly defined), which will return `true` if one of them is `undefined`. \n`typeof` allows globals to be checked for existence without throwing a `ReferenceError`. \nIf both of them are not `undefined`, then the current environment is assumed to be a browser.", + "text": "Determines if the current runtime environment is a browser so that front-end modules can run on the server (Node) without throwing errors.\n\nUse `Array.prototype.includes()` on the `typeof` values of both `window` and `document` (globals usually only available in a browser environment unless they were explicitly defined), which will return `true` if one of them is `undefined`.\n`typeof` allows globals to be checked for existence without throwing a `ReferenceError`.\nIf both of them are not `undefined`, then the current environment is assumed to be a browser.", "codeBlocks": [ "const isBrowser = () => ![typeof window, typeof document].includes('undefined');", "isBrowser(); // true (browser)\nisBrowser(); // false (Node)" @@ -2824,7 +2824,7 @@ }, "meta": { "archived": false, - "hash": "b207815a1a26a3161f3c79e64052e8feac65e44a34cef545851300c8b9f08d0d" + "hash": "0f9f606715fd96c8dc80df73bf8f19ae808ae0318b6c332f09ccd01cfb37fef9" } }, { @@ -3117,7 +3117,7 @@ }, "meta": { "archived": false, - "hash": "f71ccc907c6ffd6bc29d461f12529872a78a78f871633fceeceed4e60a666c6f" + "hash": "de4e7c79386daeb68e23c3fa2c8ce8065e6dcdfdf32c423d4ad63bdfa7149a1a" } }, { @@ -3261,7 +3261,7 @@ }, "meta": { "archived": false, - "hash": "b4fea8a827ecac55b823edbeac26371b6ab29321180ca71bf3a47fa2fedcabb6" + "hash": "626f56d793d107522067c92edce730bca0d33fb5a8095ac9396b4eb374fddd29" } }, { @@ -3290,7 +3290,7 @@ "type": "snippet", "attributes": { "fileName": "join.md", - "text": "Joins all elements of an array into a string and returns this string. \nUses a separator and an end separator.\n\nUse `Array.prototype.reduce()` to combine elements into a string.\nOmit the second argument, `separator`, to use a default separator of `','`.\nOmit the third argument, `end`, to use the same value as `separator` by default.", + "text": "Joins all elements of an array into a string and returns this string.\nUses a separator and an end separator.\n\nUse `Array.prototype.reduce()` to combine elements into a string.\nOmit the second argument, `separator`, to use a default separator of `','`.\nOmit the third argument, `end`, to use the same value as `separator` by default.", "codeBlocks": [ "const join = (arr, separator = ',', end = separator) =>\n arr.reduce(\n (acc, val, i) =>\n i === arr.length - 2\n ? acc + val + end\n : i === arr.length - 1\n ? acc + val\n : acc + val + separator,\n ''\n );", "join(['pen', 'pineapple', 'apple', 'pen'], ',', '&'); // \"pen,pineapple,apple&pen\"\njoin(['pen', 'pineapple', 'apple', 'pen'], ','); // \"pen,pineapple,apple,pen\"\njoin(['pen', 'pineapple', 'apple', 'pen']); // \"pen,pineapple,apple,pen\"" @@ -3302,7 +3302,7 @@ }, "meta": { "archived": false, - "hash": "e1f4c93facee0793169305ebe0080f5d60b232e282bc518a54da89be37279429" + "hash": "84003bdeb9bfbac104ba97b07bebb29ed82a84a2e05e1931dc5f5d4c1d336be4" } }, { @@ -3324,7 +3324,7 @@ }, "meta": { "archived": false, - "hash": "65457b943f03456c28e947f21177ffd0c9d8a00eb37aab7f7f76cb666f8c0acc" + "hash": "48300abf81d331fb086e0267e5a1ef4e021f236b1b5bc6f3ea334eb87a4069a6" } }, { @@ -3408,7 +3408,7 @@ }, "meta": { "archived": false, - "hash": "cb9de7acf3a94ee67a24d7d5926944124ad0bd3459126c2f740f868fbffc655b" + "hash": "41fa8282b317c81c9e05d9fcc76cfa371d9b6e941c48d2ca6469153e955a60a3" } }, { @@ -3428,7 +3428,7 @@ }, "meta": { "archived": false, - "hash": "683925a82b5ff50494e589d9e1aa6ac66696263718613bf29ab03203c1247bdb" + "hash": "a9ecbb1256234991b339b6701ca0d45eb02c4698f00f5b6855005751d7a30bd7" } }, { @@ -3449,7 +3449,7 @@ }, "meta": { "archived": false, - "hash": "874ac349f65a3787c4579dfe94efc068441b1b4cd38892a35352d43ece8e7ca4" + "hash": "37a866439f736e06c325cfdfb1ce614e8135fc724a7ab8c60174cf8cffe283cf" } }, { @@ -3470,7 +3470,7 @@ }, "meta": { "archived": false, - "hash": "a0d5ec06ceb092d7473d95ce8f4124edcdf7d3659969f2f1e7d21834fc682ee6" + "hash": "215198b03c4b2e9c7961de606fa9df83fa5964f2210fcf17b4ea69ee15294bcb" } }, { @@ -3514,7 +3514,7 @@ }, "meta": { "archived": false, - "hash": "828991c05b86fc84f46155e1452cada09bd3cb64f734533af7bf4cabe3077aab" + "hash": "7ea3b8a83b25f531ed389bfb8318ad70e65dbe2dc9f966a81924415c447a38df" } }, { @@ -3535,7 +3535,7 @@ }, "meta": { "archived": false, - "hash": "c98a3dde46797b4d6c38d7bac7689bbfbcf24892a62de06f4aaeb665f1e9607c" + "hash": "10d552b21c7b8d85c9588a47bffc571ed837df53d24a47cb80e8016f49b04885" } }, { @@ -3557,7 +3557,7 @@ }, "meta": { "archived": false, - "hash": "b5217d2c91e86fb37ea02b5339140bba05f8d88d43a42dd3abcb9acf0c1d1ddf" + "hash": "23226393059fc47128562284e5982e5f9a4b365b8d0625f7e18cabde49f2e682" } }, { @@ -3578,7 +3578,7 @@ }, "meta": { "archived": false, - "hash": "b8b36705d0f588dca63c57c248d0683852d6f14aab68831595be5f2f1568c9df" + "hash": "b937a42861d79ec84dc8217b31c193351ec82f3220d5eccc8840d059673823ba" } }, { @@ -3600,7 +3600,7 @@ }, "meta": { "archived": false, - "hash": "c1fd11b1c4376ec9a31d3e1ed3f9910e97ffa20db06ce2ecf3a3afc1d25daff9" + "hash": "a6ce779c9f00b00d0035baeeb187ac97b6f96d748db6e4583f408173a2310dac" } }, { @@ -3622,7 +3622,7 @@ }, "meta": { "archived": false, - "hash": "1e428e3359905eca8f86da81afcbcca3b93c44ac7500c1736ca9c83f9c66a135" + "hash": "00851da4972ff91286aecc46f1070ce619d0d64287ac6a8c90b6f8f3c0da2abc" } }, { @@ -3630,7 +3630,7 @@ "type": "snippet", "attributes": { "fileName": "maxN.md", - "text": "Returns the `n` maximum elements from the provided array. \nIf `n` is greater than or equal to the provided array's length, then return the original array (sorted in descending order).\n\nUse `Array.prototype.sort()` combined with the spread operator (`...`) to create a shallow clone of the array and sort it in descending order.\nUse `Array.prototype.slice()` to get the specified number of elements.\nOmit the second argument, `n`, to get a one-element array.", + "text": "Returns the `n` maximum elements from the provided array.\nIf `n` is greater than or equal to the provided array's length, then return the original array (sorted in descending order).\n\nUse `Array.prototype.sort()` combined with the spread operator (`...`) to create a shallow clone of the array and sort it in descending order.\nUse `Array.prototype.slice()` to get the specified number of elements.\nOmit the second argument, `n`, to get a one-element array.", "codeBlocks": [ "const maxN = (arr, n = 1) => [...arr].sort((a, b) => b - a).slice(0, n);", "maxN([1, 2, 3]); // [3]\nmaxN([1, 2, 3], 2); // [3,2]" @@ -3643,7 +3643,7 @@ }, "meta": { "archived": false, - "hash": "3bee579215f244423855f852e4d211ea26ad7cb8747e96c36252855ccd093a5f" + "hash": "71e58ca545b7dd0256d29b719b0c48c177968ef615a5ca1fc92377e6a4b089f7" } }, { @@ -3664,7 +3664,7 @@ }, "meta": { "archived": false, - "hash": "a6b933371f622f4dde77359e73c6d12ba14b3c21171a86830e59c4e620be8cb1" + "hash": "448c71acf264e7e0752383faf025b6f118a02954cc651c1c5308e3894a83cc44" } }, { @@ -3705,7 +3705,7 @@ }, "meta": { "archived": false, - "hash": "6ed1518bf260b792cb9e06eec51cc88ad4d81aca1ec59c2bf5d0bf9bb57d47fa" + "hash": "13f1b8dca2fb1c6ebba61abb7e5784fc80288e59f4979e463c5f4b81497d76bd" } }, { @@ -3727,7 +3727,7 @@ }, "meta": { "archived": false, - "hash": "b6ccebafe03f65d47a1e6036043ea279a540e7056a5cc4a0917e007bc2a0e460" + "hash": "58be8a0dc3e56ec09b0bb927c2c575c033c70ac3a8b612e993fdcbf6d5a99d51" } }, { @@ -3735,7 +3735,7 @@ "type": "snippet", "attributes": { "fileName": "minN.md", - "text": "Returns the `n` minimum elements from the provided array. \nIf `n` is greater than or equal to the provided array's length, then return the original array (sorted in ascending order).\n\nUse `Array.prototype.sort()` combined with the spread operator (`...`) to create a shallow clone of the array and sort it in ascending order.\nUse `Array.prototype.slice()` to get the specified number of elements.\nOmit the second argument, `n`, to get a one-element array.", + "text": "Returns the `n` minimum elements from the provided array.\nIf `n` is greater than or equal to the provided array's length, then return the original array (sorted in ascending order).\n\nUse `Array.prototype.sort()` combined with the spread operator (`...`) to create a shallow clone of the array and sort it in ascending order.\nUse `Array.prototype.slice()` to get the specified number of elements.\nOmit the second argument, `n`, to get a one-element array.", "codeBlocks": [ "const minN = (arr, n = 1) => [...arr].sort((a, b) => a - b).slice(0, n);", "minN([1, 2, 3]); // [1]\nminN([1, 2, 3], 2); // [1,2]" @@ -3748,7 +3748,7 @@ }, "meta": { "archived": false, - "hash": "9dcaa91174d9c4be4837342b9f10f6f9cc9e5f9add113cc81c3248bd1659ea4c" + "hash": "325ab83a7c6da0d014c69236fc2134080bb8b2e6153608ba63c5924041db1c3a" } }, { @@ -3756,7 +3756,7 @@ "type": "snippet", "attributes": { "fileName": "mostPerformant.md", - "text": "Returns the index of the function in an array of functions which executed the fastest.\n\nUse `Array.prototype.map()` to generate an array where each value is the total time taken to execute the function after `iterations` times. Use the difference in `performance.now()` values before and after to get the total time in milliseconds to a high degree of accuracy.\nUse `Math.min()` to find the minimum execution time, and return the index of that shortest time which corresponds to the index of the most performant function. \nOmit the second argument, `iterations`, to use a default of 10,000 iterations. The more iterations, the more reliable the result but the longer it will take.", + "text": "Returns the index of the function in an array of functions which executed the fastest.\n\nUse `Array.prototype.map()` to generate an array where each value is the total time taken to execute the function after `iterations` times. Use the difference in `performance.now()` values before and after to get the total time in milliseconds to a high degree of accuracy.\nUse `Math.min()` to find the minimum execution time, and return the index of that shortest time which corresponds to the index of the most performant function.\nOmit the second argument, `iterations`, to use a default of 10,000 iterations. The more iterations, the more reliable the result but the longer it will take.", "codeBlocks": [ "const mostPerformant = (fns, iterations = 10000) => {\n const times = fns.map(fn => {\n const before = performance.now();\n for (let i = 0; i < iterations; i++) fn();\n return performance.now() - before;\n });\n return times.indexOf(Math.min(...times));\n};", "mostPerformant([\n () => {\n // Loops through the entire array before returning `false`\n [1, 2, 3, 4, 5, 6, 7, 8, 9, '10'].every(el => typeof el === 'number');\n },\n () => {\n // Only needs to reach index `1` before returning false\n [1, '2', 3, 4, 5, 6, 7, 8, 9, 10].every(el => typeof el === 'number');\n }\n]); // 1" @@ -3768,7 +3768,7 @@ }, "meta": { "archived": false, - "hash": "741dc61327ac90180fbc751011539c34c25e8ed70740cf4033a3acddee573530" + "hash": "77b76c99d021860bb2c03c1b0b37f2eeddd9f9c9594aad735744fb1014e3e62a" } }, { @@ -3796,7 +3796,7 @@ "type": "snippet", "attributes": { "fileName": "nest.md", - "text": "Given a flat array of objects linked to one another, it will nest them recursively.\nUseful for nesting comments, such as the ones on reddit.com.\n\nUse recursion. \nUse `Array.prototype.filter()` to filter the items where the `id` matches the `link`, then `Array.prototype.map()` to map each one to a new object that has a `children` property which recursively nests the items based on which ones are children of the current item. \nOmit the second argument, `id`, to default to `null` which indicates the object is not linked to another one (i.e. it is a top level object). \nOmit the third argument, `link`, to use `'parent_id'` as the default property which links the object to another one by its `id`.", + "text": "Given a flat array of objects linked to one another, it will nest them recursively.\nUseful for nesting comments, such as the ones on reddit.com.\n\nUse recursion.\nUse `Array.prototype.filter()` to filter the items where the `id` matches the `link`, then `Array.prototype.map()` to map each one to a new object that has a `children` property which recursively nests the items based on which ones are children of the current item.\nOmit the second argument, `id`, to default to `null` which indicates the object is not linked to another one (i.e. it is a top level object).\nOmit the third argument, `link`, to use `'parent_id'` as the default property which links the object to another one by its `id`.", "codeBlocks": [ "const nest = (items, id = null, link = 'parent_id') =>\n items\n .filter(item => item[link] === id)\n .map(item => ({ ...item, children: nest(items, item.id) }));", "// One top level comment\nconst comments = [\n { id: 1, parent_id: null },\n { id: 2, parent_id: 1 },\n { id: 3, parent_id: 1 },\n { id: 4, parent_id: 2 },\n { id: 5, parent_id: 4 }\n];\nconst nestedComments = nest(comments); // [{ id: 1, parent_id: null, children: [...] }]" @@ -3808,7 +3808,7 @@ }, "meta": { "archived": false, - "hash": "923043e5861c743a77b182f90ad810f57b866d14470ac0337435287768ee2919" + "hash": "ff06e5aeb0e1159f9193332187323f6a4f990eeddaa4fbc706c5a6025b53290e" } }, { @@ -3850,7 +3850,7 @@ }, "meta": { "archived": false, - "hash": "84dab3ab837bb27a0470097336a8f0c843052e722dbb7af86895dc5e588d2137" + "hash": "efc733592e40a00d2d25b1b1fff5fe8064f9ecc8f67059279d70430c00a7a23c" } }, { @@ -3871,7 +3871,7 @@ }, "meta": { "archived": false, - "hash": "3cf559381bdbb30631347fa1e02c5552c47963737da6737455992f6fb39652af" + "hash": "0afafa961fb6ef8cef3a7d74fa55d16ccf5c1d94d790e1d1984242fd165770d7" } }, { @@ -3891,7 +3891,7 @@ }, "meta": { "archived": false, - "hash": "94f23b748d064fc620e820b9f858e0b191c68be84c9af6d8740fe48618005870" + "hash": "20c4b668b37a52e61bbaa72b87a507cd4c7ca770d9e179d753258ccdead5ee6c" } }, { @@ -3912,7 +3912,7 @@ }, "meta": { "archived": false, - "hash": "5dac82c5ca1e0d36ddc13bd1d3e643676c271f86eebf8aa4fb1afb382e07e771" + "hash": "2d12e5cb31a3f9dd51639897eaf42ca6844fd2d8a899f51523f8b5a10a8f2348" } }, { @@ -3933,7 +3933,7 @@ }, "meta": { "archived": false, - "hash": "b5dc718a33f92c4684e9ff63aa5e8dd1bd8d90b1dd35aead029cd3c3b06d54e6" + "hash": "251db16d7571ac9e81cde0ca431de71ecb2b9817a07b5075834072dc10eb9989" } }, { @@ -3954,7 +3954,7 @@ }, "meta": { "archived": false, - "hash": "184249efedeae899be6f64b8a514f5ecdede5caa73add1973172351e9b129c6b" + "hash": "043ee85dc41a7310271c16b31c9a2b3e662b83c1108a04490c753f1dd0473929" } }, { @@ -3995,7 +3995,7 @@ }, "meta": { "archived": false, - "hash": "ac3331392815f5a6496304df0d9b25aca464dd3b1cb5d01396c233b5f179f722" + "hash": "f00343d616edbcad85ba18f1eb279f55bc663512ab725a6ea5ca0b94903164a8" } }, { @@ -4016,7 +4016,7 @@ }, "meta": { "archived": false, - "hash": "047964b4409ac519c62909c0ca6f50b4db18bdf3cfb9bfc645d43e6438858b99" + "hash": "0a91b2ae1b488c8a3ac1d732d48396ea0545314114d97ff559f6c6b275b8e2b1" } }, { @@ -4038,7 +4038,7 @@ }, "meta": { "archived": false, - "hash": "c9087e8945c10e2e0cc951fc9e2bcd62316347aebb0e127bc7f6c6dbf52cd11c" + "hash": "359fd8eb0861de57213387e715687174cf671e22e9b66e358ac28364ad1b2be2" } }, { @@ -4121,7 +4121,7 @@ }, "meta": { "archived": false, - "hash": "22503211c50141af520926b607fb38527e2667ce22de64f07942db9ef2de3ff1" + "hash": "1a1adbe92bb44aa61583613d8aebf70143f4ac9cd9aae2afa1d5ac88410958d7" } }, { @@ -4142,7 +4142,7 @@ }, "meta": { "archived": false, - "hash": "247a0bbb83498d826178298d52a73ee8720e958e1f8afea599a3727217a45ed6" + "hash": "c888834c4829c50c67c9828127ff4b8b810d99925202dd2cc42110ad32010ea7" } }, { @@ -4163,7 +4163,7 @@ }, "meta": { "archived": false, - "hash": "af95e891903e7ee7aff4f5cf8254b2ad904086938ae1058482fd599b08824deb" + "hash": "50d31769481bb1a8c09db3bcece1b3c8346fb83f9db32d5ae0c99f09e3b45eaf" } }, { @@ -4203,7 +4203,7 @@ }, "meta": { "archived": false, - "hash": "f57075c283729a7585935df63d6e7a24c25b16865a28058e0973d42a314dadd9" + "hash": "4b1f0c701fde160a480314674c974d8b6c7a6114d1d5772981ca7fa097f1d7e7" } }, { @@ -4224,7 +4224,7 @@ }, "meta": { "archived": false, - "hash": "73024d687cf93478ce209b0f0ccc81f5841ca785effdd664d07a31fade8340b3" + "hash": "634d9c15c437db3db0789f91c3aff73e469714a1dbd28af731a52ae1d7fd6443" } }, { @@ -4286,7 +4286,7 @@ }, "meta": { "archived": false, - "hash": "34b5219f73fd8ec4733a6fe59b9995782c4788b2a33f09acc21c7b925e837c6a" + "hash": "578eac814b69f7854e2febd57c64bf3323fe2e59beea24e5708fef5d64f7856c" } }, { @@ -4306,7 +4306,7 @@ }, "meta": { "archived": false, - "hash": "5d181e4f610b1dd80004f022c7db0162c77fb8be96a7b250f4b9bbbc58287ec3" + "hash": "8343f8ddd30fced511584cb972818cf5c0e6e8cf9a6ea74071d254c3b6808061" } }, { @@ -4327,7 +4327,7 @@ }, "meta": { "archived": false, - "hash": "81aa651d55dd837cf9e2f39185fd5b1594c180eb80a6dd4fbab884e393fb3b6b" + "hash": "ed705722088f82143e0af891539884b168f192f28e2c3926d2a15a26ae9ef539" } }, { @@ -4348,7 +4348,7 @@ }, "meta": { "archived": false, - "hash": "6d0f02cf40092134297d3ffc37a91bacc72f320b17740aed41b53241c5f7eace" + "hash": "31d70a01cc4a9045343efcd04f041bb6b4a9754dfa1665ed6aa546003803d6dd" } }, { @@ -4370,7 +4370,7 @@ }, "meta": { "archived": false, - "hash": "a40f7c3f340322bd9d951d6ceb90984c279854a728417857c4c0fbb0098c96b3" + "hash": "0842f93bde56f28c9663d341314b7e27b71a686784e7276b34909b0fa5551502" } }, { @@ -4392,7 +4392,7 @@ }, "meta": { "archived": false, - "hash": "23257e36931b9d7dea6102e9cc92c4735be4dd5725d8bfa55200b84aeb08c134" + "hash": "dcdf66e8d0eb4a1761c6b767b8cc350757087ae817ec371436faab0fff7c0051" } }, { @@ -4413,7 +4413,7 @@ }, "meta": { "archived": false, - "hash": "ab0f2bb919fa16a54af9bbef603aafb02415db196df198f50d4f2b02b627600f" + "hash": "3603cce07f53157cdf5d69e262bf0bd61c3103b5afd9e3d892cd4db39b037785" } }, { @@ -4453,7 +4453,7 @@ }, "meta": { "archived": false, - "hash": "0e6d6e9b25937f9667dafc9a745df14b78658adc920045b79379781025732119" + "hash": "21941200f0c5bfd1dedb00cd4a8dfd799062d7fe43cf8a82c0483e54b560ac0d" } }, { @@ -4461,7 +4461,7 @@ "type": "snippet", "attributes": { "fileName": "prefix.md", - "text": "Returns the prefixed version (if necessary) of a CSS property that the browser supports.\n\nUse `Array.prototype.findIndex()` on an array of vendor prefix strings to test if `document.body` has one of them defined in its `CSSStyleDeclaration` object, otherwise return `null`. \nUse `String.prototype.charAt()` and `String.prototype.toUpperCase()` to capitalize the property, which will be appended to the vendor prefix string.", + "text": "Returns the prefixed version (if necessary) of a CSS property that the browser supports.\n\nUse `Array.prototype.findIndex()` on an array of vendor prefix strings to test if `document.body` has one of them defined in its `CSSStyleDeclaration` object, otherwise return `null`.\nUse `String.prototype.charAt()` and `String.prototype.toUpperCase()` to capitalize the property, which will be appended to the vendor prefix string.", "codeBlocks": [ "const prefix = prop => {\n const capitalizedProp = prop.charAt(0).toUpperCase() + prop.slice(1);\n const prefixes = ['', 'webkit', 'moz', 'ms', 'o'];\n const i = prefixes.findIndex(\n prefix => typeof document.body.style[prefix ? prefix + capitalizedProp : prop] !== 'undefined'\n );\n return i !== -1 ? (i === 0 ? prop : prefixes[i] + capitalizedProp) : null;\n};", "prefix('appearance'); // 'appearance' on a supported browser, otherwise 'webkitAppearance', 'mozAppearance', 'msAppearance' or 'oAppearance'" @@ -4474,7 +4474,7 @@ }, "meta": { "archived": false, - "hash": "a529eb02a24025131ea7efa345a07d66186a8bddc0b94e298031631144a651e8" + "hash": "e8875fbdf505642806ab6f98b68e4ebce935e87b78a639b74a3dce8eb6f6e9a5" } }, { @@ -4517,7 +4517,7 @@ }, "meta": { "archived": false, - "hash": "c330b6020332343dab6980f9a42a85f7871e60da28ddb23b26dd7a60e143519a" + "hash": "6d0f66159240aa2ef6015747b2530d0a7191ec3810f3c502d9bd156012603d45" } }, { @@ -4559,7 +4559,7 @@ }, "meta": { "archived": false, - "hash": "3169f10481f6c589961d19d4c23ba0fc25f104a2cbe299bc9a94e5ab6fd2b384" + "hash": "eed98a26fc85c7684508f33ab909070e6205747990c5e4562f2d120728bd6a3c" } }, { @@ -4579,7 +4579,7 @@ }, "meta": { "archived": false, - "hash": "e2aa1ead7e75caf768128d168ec9ebc1972c2f13fd89d28ea74ff3f4c6db31f9" + "hash": "d034820c71f581ba5cdce7ab47e4fb0ff64baf554c1f19a0e45c5d0e71eeae4c" } }, { @@ -4599,7 +4599,7 @@ }, "meta": { "archived": false, - "hash": "c6826dfdd96e9325603138fa82cf71bb80766a058a163eccb009827d1ef51cb8" + "hash": "e1e0ce4362866a007fe261a0b7995282b5e579397517a71202cd9bb89d021d48" } }, { @@ -4620,7 +4620,7 @@ }, "meta": { "archived": false, - "hash": "b47f00777e924d7f7afa8c879bdf1e84ff74f8b67aca91ade9b86444b658a336" + "hash": "6e597c1a6a73606b584d7be8f1a4974cd312a2ec5c500078ce146609e6ecc537" } }, { @@ -4770,7 +4770,7 @@ }, "meta": { "archived": false, - "hash": "ed859f031cdc8a778bcec23817f79dab36f7607424fedda33d8d997172404de1" + "hash": "b0007cb91fbeab8d350028d5ae4448c366e79264de6c88e8fa15743158b1a927" } }, { @@ -4820,7 +4820,7 @@ "type": "snippet", "attributes": { "fileName": "reducedFilter.md", - "text": "Filter an array of objects based on a condition while also filtering out unspecified keys.\n\nUse `Array.prototype.filter()` to filter the array based on the predicate `fn` so that it returns the objects for which the condition returned a truthy value. \nOn the filtered array, use `Array.prototype.map()` to return the new object using `Array.prototype.reduce()` to filter out the keys which were not supplied as the `keys` argument.", + "text": "Filter an array of objects based on a condition while also filtering out unspecified keys.\n\nUse `Array.prototype.filter()` to filter the array based on the predicate `fn` so that it returns the objects for which the condition returned a truthy value.\nOn the filtered array, use `Array.prototype.map()` to return the new object using `Array.prototype.reduce()` to filter out the keys which were not supplied as the `keys` argument.", "codeBlocks": [ "const reducedFilter = (data, keys, fn) =>\n data.filter(fn).map(el =>\n keys.reduce((acc, key) => {\n acc[key] = el[key];\n return acc;\n }, {})\n );", "const data = [\n {\n id: 1,\n name: 'john',\n age: 24\n },\n {\n id: 2,\n name: 'mike',\n age: 50\n }\n];\n\nreducedFilter(data, ['id', 'name'], item => item.age > 24); // [{ id: 2, name: 'mike'}]" @@ -4832,7 +4832,7 @@ }, "meta": { "archived": false, - "hash": "1ff03e381cda89ab13128f4df776de43967f09470520ad8e850cea8d7284dafc" + "hash": "90f20d7a605d4ec82be0bf5d4891d16d68639e9fbce578fe1c7e38c0d9027f03" } }, { @@ -4853,7 +4853,7 @@ }, "meta": { "archived": false, - "hash": "1953f4b4dd3e22e6c17c40dd0f34269662b10bd8610f19b0bc5b428d810c42a6" + "hash": "2eaf8ad72f65e8c4476c13e1c9b88967346df47c9cfddb6c9a7edcebcdb65304" } }, { @@ -4874,7 +4874,7 @@ }, "meta": { "archived": false, - "hash": "1f27b4d91e5f0141d4c2c712ac04d7633f759426e2703eba5627782e563b300d" + "hash": "f0ac72c245cd8a375c6838281de679f0bfbe4326277ef64bf36589eede9d82fe" } }, { @@ -4894,7 +4894,7 @@ }, "meta": { "archived": false, - "hash": "34e33d53f3671741d428581c1915599dca98524ee5dee0d45567e8b817ca28f4" + "hash": "523ed896411e3460f65347a417d12e1ec2c62cc0d97ae474d69927d12c01b4c8" } }, { @@ -4914,7 +4914,7 @@ }, "meta": { "archived": false, - "hash": "baf94ec265ffb8bd14950cb76022a483f6d6a0a1f840fea7774ac40db1fb237e" + "hash": "2fd54c9fc1fb5b0a981df69501b518d5830ea77544d4d5290c7cc13745ca00ea" } }, { @@ -4955,7 +4955,7 @@ }, "meta": { "archived": false, - "hash": "082d9c8f508ca5870d652e905bf9556d2ffa6681f5342edd807a596393ed6a3a" + "hash": "bf42670ada90c9ea2a790523ce7ea1f140523f5d47b0f06808c32e4f174906d8" } }, { @@ -4976,7 +4976,7 @@ }, "meta": { "archived": false, - "hash": "7f3ec1d135d7ab73d9f83d89e03945302dc08746037d132f7ce753f923c7e242" + "hash": "32cbb7ef4ab365f228c244ad3ad8b87d88ef08426807031dbd87b709c76c61d4" } }, { @@ -5060,7 +5060,7 @@ }, "meta": { "archived": false, - "hash": "93cd98db49ec69efe8565f94e1305b4ff7724eaccd9fa58a88ac6474c4f2e74e" + "hash": "b47ebe31470158288d2f5c1ff80fd72b2b5779442ff1b2732217c09adb976447" } }, { @@ -5102,7 +5102,7 @@ }, "meta": { "archived": false, - "hash": "b05cc00e600b631b56453969afe18d84e0ee7e27c523f22e00c7c81f5e9b6e84" + "hash": "dd7864be6b3d433e2a64999561cb152f012ccf2a611c5efa76e38cc2d72497e8" } }, { @@ -5143,7 +5143,7 @@ }, "meta": { "archived": false, - "hash": "acbcb526b3937b1d17e6736f361d8ed444311882f47b0895f3e966695bdde67a" + "hash": "682cce8b08b295ff61885b2fdf8595c93eb0bc0c83cc6fbae5c6c20727a60eff" } }, { @@ -5224,7 +5224,7 @@ }, "meta": { "archived": false, - "hash": "79bdd7bfbbea409c669eb2386d342e8badbd9f08fbfa13a941f94b4929833d50" + "hash": "f53bfbfd0d27c6eb15ead12de41caf5069a0e6d3645905baeb58896d32c2ff3a" } }, { @@ -5245,7 +5245,7 @@ }, "meta": { "archived": false, - "hash": "c2a9e0ec75d7c2268bf40bd02f7542d294fc2b273ac156e49968f6e77e6b3491" + "hash": "9116653208cf97e75bc4918bd4e22e647c88d1ed8a8b8772cc4813a5ab2ff9ed" } }, { @@ -5287,7 +5287,7 @@ }, "meta": { "archived": false, - "hash": "bfa5013d12b51262711b1b9b06e639d95aaeb0d3b535824e9c29c2c162ec68b0" + "hash": "d2f87b9fca9c7c5d90d95fb1e9865c7593a7dff9845296b690c7a7bf2a79d292" } }, { @@ -5371,7 +5371,7 @@ }, "meta": { "archived": false, - "hash": "48dcaf1f31d3e112630071392fcb9a8736f3bf198ac28c0683887ba1955d05cd" + "hash": "5adc748425d58db5bc6b547a393d46b5f1b99c6ec4f6c7006ed5038d9abf09d6" } }, { @@ -5392,7 +5392,7 @@ }, "meta": { "archived": false, - "hash": "63136a5f7c3ae51bea360baa0b2177f7c8cd5e83eabe48be531507e94ba6ac2a" + "hash": "1d748071f0dfc6d63b004336b2859d60d9084303257f34d7ac8e0b1ba17bb531" } }, { @@ -5414,7 +5414,7 @@ }, "meta": { "archived": false, - "hash": "36e338d577b307113b69192c9ee3a64a1fd50967270810dc5eb9f0710cfbbe29" + "hash": "158bb20051dc59ccd73a94ae416179c3499b70bc26003fb569f5b8d157266485" } }, { @@ -5435,7 +5435,7 @@ }, "meta": { "archived": false, - "hash": "3b00265cc1c52e964c97fa3b393ad3b4f9eb1c529839d77352582719a396d39c" + "hash": "e8cca852ff9566bae5b21e6b0cc53294d0f2c7e563236d0f4a5ef0b47fe69f2b" } }, { @@ -5457,7 +5457,7 @@ }, "meta": { "archived": false, - "hash": "66a8b09b9f50d22778c339a3e71242f802d98bd8ec56bdc2c56e9213c49f9f2b" + "hash": "390f014b69fe582d2273b46cb769f22b73f1aec240cf0d38458680ca9cc892e4" } }, { @@ -5477,7 +5477,7 @@ }, "meta": { "archived": false, - "hash": "fa5d75df025039e77d627019f675c6bb458d340716c44d9692298028750857be" + "hash": "b6f1f62e437bba475c89e0457c89e6bea4fb2521f421c27d4a11b9b55bf8a02d" } }, { @@ -5505,7 +5505,7 @@ "type": "snippet", "attributes": { "fileName": "stableSort.md", - "text": "Performs stable sorting of an array, preserving the initial indexes of items when their values are the same. \nDoes not mutate the original array, but returns a new array instead.\n\nUse `Array.prototype.map()` to pair each element of the input array with its corresponding index. \nUse `Array.prototype.sort()` and a `compare` function to sort the list, preserving their initial order if the items compared are equal.\nUse `Array.prototype.map()` to convert back to the initial array items.", + "text": "Performs stable sorting of an array, preserving the initial indexes of items when their values are the same.\nDoes not mutate the original array, but returns a new array instead.\n\nUse `Array.prototype.map()` to pair each element of the input array with its corresponding index.\nUse `Array.prototype.sort()` and a `compare` function to sort the list, preserving their initial order if the items compared are equal.\nUse `Array.prototype.map()` to convert back to the initial array items.", "codeBlocks": [ "const stableSort = (arr, compare) =>\n arr\n .map((item, index) => ({ item, index }))\n .sort((a, b) => compare(a.item, b.item) || a.index - b.index)\n .map(({ item }) => item);", "const arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\nconst stable = stableSort(arr, () => 0); // [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]" @@ -5519,7 +5519,7 @@ }, "meta": { "archived": false, - "hash": "517ae5281131d9360320c187499754b5e45a7251865cce556a7aa614671cd251" + "hash": "454a110a54555ac9abdd8e6512a04e15f707ac89f5bb08b9c4175f0dd777f486" } }, { @@ -5540,7 +5540,7 @@ }, "meta": { "archived": false, - "hash": "610461bbbe050f9ce1bbfbf58f4553bb465b1fd6a14059d9fa266492bb451eda" + "hash": "dd14903917fdf148409dd1ad440c2a1f098d3fe9a9d7742e72704d94e9d0f816" } }, { @@ -5561,7 +5561,7 @@ }, "meta": { "archived": false, - "hash": "46ef6d1d747d34b10276f4ac721c56b1fe9176d69da6437b942d3f2035a473b0" + "hash": "aa461317f9e5e0fac8a60d7513ecaeb9706c15ac2c7ad3fe9be397b9328b1b7e" } }, { @@ -5604,7 +5604,7 @@ }, "meta": { "archived": false, - "hash": "1f18c078a7be8d03ea320ae44b5216206c6fd59b0bd4606368c4752c38d4a09a" + "hash": "c19982a92698e82e05f0f903aeac184191a6371efc35459475bbf2177e64c6e9" } }, { @@ -5626,7 +5626,7 @@ }, "meta": { "archived": false, - "hash": "0ce76ed4d6b2e6da5027e3ae193467472d70c74c1399fcc48c53632cc61e3a29" + "hash": "59c447ac5984c9c7b632adc170e74168336faddbdea47df47e533d1d87a07cd5" } }, { @@ -5646,7 +5646,7 @@ }, "meta": { "archived": false, - "hash": "7eb9a2618de13c069bfecdd0a575a8fc2371bc82c416128e119f8d6c262e154d" + "hash": "b6d973cfe1e17ddc8a7dfb9f522d005520e9cb54e4ea89ee894ba9e70781cb0b" } }, { @@ -5667,7 +5667,7 @@ }, "meta": { "archived": false, - "hash": "476d7ee29bd0750a4c0f428c7e17a612ea50ee002eb865733f8d312b79a0c5a3" + "hash": "520bb2600d7d31d2dee3aa377986e8cc5b368fc9bb257c73255c9a295804f6a6" } }, { @@ -5688,7 +5688,7 @@ }, "meta": { "archived": false, - "hash": "f96bf0b07e98ad829a138e224fad50ceff771b4dd9beac6e10a553805fb33ead" + "hash": "8af295527bdf0a150d3e2f20eb7d07acca0d68a808f0bb622178576baa33128c" } }, { @@ -5709,7 +5709,7 @@ }, "meta": { "archived": false, - "hash": "7242f560cae759c6f157a3619ff7333f666bc3fbccf1d538aa2e3c39c5abc671" + "hash": "338cc5e1c426261c149a8431ac04040389550f11cf5afa77ffae32ad13be9256" } }, { @@ -5729,7 +5729,7 @@ }, "meta": { "archived": false, - "hash": "d51becdc0cd038245800933f698c5555bcef7660de1805231411a75883289f43" + "hash": "df81add854aa09b654d62fa7eab314aa8d272da24ed59e876fa75a4477db8737" } }, { @@ -5749,7 +5749,7 @@ }, "meta": { "archived": false, - "hash": "6400f64dd09e23349b302091c0bf6e01f8fe052e5c3d4bacf005c2ccfbb5184b" + "hash": "8e1123ba492a1103e2ac793c7febb0851905301dd190c453a253e23b05a27a6c" } }, { @@ -5769,7 +5769,7 @@ }, "meta": { "archived": false, - "hash": "7c1d00488af4859ff33f72472699f083036f936a84240cded84e3f18f2ff0916" + "hash": "30d3b8ac6dd36237d4b3221e3b9a8d6c1a097d2adefa52d694ee2d8733472159" } }, { @@ -5790,7 +5790,7 @@ }, "meta": { "archived": false, - "hash": "2abf3aa16fb21b9694ef54dbece79ab9c49e8e5292f6eac7d3815c1afd21e3b1" + "hash": "2b6b9c3c5e3e096c8b43ac7dfc389f8637e7eaf5cb77baea6e01f6506772fcc1" } }, { @@ -5811,7 +5811,7 @@ }, "meta": { "archived": false, - "hash": "9983a71a3b6930d02ef5508d3f0cce2107fc19ec4a16b10d68ef0ae634a932cc" + "hash": "ffaf357a96c9dca6e963ca5ec4c809b0012b92a551e0869f35c87fce5eabb95a" } }, { @@ -5831,7 +5831,7 @@ }, "meta": { "archived": false, - "hash": "87909289c906a7a48b2d2b11eb976c501ed903080b7a2a1d473d852d8dbc53ad" + "hash": "8969c61164ca8d6d23857fae9f7a757ee7a985038de3133c61942df0860965b1" } }, { @@ -5973,7 +5973,7 @@ }, "meta": { "archived": false, - "hash": "c7a62b55b5a90661bf3f9c956f075906439a50151a3aee4023ad8fe878cae2e6" + "hash": "8be24e169182d99f24ce5f0b5199fbe47450ff41037610b59fef3fd2fe1056cc" } }, { @@ -6097,7 +6097,7 @@ }, "meta": { "archived": false, - "hash": "8f844b53d1104ae0169235916fe2f1bcce82e4f2503b4009e842078e8611405c" + "hash": "57e917442bd3ef061d052ed219cfc4041abb5ab83c3caeda491c0fc7a9341fa0" } }, { @@ -6160,7 +6160,7 @@ }, "meta": { "archived": false, - "hash": "680b063587a145c90b3072bc7e775ebe93b5527ad3f91bba5e5b575811895b9c" + "hash": "3b948351bdd9e2246bb545e3533e85337e9104854f34da559237b62e59084cca" } }, { @@ -6201,7 +6201,7 @@ }, "meta": { "archived": false, - "hash": "7f7774fd60e664bf1d12c9ae36f498cf22d303ef72f51f8b8e2e2d7630bc4c61" + "hash": "c2b5d3567834f4bc3149676e7130e93e8349a9a0c76078a0f31ab9de5cc739ca" } }, { @@ -6222,7 +6222,7 @@ }, "meta": { "archived": false, - "hash": "15f1da1fe7a39443d4a3a09f7d43e3fb253f9b3dd9cea31d71599ce9a8609f8d" + "hash": "7caae7814b3cee1c6a312b563443a389bbc67843a78ca14221cdbeceffbdd4d2" } }, { @@ -6242,7 +6242,7 @@ }, "meta": { "archived": false, - "hash": "aee8b10b831e676337688628f9204cea2019a008c30005f0760432d86498fc3f" + "hash": "85dbe7ffa7a0dd1cc5e505ea54328de8f7a3c9809f3a051528bf4bc1cd87262d" } }, { @@ -6263,7 +6263,7 @@ }, "meta": { "archived": false, - "hash": "ccc6b2e5db6224ca96a835f8242e6a5934b99b011b62b69e7e10f7cb494c5593" + "hash": "f21e8aa2e101edce3f1dc6510ece098a51cc63a3fed4c0343d065bc96abdf3c8" } }, { @@ -6326,7 +6326,7 @@ }, "meta": { "archived": false, - "hash": "8fae842111490c84497f36491833532e4b03e838b79e08f01d1aa72d15c36d99" + "hash": "c43cbb8a7a57f3873fde6b1c2ff16744c2332fcbb1e107ff581faadf9a742075" } }, { @@ -6367,7 +6367,7 @@ }, "meta": { "archived": false, - "hash": "8640aeb79ced5defcc89555176a88acd66bca74f4359dc41388b5687f2050015" + "hash": "38bee97eef5e2918ce534d6f25ad2a8b40d4841c7a663d9a9a596dd4687ce5bc" } }, { @@ -6388,7 +6388,7 @@ }, "meta": { "archived": false, - "hash": "853887ad00b7c39a719c5b7e16dd3464a85f08da43d9d1bd1e7b7ebeaa897c95" + "hash": "cec8e5f01c8d00c246a12fabb43713a60da510f50c3d548f703f664936373096" } }, { @@ -6409,7 +6409,7 @@ }, "meta": { "archived": false, - "hash": "58712a3aee2c952a18d9f0d2f21d0002ac720d0d0f8fe082d02f891e3912bf1d" + "hash": "732b6077bcba350f004edeac5667d0d6d8403b2798e0860e5cd3d5a0c4578339" } }, { @@ -6430,7 +6430,7 @@ }, "meta": { "archived": false, - "hash": "152bde711895999ed98d4ee19cf6564b1a70a2ea358060ebdd3c1f8fbcfbf5d8" + "hash": "16729b1197484dd3a2b1ea4c860f297f5318e1d34831f8cb4f548d1486f51aca" } }, { @@ -6450,7 +6450,7 @@ }, "meta": { "archived": false, - "hash": "941c783ce75bd3bf53b13a5641d26f275c16dbbf87170ddea41d5b4570d4bf31" + "hash": "9d414805f29e1b49a6e93cba49fd38d9bc985ba0930394ffb0341665113353b4" } }, { @@ -6471,7 +6471,7 @@ }, "meta": { "archived": false, - "hash": "90e4fd44654dd3cc7ad2a78fc0aa28bbb57d4215f5b984a4265c12a47dfe1f81" + "hash": "fe3339dc49a247dabaa0ceca106f1393ea9731c05265f5cb45d5a3f0de09c7ae" } }, { @@ -6493,7 +6493,7 @@ }, "meta": { "archived": false, - "hash": "c1f6ed028c9da75a21b93485f56d04cf2f10a512998ebeaa44f33377ab42139b" + "hash": "cc0aa77cc2be8e663f52513e8dd2e5926a7d71dbda37967fdb50c223c3a0a5f9" } }, { @@ -6598,7 +6598,7 @@ }, "meta": { "archived": false, - "hash": "0f0a7a5960cb9b6523950d582434f55f63bc3cf4802d60aaf22a29f563d00549" + "hash": "3482e1802a239290ac1170fc1dcb57a2b1197877444c9cca8d6be60c96412e32" } }, { @@ -6619,7 +6619,7 @@ }, "meta": { "archived": false, - "hash": "e89bcf45e8a87a5e69462152727960e050cc3236f6e30cb26dc2a5bbb35cf32c" + "hash": "3e68caecbfce1d15160a60993a3270793a1573bda3c71a82fc0086fe48b17a0a" } }, { @@ -6640,7 +6640,7 @@ }, "meta": { "archived": false, - "hash": "1261dc9be854efaec6064c397b19fe09ec65f04002b63e057f25bf7afc33c398" + "hash": "e6d1da6add041592649c4c054de54a35516a8100d9bf8a4209ee0aa7e88f4550" } }, { @@ -6702,7 +6702,7 @@ }, "meta": { "archived": false, - "hash": "3d01158c9146610c3ae1661b0681fb46db677426e7d614cb7b8f295c8defbdfd" + "hash": "75f51c079a3b129de5ff1ca656422126cae7e4ded12a74038a0453efa0bfab96" } }, { diff --git a/snippet_data/snippetsArchive.json b/snippet_data/snippetsArchive.json index 3a3841154..471537905 100644 --- a/snippet_data/snippetsArchive.json +++ b/snippet_data/snippetsArchive.json @@ -14,7 +14,7 @@ }, "meta": { "archived": true, - "hash": "2e9aff504a7716c4b49b30702ee3b922c707fac70efc099422ae5ba5a7d0e009" + "hash": "1ec820569490b17af8315133226e1545efb1d842e4dada922c88126c342a2132" } }, { @@ -73,7 +73,7 @@ "type": "snippet", "attributes": { "fileName": "factors.md", - "text": "Returns the array of factors of the given `num`. \nIf the second argument is set to `true` returns only the prime factors of `num`.\nIf `num` is `1` or `0` returns an empty array.\nIf `num` is less than `0` returns all the factors of `-int` together with their additive inverses.\n\nUse `Array.from()`, `Array.prototype.map()` and `Array.prototype.filter()` to find all the factors of `num`.\nIf given `num` is negative, use `Array.prototype.reduce()` to add the additive inverses to the array.\nReturn all results if `primes` is `false`, else determine and return only the prime factors using `isPrime` and `Array.prototype.filter()`.\nOmit the second argument, `primes`, to return prime and non-prime factors by default.\n\n**Note**:- _Negative numbers are not considered prime._", + "text": "Returns the array of factors of the given `num`.\nIf the second argument is set to `true` returns only the prime factors of `num`.\nIf `num` is `1` or `0` returns an empty array.\nIf `num` is less than `0` returns all the factors of `-int` together with their additive inverses.\n\nUse `Array.from()`, `Array.prototype.map()` and `Array.prototype.filter()` to find all the factors of `num`.\nIf given `num` is negative, use `Array.prototype.reduce()` to add the additive inverses to the array.\nReturn all results if `primes` is `false`, else determine and return only the prime factors using `isPrime` and `Array.prototype.filter()`.\nOmit the second argument, `primes`, to return prime and non-prime factors by default.\n\n**Note**:- _Negative numbers are not considered prime._", "codeBlocks": [ "const factors = (num, primes = false) => {\n const isPrime = num => {\n const boundary = Math.floor(Math.sqrt(num));\n for (var i = 2; i <= boundary; i++) if (num % i === 0) return false;\n return num >= 2;\n };\n const isNeg = num < 0;\n num = isNeg ? -num : num;\n let array = Array.from({ length: num - 1 })\n .map((val, i) => (num % (i + 2) === 0 ? i + 2 : false))\n .filter(val => val);\n if (isNeg)\n array = array.reduce((acc, val) => {\n acc.push(val);\n acc.push(-val);\n return acc;\n }, []);\n return primes ? array.filter(isPrime) : array;\n};", "factors(12); // [2,3,4,6,12]\nfactors(12, true); // [2,3]\nfactors(-12); // [2, -2, 3, -3, 4, -4, 6, -6, 12, -12]\nfactors(-12, true); // [2,3]" @@ -82,7 +82,7 @@ }, "meta": { "archived": true, - "hash": "dcef8352bcfcbbd210467de2541b2d3b55c9c06b207c1253cf44ae8ea865559b" + "hash": "e0056bb031e8df0565daddb6200df1fa9675e2c538e71f354ceeeee164c2b8a9" } }, { @@ -116,7 +116,7 @@ }, "meta": { "archived": true, - "hash": "1c765ad82aedd1cc090d1c33498ce8426825ab5cb8a74882516ce07343f77f8d" + "hash": "9de50bed5b8c247176570f743c8154a5ec4093432f8a09ba91c423d78af47169" } }, { @@ -260,7 +260,7 @@ "type": "snippet", "attributes": { "fileName": "quickSort.md", - "text": "QuickSort an Array (ascending sort by default).\n\nUse recursion. \nUse `Array.prototype.filter` and spread operator (`...`) to create an array that all elements with values less than the pivot come before the pivot, and all elements with values greater than the pivot come after it. \nIf the parameter `desc` is truthy, return array sorts in descending order.", + "text": "QuickSort an Array (ascending sort by default).\n\nUse recursion.\nUse `Array.prototype.filter` and spread operator (`...`) to create an array that all elements with values less than the pivot come before the pivot, and all elements with values greater than the pivot come after it.\nIf the parameter `desc` is truthy, return array sorts in descending order.", "codeBlocks": [ "const quickSort = ([n, ...nums], desc) =>\n isNaN(n)\n ? []\n : [\n ...quickSort(nums.filter(v => (desc ? v > n : v <= n)), desc),\n n,\n ...quickSort(nums.filter(v => (!desc ? v > n : v <= n)), desc)\n ];", "quickSort([4, 1, 3, 2]); // [1,2,3,4]\nquickSort([4, 1, 3, 2], true); // [4,3,2,1]" @@ -269,7 +269,7 @@ }, "meta": { "archived": true, - "hash": "396d8fec22d42453b2556d4428fb35e7ef06b9844f7d6ad163923f292a96a6b5" + "hash": "5495d306c24323a8b16d5706180208f3828b043eb07d19014774cfe7f8c5b00e" } }, { @@ -322,7 +322,7 @@ }, "meta": { "archived": true, - "hash": "14c205af84a94bb26db5af2bd4b61a5169d48cc90e36e0aea4fae08d24a630c0" + "hash": "512b21ec623db482d6c0eefd0af6ce6787f86046d3a91320bedb91174a17120a" } }, { @@ -339,7 +339,7 @@ }, "meta": { "archived": true, - "hash": "5f3ccc861fd5a18aa561957aadb6494402c1b3bdc1ec38b768e524c600ac756b" + "hash": "62de33e07d133fc89d71a5091f3f350c007fc60a681e1211ee192b2fb58a2b82" } }, { @@ -356,7 +356,7 @@ }, "meta": { "archived": true, - "hash": "6b02ad139d3edcc41e767b6768cc53439c5316f5c14e00a4e2a56b2da102d1e9" + "hash": "89dc909e8dc0dfbfcafc60e99a3b895370fc20d1930b21717a8125db3777d6f1" } }, { diff --git a/test/testlog b/test/testlog index 69bf2c8bb..69042d678 100644 --- a/test/testlog +++ b/test/testlog @@ -3,740 +3,740 @@ # Starting... # 350 test suites found. -# PASS test/uniqueElements/uniqueElements.test.js +# PASS test/toSnakeCase/toSnakeCase.test.js -ok 1 — uniqueElements is a Function -ok 2 — uniqueElements([1, 2, 2, 3, 4, 4, 5]) returns [1,2,3,4,5] -ok 3 — uniqueElements([1, 23, 53]) returns [1, 23, 53] -ok 4 — uniqueElements([true, 0, 1, false, false, undefined, null, '']) returns [true, 0, 1, false, false, undefined, null, ''] -ok 5 — uniqueElements() returns [] -ok 6 — uniqueElements(null) returns [] -ok 7 — uniqueElements(undefined) returns [] -ok 8 — uniqueElements('strt') returns ['s', 't', 'r'] -ok 9 — uniqueElements(1, 1, 2543, 534, 5) throws an error -ok 10 — uniqueElements({}) throws an error -ok 11 — uniqueElements(true) throws an error -ok 12 — uniqueElements(false) throws an error -ok 13 — uniqueElements([true, 0, 1, false, false, undefined, null]) takes less than 2s to run - -# PASS test/average/average.test.js - -ok 14 — average is a Function -ok 15 — average(true) returns 0 -ok 16 — average(false) returns 1 -ok 17 — average(9, 1) returns 5 -ok 18 — average(153, 44, 55, 64, 71, 1122, 322774, 2232, 23423, 234, 3631) returns 32163.909090909092 -ok 19 — average(1, 2, 3) returns 2 -ok 20 — average(null) returns 0 -ok 21 — average(1, 2, 3) returns NaN -ok 22 — average(String) returns NaN -ok 23 — average({ a: 123}) returns NaN -ok 24 — average([undefined, 0, string]) returns NaN -ok 25 — average([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run - -# PASS test/is/is.test.js - -ok 26 — is is a Function -ok 27 — Works for arrays with data -ok 28 — Works for empty arrays -ok 29 — Works for arrays, not objects -ok 30 — Works for objects -ok 31 — Works for maps -ok 32 — Works for regular expressions -ok 33 — Works for sets -ok 34 — Works for weak maps -ok 35 — Works for weak sets -ok 36 — Works for strings - returns true for primitive -ok 37 — Works for strings - returns true when using constructor -ok 38 — Works for numbers - returns true for primitive -ok 39 — Works for numbers - returns true when using constructor -ok 40 — Works for booleans - returns true for primitive -ok 41 — Works for booleans - returns true when using constructor -ok 42 — Works for functions - -# PASS test/toSafeInteger/toSafeInteger.test.js - -ok 43 — toSafeInteger is a Function -ok 44 — Number(toSafeInteger(3.2)) is a number -ok 45 — Converts a value to a safe integer -ok 46 — toSafeInteger('4.2') returns 4 -ok 47 — toSafeInteger(4.6) returns 5 -ok 48 — toSafeInteger([]) returns 0 -ok 49 — isNaN(toSafeInteger([1.5, 3124])) is true -ok 50 — isNaN(toSafeInteger('string')) is true -ok 51 — isNaN(toSafeInteger({})) is true -ok 52 — isNaN(toSafeInteger()) is true -ok 53 — toSafeInteger(Infinity) returns 9007199254740991 -ok 54 — toSafeInteger(3.2) takes less than 2s to run +ok 1 — toSnakeCase is a Function +ok 2 — toSnakeCase('camelCase') returns camel_case +ok 3 — toSnakeCase('some text') returns some_text +ok 4 — toSnakeCase('some-mixed_string With spaces_underscores-and-hyphens') returns some_mixed_string_with_spaces_underscores_and_hyphens +ok 5 — toSnakeCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML') returns i_am_listening_to_fm_while_loading_different_url_on_my_browser_and_also_editing_some_xml_and_html +ok 6 — toSnakeCase() returns undefined +ok 7 — toSnakeCase([]) throws an error +ok 8 — toSnakeCase({}) throws an error +ok 9 — toSnakeCase(123) throws an error +ok 10 — toSnakeCase(IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML) takes less than 2s to run # PASS test/union/union.test.js -ok 55 — union is a Function -ok 56 — union([1, 2, 3], [4, 3, 2]) returns [1, 2, 3, 4] -ok 57 — union('str', 'asd') returns [ 's', 't', 'r', 'a', 'd' ] -ok 58 — union([[], {}], [1, 2, 3]) returns [[], {}, 1, 2, 3] -ok 59 — union([], []) returns [] -ok 60 — union() throws an error -ok 61 — union(true, 'str') throws an error -ok 62 — union('false', true) throws an error -ok 63 — union((123, {}) throws an error -ok 64 — union([], {}) throws an error -ok 65 — union(undefined, null) throws an error -ok 66 — union([1, 2, 3], [4, 3, 2]) takes less than 2s to run +ok 11 — union is a Function +ok 12 — union([1, 2, 3], [4, 3, 2]) returns [1, 2, 3, 4] +ok 13 — union('str', 'asd') returns [ 's', 't', 'r', 'a', 'd' ] +ok 14 — union([[], {}], [1, 2, 3]) returns [[], {}, 1, 2, 3] +ok 15 — union([], []) returns [] +ok 16 — union() throws an error +ok 17 — union(true, 'str') throws an error +ok 18 — union('false', true) throws an error +ok 19 — union((123, {}) throws an error +ok 20 — union([], {}) throws an error +ok 21 — union(undefined, null) throws an error +ok 22 — union([1, 2, 3], [4, 3, 2]) takes less than 2s to run -# PASS test/zipObject/zipObject.test.js +# PASS test/is/is.test.js -ok 67 — zipObject is a Function -ok 68 — zipObject([a, b, c], [1, 2]) returns {a: 1, b: 2, c: undefined} -ok 69 — zipObject([a, b], [1, 2, 3]) returns {a: 1, b: 2} -ok 70 — zipObject([a, b, c], string) returns { a: s, b: t, c: r } -ok 71 — zipObject([a], string) returns { a: s } -ok 72 — zipObject() throws an error -ok 73 — zipObject((['string'], null) throws an error -ok 74 — zipObject(null, [1]) throws an error -ok 75 — zipObject('string') throws an error -ok 76 — zipObject('test', 'string') throws an error - -# PASS test/chunk/chunk.test.js - -ok 77 — chunk is a Function -ok 78 — chunk([1, 2, 3, 4, 5], 2) returns [[1,2],[3,4],[5]] -ok 79 — chunk([]) returns [] -ok 80 — chunk(123) returns [] -ok 81 — chunk({ a: 123}) returns [] -ok 82 — chunk(string, 2) returns [ st, ri, ng ] -ok 83 — chunk() throws an error -ok 84 — chunk(undefined) throws an error -ok 85 — chunk(null) throws an error -ok 86 — chunk(This is a string, 2) takes less than 2s to run - -# PASS test/without/without.test.js - -ok 87 — without is a Function -ok 88 — without([2, 1, 2, 3], 1, 2) returns [3] -ok 89 — without([]) returns [] -ok 90 — without([3, 1, true, '3', true], '3', true) returns [3, 1] -ok 91 — without('string'.split(''), 's', 't', 'g') returns ['r', 'i', 'n'] -ok 92 — without() throws an error -ok 93 — without(null) throws an error -ok 94 — without(undefined) throws an error -ok 95 — without(123) throws an error -ok 96 — without({}) throws an error - -# PASS test/toSnakeCase/toSnakeCase.test.js - -ok 97 — toSnakeCase is a Function -ok 98 — toSnakeCase('camelCase') returns camel_case -ok 99 — toSnakeCase('some text') returns some_text -ok 100 — toSnakeCase('some-mixed_string With spaces_underscores-and-hyphens') returns some_mixed_string_with_spaces_underscores_and_hyphens -ok 101 — toSnakeCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML') returns i_am_listening_to_fm_while_loading_different_url_on_my_browser_and_also_editing_some_xml_and_html -ok 102 — toSnakeCase() returns undefined -ok 103 — toSnakeCase([]) throws an error -ok 104 — toSnakeCase({}) throws an error -ok 105 — toSnakeCase(123) throws an error -ok 106 — toSnakeCase(IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML) takes less than 2s to run - -# PASS test/isPrimitive/isPrimitive.test.js - -ok 107 — isPrimitive is a Function -ok 108 — isPrimitive(null) is primitive -ok 109 — isPrimitive(undefined) is primitive -ok 110 — isPrimitive(string) is primitive -ok 111 — isPrimitive(true) is primitive -ok 112 — isPrimitive(50) is primitive -ok 113 — isPrimitive('Hello') is primitive -ok 114 — isPrimitive(false) is primitive -ok 115 — isPrimitive(Symbol()) is primitive -ok 116 — isPrimitive([1, 2, 3]) is not primitive -ok 117 — isPrimitive({ a: 123 }) is not primitive -ok 118 — isPrimitive({ a: 123 }) takes less than 2s to run - -# PASS test/toKebabCase/toKebabCase.test.js - -ok 119 — toKebabCase is a Function -ok 120 — toKebabCase('camelCase') returns camel-case -ok 121 — toKebabCase('some text') returns some-text -ok 122 — toKebabCase('some-mixed-string With spaces-underscores-and-hyphens') returns some-mixed-string-with-spaces-underscores-and-hyphens -ok 123 — toKebabCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML') returns i-am-listening-to-fm-while-loading-different-url-on-my-browser-and-also-editing-some-xml-and-html -ok 124 — toKebabCase() returns undefined -ok 125 — toKebabCase([]) throws an erro -ok 126 — toKebabCase({}) throws an erro -ok 127 — toKebabCase(123) throws an erro -ok 128 — toKebabCase(IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML) takes less than 2s to run - -# PASS test/toCamelCase/toCamelCase.test.js - -ok 129 — toCamelCase is a Function -ok 130 — toCamelCase('some_database_field_name') returns someDatabaseFieldName -ok 131 — toCamelCase('Some label that needs to be camelized') returns someLabelThatNeedsToBeCamelized -ok 132 — toCamelCase('some-javascript-property') return someJavascriptProperty -ok 133 — toCamelCase('some-mixed_string with spaces_underscores-and-hyphens') returns someMixedStringWithSpacesUnderscoresAndHyphens -ok 134 — toCamelCase() throws a error -ok 135 — toCamelCase([]) throws a error -ok 136 — toCamelCase({}) throws a error -ok 137 — toCamelCase(123) throws a error -ok 138 — toCamelCase(some-mixed_string with spaces_underscores-and-hyphens) takes less than 2s to run - -# PASS test/validateNumber/validateNumber.test.js - -ok 139 — validateNumber is a Function -ok 140 — validateNumber(9) returns true -ok 141 — validateNumber(234asd.slice(0, 2)) returns true -ok 142 — validateNumber(1232) returns true -ok 143 — validateNumber(1232 + 13423) returns true -ok 144 — validateNumber(1232 * 2342 * 123) returns true -ok 145 — validateNumber(1232.23423536) returns true -ok 146 — validateNumber(234asd) returns false -ok 147 — validateNumber(e234d) returns false -ok 148 — validateNumber(false) returns false -ok 149 — validateNumber(true) returns false -ok 150 — validateNumber(null) returns false -ok 151 — validateNumber(123 * asd) returns false - -# PASS test/zip/zip.test.js - -ok 152 — zip is a Function -ok 153 — zip([a, b], [1, 2], [true, false]) returns [[a, 1, true], [b, 2, false]] -ok 154 — zip([a], [1, 2], [true, false]) returns [[a, 1, true], [undefined, 2, false]] -ok 155 — zip([]) returns [] -ok 156 — zip(123) returns [] -ok 157 — zip([a, b], [1, 2], [true, false]) returns an Array -ok 158 — zip([a], [1, 2], [true, false]) returns an Array -ok 159 — zip(null) throws an error -ok 160 — zip(undefined) throws an error - -# PASS test/randomIntArrayInRange/randomIntArrayInRange.test.js - -ok 161 — randomIntArrayInRange is a Function -ok 162 — The returned array contains only integers -ok 163 — The returned array has the proper length -ok 164 — The returned array's values lie between provided lowerLimit and upperLimit (both inclusive). - -# PASS test/uniqueElementsBy/uniqueElementsBy.test.js - -ok 165 — uniqueElementsBy is a Function -ok 166 — uniqueElementsBy works for properties -ok 167 — uniqueElementsBy works for nested properties - -# PASS test/all/all.test.js - -ok 168 — all is a Function -ok 169 — Returns true for arrays with no falsey values -ok 170 — Returns false for arrays with 0 -ok 171 — Returns false for arrays with NaN -ok 172 — Returns false for arrays with undefined -ok 173 — Returns false for arrays with null -ok 174 — Returns false for arrays with empty strings -ok 175 — Returns true with predicate function -ok 176 — Returns false with a predicate function - -# PASS test/offset/offset.test.js - -ok 177 — offset is a Function -ok 178 — Offset of 0 returns the same array. -ok 179 — Offset > 0 returns the offsetted array. -ok 180 — Offset < 0 returns the reverse offsetted array. -ok 181 — Offset greater than the length of the array returns the same array. -ok 182 — Offset less than the negative length of the array returns the same array. -ok 183 — Offsetting empty array returns an empty array. - -# PASS test/longestItem/longestItem.test.js - -ok 184 — longestItem is a Function -ok 185 — Returns the longest object from plain values -ok 186 — Returns the longest object from a spread array -ok 187 — Returns the longest object from mixed input -ok 188 — Returns the longest array -ok 189 — Returns the longest object when comparing arrays and strings -ok 190 — Returns undefined without any input -ok 191 — Returns first found of all similar -ok 192 — Throws TypeError if all inputs are undefined - -# PASS test/quickSort/quickSort.test.js - -ok 193 — quickSort is a Function -ok 194 — quickSort([5, 6, 4, 3, 1, 2]) returns [1, 2, 3, 4, 5, 6] -ok 195 — quickSort([-1, 0, -2]) returns [-2, -1, 0] -ok 196 — quickSort() throws an error -ok 197 — quickSort(123) throws an error -ok 198 — quickSort({ 234: string}) throws an error -ok 199 — quickSort(null) throws an error -ok 200 — quickSort(undefined) throws an error -ok 201 — 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 - -ok 202 — isSorted is a Function -ok 203 — Array is sorted in ascending order -ok 204 — Array is sorted in ascending order -ok 205 — Array is sorted in ascending order -ok 206 — Array is sorted in ascending order -ok 207 — Array is sorted in descending order -ok 208 — Array is sorted in descending order -ok 209 — Array is sorted in descending order -ok 210 — Array is sorted in descending order -ok 211 — Array is empty -ok 212 — Array is not sorted, direction changed in array -ok 213 — Array is not sorted, direction changed in array - -# PASS test/equals/equals.test.js - -ok 214 — equals is a Function -ok 215 — { a: [2, {e: 3}], b: [4], c: 'foo' } is equal to { a: [2, {e: 3}], b: [4], c: 'foo' } -ok 216 — [1,2,3] is equal to [1,2,3] -ok 217 — { a: [2, 3], b: [4] } is not equal to { a: [2, 3], b: [6] } -ok 218 — [1,2,3] is not equal to [1,2,4] -ok 219 — [1, 2, 3] should be equal to { 0: 1, 1: 2, 2: 3 }) - type is different, but their enumerable properties match. - -# PASS test/round/round.test.js - -ok 220 — round is a Function -ok 221 — round(1.005, 2) returns 1.01 -ok 222 — round(123.3423345345345345344, 11) returns 123.34233453453 -ok 223 — round(3.342, 11) returns 3.342 -ok 224 — round(1.005) returns 1 -ok 225 — round([1.005, 2]) returns NaN -ok 226 — round(string) returns NaN -ok 227 — round() returns NaN -ok 228 — round(132, 413, 4134) returns NaN -ok 229 — round({a: 132}, 413) returns NaN -ok 230 — round(123.3423345345345345344, 11) takes less than 2s to run - -# PASS test/words/words.test.js - -ok 231 — words is a Function -ok 232 — words('I love javaScript!!') returns [I, love, javaScript] -ok 233 — words('python, javaScript & coffee') returns [python, javaScript, coffee] -ok 234 — words(I love javaScript!!) returns an array -ok 235 — words() throws an error -ok 236 — words(null) throws an error -ok 237 — words(undefined) throws an error -ok 238 — words({}) throws an error -ok 239 — words([]) throws an error -ok 240 — words(1234) throws an error +ok 23 — is is a Function +ok 24 — Works for arrays with data +ok 25 — Works for empty arrays +ok 26 — Works for arrays, not objects +ok 27 — Works for objects +ok 28 — Works for maps +ok 29 — Works for regular expressions +ok 30 — Works for sets +ok 31 — Works for weak maps +ok 32 — Works for weak sets +ok 33 — Works for strings - returns true for primitive +ok 34 — Works for strings - returns true when using constructor +ok 35 — Works for numbers - returns true for primitive +ok 36 — Works for numbers - returns true when using constructor +ok 37 — Works for booleans - returns true for primitive +ok 38 — Works for booleans - returns true when using constructor +ok 39 — Works for functions # PASS test/yesNo/yesNo.test.js -ok 241 — yesNo is a Function -ok 242 — yesNo(Y) returns true -ok 243 — yesNo(yes) returns true -ok 244 — yesNo(foo, true) returns true -ok 245 — yesNo(No) returns false -ok 246 — yesNo() returns false -ok 247 — yesNo(null) returns false -ok 248 — yesNo(undefined) returns false -ok 249 — yesNo([123, null]) returns false -ok 250 — yesNo([Yes, No]) returns false -ok 251 — yesNo({ 2: Yes }) returns false -ok 252 — yesNo([Yes, No], true) returns true -ok 253 — yesNo({ 2: Yes }, true) returns true +ok 40 — yesNo is a Function +ok 41 — yesNo(Y) returns true +ok 42 — yesNo(yes) returns true +ok 43 — yesNo(foo, true) returns true +ok 44 — yesNo(No) returns false +ok 45 — yesNo() returns false +ok 46 — yesNo(null) returns false +ok 47 — yesNo(undefined) returns false +ok 48 — yesNo([123, null]) returns false +ok 49 — yesNo([Yes, No]) returns false +ok 50 — yesNo({ 2: Yes }) returns false +ok 51 — yesNo([Yes, No], true) returns true +ok 52 — yesNo({ 2: Yes }, true) returns true -# PASS test/uniqueElementsByRight/uniqueElementsByRight.test.js +# PASS test/uniqueElements/uniqueElements.test.js -ok 254 — uniqueElementsByRight is a Function -ok 255 — uniqueElementsByRight works for properties -ok 256 — uniqueElementsByRight works for nested properties +ok 53 — uniqueElements is a Function +ok 54 — uniqueElements([1, 2, 2, 3, 4, 4, 5]) returns [1,2,3,4,5] +ok 55 — uniqueElements([1, 23, 53]) returns [1, 23, 53] +ok 56 — uniqueElements([true, 0, 1, false, false, undefined, null, '']) returns [true, 0, 1, false, false, undefined, null, ''] +ok 57 — uniqueElements() returns [] +ok 58 — uniqueElements(null) returns [] +ok 59 — uniqueElements(undefined) returns [] +ok 60 — uniqueElements('strt') returns ['s', 't', 'r'] +ok 61 — uniqueElements(1, 1, 2543, 534, 5) throws an error +ok 62 — uniqueElements({}) throws an error +ok 63 — uniqueElements(true) throws an error +ok 64 — uniqueElements(false) throws an error +ok 65 — uniqueElements([true, 0, 1, false, false, undefined, null]) takes less than 2s to run -# PASS test/isEmpty/isEmpty.test.js +# PASS test/round/round.test.js -ok 257 — isEmpty is a Function -ok 258 — Returns true for empty Map -ok 259 — Returns true for empty Set -ok 260 — Returns true for empty array -ok 261 — Returns true for empty object -ok 262 — Returns true for empty string -ok 263 — Returns false for non-empty array -ok 264 — Returns false for non-empty object -ok 265 — Returns false for non-empty string -ok 266 — Returns true - type is not considered a collection -ok 267 — Returns true - type is not considered a collection +ok 66 — round is a Function +ok 67 — round(1.005, 2) returns 1.01 +ok 68 — round(123.3423345345345345344, 11) returns 123.34233453453 +ok 69 — round(3.342, 11) returns 3.342 +ok 70 — round(1.005) returns 1 +ok 71 — round([1.005, 2]) returns NaN +ok 72 — round(string) returns NaN +ok 73 — round() returns NaN +ok 74 — round(132, 413, 4134) returns NaN +ok 75 — round({a: 132}, 413) returns NaN +ok 76 — round(123.3423345345345345344, 11) takes less than 2s to run -# PASS test/pluralize/pluralize.test.js +# PASS test/toKebabCase/toKebabCase.test.js -ok 268 — pluralize is a Function -ok 269 — Produces the plural of the word -ok 270 — Produces the singular of the word -ok 271 — Produces the plural of the word -ok 272 — Prodices the defined plural of the word -ok 273 — Works with a dictionary +ok 77 — toKebabCase is a Function +ok 78 — toKebabCase('camelCase') returns camel-case +ok 79 — toKebabCase('some text') returns some-text +ok 80 — toKebabCase('some-mixed-string With spaces-underscores-and-hyphens') returns some-mixed-string-with-spaces-underscores-and-hyphens +ok 81 — toKebabCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML') returns i-am-listening-to-fm-while-loading-different-url-on-my-browser-and-also-editing-some-xml-and-html +ok 82 — toKebabCase() returns undefined +ok 83 — toKebabCase([]) throws an erro +ok 84 — toKebabCase({}) throws an erro +ok 85 — toKebabCase(123) throws an erro +ok 86 — toKebabCase(IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML) takes less than 2s to run -# PASS test/last/last.test.js +# PASS test/words/words.test.js -ok 274 — last is a Function -ok 275 — last({ a: 1234}) returns undefined -ok 276 — last([1, 2, 3]) returns 3 -ok 277 — last({ 0: false}) returns undefined -ok 278 — last(String) returns g -ok 279 — last(null) throws an Error -ok 280 — last(undefined) throws an Error -ok 281 — last() throws an Error -ok 282 — last([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run +ok 87 — words is a Function +ok 88 — words('I love javaScript!!') returns [I, love, javaScript] +ok 89 — words('python, javaScript & coffee') returns [python, javaScript, coffee] +ok 90 — words(I love javaScript!!) returns an array +ok 91 — words() throws an error +ok 92 — words(null) throws an error +ok 93 — words(undefined) throws an error +ok 94 — words({}) throws an error +ok 95 — words([]) throws an error +ok 96 — words(1234) throws an error -# PASS test/sampleSize/sampleSize.test.js +# PASS test/toSafeInteger/toSafeInteger.test.js -ok 283 — sampleSize is a Function -ok 284 — Returns a single element without n specified -ok 285 — Returns a random sample of specified size from an array -ok 286 — Returns all elements in an array if n >= length -ok 287 — Returns an empty array if original array is empty -ok 288 — Returns an empty array if n = 0 +ok 97 — toSafeInteger is a Function +ok 98 — Number(toSafeInteger(3.2)) is a number +ok 99 — Converts a value to a safe integer +ok 100 — toSafeInteger('4.2') returns 4 +ok 101 — toSafeInteger(4.6) returns 5 +ok 102 — toSafeInteger([]) returns 0 +ok 103 — isNaN(toSafeInteger([1.5, 3124])) is true +ok 104 — isNaN(toSafeInteger('string')) is true +ok 105 — isNaN(toSafeInteger({})) is true +ok 106 — isNaN(toSafeInteger()) is true +ok 107 — toSafeInteger(Infinity) returns 9007199254740991 +ok 108 — toSafeInteger(3.2) takes less than 2s to run -# PASS test/deepFreeze/deepFreeze.test.js +# PASS test/toCamelCase/toCamelCase.test.js -ok 289 — deepFreeze is a Function -ok 290 — modifying deeply freezed object prop throws an error in strict mode -ok 291 — should not modify deeply freezed object inside another object -ok 292 — should not add prop to deeply freezed empty object +ok 109 — toCamelCase is a Function +ok 110 — toCamelCase('some_database_field_name') returns someDatabaseFieldName +ok 111 — toCamelCase('Some label that needs to be camelized') returns someLabelThatNeedsToBeCamelized +ok 112 — toCamelCase('some-javascript-property') return someJavascriptProperty +ok 113 — toCamelCase('some-mixed_string with spaces_underscores-and-hyphens') returns someMixedStringWithSpacesUnderscoresAndHyphens +ok 114 — toCamelCase() throws a error +ok 115 — toCamelCase([]) throws a error +ok 116 — toCamelCase({}) throws a error +ok 117 — toCamelCase(123) throws a error +ok 118 — toCamelCase(some-mixed_string with spaces_underscores-and-hyphens) takes less than 2s to run -# PASS test/CSVToArray/CSVToArray.test.js +# PASS test/validateNumber/validateNumber.test.js -ok 293 — CSVToArray is a Function -ok 294 — CSVToArray works with default delimiter -ok 295 — CSVToArray works with custom delimiter -ok 296 — CSVToArray omits the first row -ok 297 — CSVToArray omits the first row and works with a custom delimiter +ok 119 — validateNumber is a Function +ok 120 — validateNumber(9) returns true +ok 121 — validateNumber(234asd.slice(0, 2)) returns true +ok 122 — validateNumber(1232) returns true +ok 123 — validateNumber(1232 + 13423) returns true +ok 124 — validateNumber(1232 * 2342 * 123) returns true +ok 125 — validateNumber(1232.23423536) returns true +ok 126 — validateNumber(234asd) returns false +ok 127 — validateNumber(e234d) returns false +ok 128 — validateNumber(false) returns false +ok 129 — validateNumber(true) returns false +ok 130 — validateNumber(null) returns false +ok 131 — validateNumber(123 * asd) returns false + +# PASS test/quickSort/quickSort.test.js + +ok 132 — quickSort is a Function +ok 133 — quickSort([5, 6, 4, 3, 1, 2]) returns [1, 2, 3, 4, 5, 6] +ok 134 — quickSort([-1, 0, -2]) returns [-2, -1, 0] +ok 135 — quickSort() throws an error +ok 136 — quickSort(123) throws an error +ok 137 — quickSort({ 234: string}) throws an error +ok 138 — quickSort(null) throws an error +ok 139 — quickSort(undefined) throws an error +ok 140 — quickSort([11, 1, 324, 23232, -1, 53, 2, 524, 32, 13, 156, 133, 62, 12, 4]) takes less than 2s to run + +# PASS test/average/average.test.js + +ok 141 — average is a Function +ok 142 — average(true) returns 0 +ok 143 — average(false) returns 1 +ok 144 — average(9, 1) returns 5 +ok 145 — average(153, 44, 55, 64, 71, 1122, 322774, 2232, 23423, 234, 3631) returns 32163.909090909092 +ok 146 — average(1, 2, 3) returns 2 +ok 147 — average(null) returns 0 +ok 148 — average(1, 2, 3) returns NaN +ok 149 — average(String) returns NaN +ok 150 — average({ a: 123}) returns NaN +ok 151 — average([undefined, 0, string]) returns NaN +ok 152 — average([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run + +# PASS test/longestItem/longestItem.test.js + +ok 153 — longestItem is a Function +ok 154 — Returns the longest object from plain values +ok 155 — Returns the longest object from a spread array +ok 156 — Returns the longest object from mixed input +ok 157 — Returns the longest array +ok 158 — Returns the longest object when comparing arrays and strings +ok 159 — Returns undefined without any input +ok 160 — Returns first found of all similar +ok 161 — Throws TypeError if all inputs are undefined + +# PASS test/chunk/chunk.test.js + +ok 162 — chunk is a Function +ok 163 — chunk([1, 2, 3, 4, 5], 2) returns [[1,2],[3,4],[5]] +ok 164 — chunk([]) returns [] +ok 165 — chunk(123) returns [] +ok 166 — chunk({ a: 123}) returns [] +ok 167 — chunk(string, 2) returns [ st, ri, ng ] +ok 168 — chunk() throws an error +ok 169 — chunk(undefined) throws an error +ok 170 — chunk(null) throws an error +ok 171 — chunk(This is a string, 2) takes less than 2s to run + +# PASS test/zipObject/zipObject.test.js + +ok 172 — zipObject is a Function +ok 173 — zipObject([a, b, c], [1, 2]) returns {a: 1, b: 2, c: undefined} +ok 174 — zipObject([a, b], [1, 2, 3]) returns {a: 1, b: 2} +ok 175 — zipObject([a, b, c], string) returns { a: s, b: t, c: r } +ok 176 — zipObject([a], string) returns { a: s } +ok 177 — zipObject() throws an error +ok 178 — zipObject((['string'], null) throws an error +ok 179 — zipObject(null, [1]) throws an error +ok 180 — zipObject('string') throws an error +ok 181 — zipObject('test', 'string') throws an error + +# PASS test/isPrimitive/isPrimitive.test.js + +ok 182 — isPrimitive is a Function +ok 183 — isPrimitive(null) is primitive +ok 184 — isPrimitive(undefined) is primitive +ok 185 — isPrimitive(string) is primitive +ok 186 — isPrimitive(true) is primitive +ok 187 — isPrimitive(50) is primitive +ok 188 — isPrimitive('Hello') is primitive +ok 189 — isPrimitive(false) is primitive +ok 190 — isPrimitive(Symbol()) is primitive +ok 191 — isPrimitive([1, 2, 3]) is not primitive +ok 192 — isPrimitive({ a: 123 }) is not primitive +ok 193 — isPrimitive({ a: 123 }) takes less than 2s to run + +# PASS test/isSorted/isSorted.test.js + +ok 194 — isSorted is a Function +ok 195 — Array is sorted in ascending order +ok 196 — Array is sorted in ascending order +ok 197 — Array is sorted in ascending order +ok 198 — Array is sorted in ascending order +ok 199 — Array is sorted in descending order +ok 200 — Array is sorted in descending order +ok 201 — Array is sorted in descending order +ok 202 — Array is sorted in descending order +ok 203 — Array is empty +ok 204 — Array is not sorted, direction changed in array +ok 205 — Array is not sorted, direction changed in array # PASS test/filterNonUniqueBy/filterNonUniqueBy.test.js -ok 298 — filterNonUniqueBy is a Function -ok 299 — filterNonUniqueBy works for properties -ok 300 — filterNonUniqueBy works for nested properties +ok 206 — filterNonUniqueBy is a Function +ok 207 — filterNonUniqueBy works for properties +ok 208 — filterNonUniqueBy works for nested properties + +# PASS test/offset/offset.test.js + +ok 209 — offset is a Function +ok 210 — Offset of 0 returns the same array. +ok 211 — Offset > 0 returns the offsetted array. +ok 212 — Offset < 0 returns the reverse offsetted array. +ok 213 — Offset greater than the length of the array returns the same array. +ok 214 — Offset less than the negative length of the array returns the same array. +ok 215 — Offsetting empty array returns an empty array. # PASS test/head/head.test.js -ok 301 — head is a Function -ok 302 — head({ a: 1234}) returns undefined -ok 303 — head([1, 2, 3]) returns 1 -ok 304 — head({ 0: false}) returns false -ok 305 — head(String) returns S -ok 306 — head(null) throws an Error -ok 307 — head(undefined) throws an Error -ok 308 — head() throws an Error -ok 309 — head([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run +ok 216 — head is a Function +ok 217 — head({ a: 1234}) returns undefined +ok 218 — head([1, 2, 3]) returns 1 +ok 219 — head({ 0: false}) returns false +ok 220 — head(String) returns S +ok 221 — head(null) throws an Error +ok 222 — head(undefined) throws an Error +ok 223 — head() throws an Error +ok 224 — head([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run + +# PASS test/uniqueElementsBy/uniqueElementsBy.test.js + +ok 225 — uniqueElementsBy is a Function +ok 226 — uniqueElementsBy works for properties +ok 227 — uniqueElementsBy works for nested properties + +# PASS test/isEmpty/isEmpty.test.js + +ok 228 — isEmpty is a Function +ok 229 — Returns true for empty Map +ok 230 — Returns true for empty Set +ok 231 — Returns true for empty array +ok 232 — Returns true for empty object +ok 233 — Returns true for empty string +ok 234 — Returns false for non-empty array +ok 235 — Returns false for non-empty object +ok 236 — Returns false for non-empty string +ok 237 — Returns true - type is not considered a collection +ok 238 — Returns true - type is not considered a collection + +# PASS test/last/last.test.js + +ok 239 — last is a Function +ok 240 — last({ a: 1234}) returns undefined +ok 241 — last([1, 2, 3]) returns 3 +ok 242 — last({ 0: false}) returns undefined +ok 243 — last(String) returns g +ok 244 — last(null) throws an Error +ok 245 — last(undefined) throws an Error +ok 246 — last() throws an Error +ok 247 — last([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run + +# PASS test/without/without.test.js + +ok 248 — without is a Function +ok 249 — without([2, 1, 2, 3], 1, 2) returns [3] +ok 250 — without([]) returns [] +ok 251 — without([3, 1, true, '3', true], '3', true) returns [3, 1] +ok 252 — without('string'.split(''), 's', 't', 'g') returns ['r', 'i', 'n'] +ok 253 — without() throws an error +ok 254 — without(null) throws an error +ok 255 — without(undefined) throws an error +ok 256 — without(123) throws an error +ok 257 — without({}) throws an error + +# PASS test/uniqueElementsByRight/uniqueElementsByRight.test.js + +ok 258 — uniqueElementsByRight is a Function +ok 259 — uniqueElementsByRight works for properties +ok 260 — uniqueElementsByRight works for nested properties + +# PASS test/zip/zip.test.js + +ok 261 — zip is a Function +ok 262 — zip([a, b], [1, 2], [true, false]) returns [[a, 1, true], [b, 2, false]] +ok 263 — zip([a], [1, 2], [true, false]) returns [[a, 1, true], [undefined, 2, false]] +ok 264 — zip([]) returns [] +ok 265 — zip(123) returns [] +ok 266 — zip([a, b], [1, 2], [true, false]) returns an Array +ok 267 — zip([a], [1, 2], [true, false]) returns an Array +ok 268 — zip(null) throws an error +ok 269 — zip(undefined) throws an error + +# PASS test/equals/equals.test.js + +ok 270 — equals is a Function +ok 271 — { a: [2, {e: 3}], b: [4], c: 'foo' } is equal to { a: [2, {e: 3}], b: [4], c: 'foo' } +ok 272 — [1,2,3] is equal to [1,2,3] +ok 273 — { a: [2, 3], b: [4] } is not equal to { a: [2, 3], b: [6] } +ok 274 — [1,2,3] is not equal to [1,2,4] +ok 275 — [1, 2, 3] should be equal to { 0: 1, 1: 2, 2: 3 }) - type is different, but their enumerable properties match. + +# PASS test/randomIntArrayInRange/randomIntArrayInRange.test.js + +ok 276 — randomIntArrayInRange is a Function +ok 277 — The returned array contains only integers +ok 278 — The returned array has the proper length +ok 279 — The returned array's values lie between provided lowerLimit and upperLimit (both inclusive). # PASS test/allEqual/allEqual.test.js -ok 310 — allEqual is a Function -ok 311 — Truthy numbers -ok 312 — Falsy numbers -ok 313 — Truthy strings -ok 314 — Falsy numbers -ok 315 — Truthy trues -ok 316 — Truthy falses -ok 317 — Falsy trues -ok 318 — Falsy falses +ok 280 — allEqual is a Function +ok 281 — Truthy numbers +ok 282 — Falsy numbers +ok 283 — Truthy strings +ok 284 — Falsy numbers +ok 285 — Truthy trues +ok 286 — Truthy falses +ok 287 — Falsy trues +ok 288 — Falsy falses + +# PASS test/all/all.test.js + +ok 289 — all is a Function +ok 290 — Returns true for arrays with no falsey values +ok 291 — Returns false for arrays with 0 +ok 292 — Returns false for arrays with NaN +ok 293 — Returns false for arrays with undefined +ok 294 — Returns false for arrays with null +ok 295 — Returns false for arrays with empty strings +ok 296 — Returns true with predicate function +ok 297 — Returns false with a predicate function + +# PASS test/CSVToArray/CSVToArray.test.js + +ok 298 — CSVToArray is a Function +ok 299 — CSVToArray works with default delimiter +ok 300 — CSVToArray works with custom delimiter +ok 301 — CSVToArray omits the first row +ok 302 — CSVToArray omits the first row and works with a custom delimiter # PASS test/randomIntegerInRange/randomIntegerInRange.test.js -ok 319 — randomIntegerInRange is a Function -ok 320 — The returned value is an integer -ok 321 — The returned value lies between provided lowerLimit and upperLimit (both inclusive). +ok 303 — randomIntegerInRange is a Function +ok 304 — The returned value is an integer +ok 305 — The returned value lies between provided lowerLimit and upperLimit (both inclusive). + +# PASS test/pluralize/pluralize.test.js + +ok 306 — pluralize is a Function +ok 307 — Produces the plural of the word +ok 308 — Produces the singular of the word +ok 309 — Produces the plural of the word +ok 310 — Prodices the defined plural of the word +ok 311 — Works with a dictionary + +# PASS test/sampleSize/sampleSize.test.js + +ok 312 — sampleSize is a Function +ok 313 — Returns a single element without n specified +ok 314 — Returns a random sample of specified size from an array +ok 315 — Returns all elements in an array if n >= length +ok 316 — Returns an empty array if original array is empty +ok 317 — Returns an empty array if n = 0 # PASS test/orderBy/orderBy.test.js -ok 322 — orderBy is a Function -ok 323 — Returns a sorted array of objects ordered by properties and orders. -ok 324 — Returns a sorted array of objects ordered by properties and orders. - -# PASS test/randomNumberInRange/randomNumberInRange.test.js - -ok 325 — randomNumberInRange is a Function -ok 326 — The returned value is a number -ok 327 — The returned value lies between provided lowerLimit and upperLimit (both inclusive). +ok 318 — orderBy is a Function +ok 319 — Returns a sorted array of objects ordered by properties and orders. +ok 320 — Returns a sorted array of objects ordered by properties and orders. # PASS test/initializeArrayWithRange/initializeArrayWithRange.test.js -ok 328 — initializeArrayWithRange is a Function -ok 329 — Initializes an array containing the numbers in the specified range (witout start value) -ok 330 — Initializes an array containing the numbers in the specified range -ok 331 — Initializes an array containing the numbers in the specified range (with step) - -# PASS test/geometricProgression/geometricProgression.test.js - -ok 332 — geometricProgression is a Function -ok 333 — Initializes an array containing the numbers in the specified range -ok 334 — Initializes an array containing the numbers in the specified range -ok 335 — Initializes an array containing the numbers in the specified range - -# PASS test/toCurrency/toCurrency.test.js - -ok 336 — toCurrency is a Function -ok 337 — currency: Euro | currencyLangFormat: Local -ok 338 — currency: US Dollar | currencyLangFormat: English (United States) -ok 339 — currency: Japanese Yen | currencyLangFormat: Local - -# PASS test/join/join.test.js - -ok 340 — join is a Function -ok 341 — Joins all elements of an array into a string and returns this string -ok 342 — Joins all elements of an array into a string and returns this string -ok 343 — Joins all elements of an array into a string and returns this string - -# PASS test/mapObject/mapObject.test.js - -ok 344 — mapObject is a Function -ok 345 — mapObject([1, 2, 3], a => a * a) returns { 1: 1, 2: 4, 3: 9 } -ok 346 — mapObject([1, 2, 3, 4], (a, b) => b - a) returns { 1: -1, 2: -1, 3: -1, 4: -1 } -ok 347 — mapObject([1, 2, 3, 4], (a, b) => a - b) returns { 1: 1, 2: 1, 3: 1, 4: 1 } - -# PASS test/dig/dig.test.js - -ok 348 — dig is a Function -ok 349 — Dig target success -ok 350 — Dig target with falsey value -ok 351 — Dig target with array -ok 352 — Unknown target return undefined - -# PASS test/reduceWhich/reduceWhich.test.js - -ok 353 — reduceWhich is a Function -ok 354 — Returns the minimum of an array -ok 355 — Returns the maximum of an array -ok 356 — Returns the object with the minimum specified value in an array - -# PASS test/mapString/mapString.test.js - -ok 357 — mapString is a Function -ok 358 — mapString returns a capitalized string -ok 359 — mapString can deal with indexes -ok 360 — mapString can deal with the full string +ok 321 — initializeArrayWithRange is a Function +ok 322 — Initializes an array containing the numbers in the specified range (witout start value) +ok 323 — Initializes an array containing the numbers in the specified range +ok 324 — Initializes an array containing the numbers in the specified range (with step) # PASS test/any/any.test.js -ok 361 — any is a Function -ok 362 — Returns true for arrays with at least one truthy value -ok 363 — Returns false for arrays with no truthy values -ok 364 — Returns false for arrays with no truthy values -ok 365 — Returns true with predicate function -ok 366 — Returns false with a predicate function +ok 325 — any is a Function +ok 326 — Returns true for arrays with at least one truthy value +ok 327 — Returns false for arrays with no truthy values +ok 328 — Returns false for arrays with no truthy values +ok 329 — Returns true with predicate function +ok 330 — Returns false with a predicate function -# PASS test/invertKeyValues/invertKeyValues.test.js +# PASS test/deepFreeze/deepFreeze.test.js -ok 367 — invertKeyValues is a Function -ok 368 — invertKeyValues({ a: 1, b: 2, c: 1 }) returns { 1: [ 'a', 'c' ], 2: [ 'b' ] } -ok 369 — invertKeyValues({ a: 1, b: 2, c: 1 }, value => 'group' + value) returns { group1: [ 'a', 'c' ], group2: [ 'b' ] } +ok 331 — deepFreeze is a Function +ok 332 — modifying deeply freezed object prop throws an error in strict mode +ok 333 — should not modify deeply freezed object inside another object +ok 334 — should not add prop to deeply freezed empty object + +# PASS test/randomNumberInRange/randomNumberInRange.test.js + +ok 335 — randomNumberInRange is a Function +ok 336 — The returned value is a number +ok 337 — The returned value lies between provided lowerLimit and upperLimit (both inclusive). + +# PASS test/toCurrency/toCurrency.test.js + +ok 338 — toCurrency is a Function +ok 339 — currency: Euro | currencyLangFormat: Local +ok 340 — currency: US Dollar | currencyLangFormat: English (United States) +ok 341 — currency: Japanese Yen | currencyLangFormat: Local + +# PASS test/geometricProgression/geometricProgression.test.js + +ok 342 — geometricProgression is a Function +ok 343 — Initializes an array containing the numbers in the specified range +ok 344 — Initializes an array containing the numbers in the specified range +ok 345 — Initializes an array containing the numbers in the specified range + +# PASS test/join/join.test.js + +ok 346 — join is a Function +ok 347 — Joins all elements of an array into a string and returns this string +ok 348 — Joins all elements of an array into a string and returns this string +ok 349 — Joins all elements of an array into a string and returns this string + +# PASS test/mapString/mapString.test.js + +ok 350 — mapString is a Function +ok 351 — mapString returns a capitalized string +ok 352 — mapString can deal with indexes +ok 353 — mapString can deal with the full string # PASS test/binomialCoefficient/binomialCoefficient.test.js -ok 370 — binomialCoefficient is a Function -ok 371 — Returns the appropriate value -ok 372 — Returns the appropriate value -ok 373 — Returns the appropriate value -ok 374 — Returns NaN -ok 375 — Returns NaN +ok 354 — binomialCoefficient is a Function +ok 355 — Returns the appropriate value +ok 356 — Returns the appropriate value +ok 357 — Returns the appropriate value +ok 358 — Returns NaN +ok 359 — Returns NaN -# PASS test/fromCamelCase/fromCamelCase.test.js +# PASS test/mapObject/mapObject.test.js -ok 376 — fromCamelCase is a Function -ok 377 — Converts a string from camelcase -ok 378 — Converts a string from camelcase -ok 379 — Converts a string from camelcase +ok 360 — mapObject is a Function +ok 361 — mapObject([1, 2, 3], a => a * a) returns { 1: 1, 2: 4, 3: 9 } +ok 362 — mapObject([1, 2, 3, 4], (a, b) => b - a) returns { 1: -1, 2: -1, 3: -1, 4: -1 } +ok 363 — mapObject([1, 2, 3, 4], (a, b) => a - b) returns { 1: 1, 2: 1, 3: 1, 4: 1 } + +# PASS test/invertKeyValues/invertKeyValues.test.js + +ok 364 — invertKeyValues is a Function +ok 365 — invertKeyValues({ a: 1, b: 2, c: 1 }) returns { 1: [ 'a', 'c' ], 2: [ 'b' ] } +ok 366 — invertKeyValues({ a: 1, b: 2, c: 1 }, value => 'group' + value) returns { group1: [ 'a', 'c' ], group2: [ 'b' ] } + +# PASS test/dig/dig.test.js + +ok 367 — dig is a Function +ok 368 — Dig target success +ok 369 — Dig target with falsey value +ok 370 — Dig target with array +ok 371 — Unknown target return undefined + +# PASS test/reduceWhich/reduceWhich.test.js + +ok 372 — reduceWhich is a Function +ok 373 — Returns the minimum of an array +ok 374 — Returns the maximum of an array +ok 375 — Returns the object with the minimum specified value in an array # PASS test/approximatelyEqual/approximatelyEqual.test.js -ok 380 — approximatelyEqual is a Function -ok 381 — Works for PI / 2 -ok 382 — Works for 0.1 + 0.2 === 0.3 -ok 383 — Works for exactly equal values -ok 384 — Works for a custom epsilon +ok 376 — approximatelyEqual is a Function +ok 377 — Works for PI / 2 +ok 378 — Works for 0.1 + 0.2 === 0.3 +ok 379 — Works for exactly equal values +ok 380 — Works for a custom epsilon -# PASS test/none/none.test.js +# PASS test/fromCamelCase/fromCamelCase.test.js -ok 385 — none is a Function -ok 386 — Returns true for arrays with no truthy values -ok 387 — Returns false for arrays with at least one truthy value -ok 388 — Returns true with a predicate function -ok 389 — Returns false with predicate function - -# PASS test/shank/shank.test.js - -ok 390 — shank is a Function -ok 391 — Returns an array with the added elements. -ok 392 — Returns an array with the removed elements. -ok 393 — Does not mutate the original array +ok 381 — fromCamelCase is a Function +ok 382 — Converts a string from camelcase +ok 383 — Converts a string from camelcase +ok 384 — Converts a string from camelcase # PASS test/castArray/castArray.test.js -ok 394 — castArray is a Function -ok 395 — Works for single values -ok 396 — Works for arrays with one value -ok 397 — Works for arrays with multiple value -ok 398 — Works for strings -ok 399 — Works for objects +ok 385 — castArray is a Function +ok 386 — Works for single values +ok 387 — Works for arrays with one value +ok 388 — Works for arrays with multiple value +ok 389 — Works for strings +ok 390 — Works for objects -# PASS test/randomHexColorCode/randomHexColorCode.test.js +# PASS test/none/none.test.js -ok 400 — randomHexColorCode is a Function -ok 401 — randomHexColorCode has to proper length -ok 402 — The color code starts with "#" -ok 403 — The color code contains only valid hex-digits - -# PASS test/factorial/factorial.test.js - -ok 404 — factorial is a Function -ok 405 — Calculates the factorial of 720 -ok 406 — Calculates the factorial of 0 -ok 407 — Calculates the factorial of 1 -ok 408 — Calculates the factorial of 4 -ok 409 — Calculates the factorial of 10 - -# PASS test/binarySearch/binarySearch.test.js - -ok 410 — binarySearch is a Function -ok 411 — Finds item in array -ok 412 — Returns -1 when not found -ok 413 — Works with empty arrays -ok 414 — Works for one element arrays +ok 391 — none is a Function +ok 392 — Returns true for arrays with no truthy values +ok 393 — Returns false for arrays with at least one truthy value +ok 394 — Returns true with a predicate function +ok 395 — Returns false with predicate function # PASS test/inRange/inRange.test.js -ok 415 — inRange is a Function -ok 416 — The given number falls within the given range -ok 417 — The given number falls within the given range -ok 418 — The given number does not falls within the given range -ok 419 — The given number does not falls within the given range +ok 396 — inRange is a Function +ok 397 — The given number falls within the given range +ok 398 — The given number falls within the given range +ok 399 — The given number does not falls within the given range +ok 400 — The given number does not falls within the given range + +# PASS test/shank/shank.test.js + +ok 401 — shank is a Function +ok 402 — Returns an array with the added elements. +ok 403 — Returns an array with the removed elements. +ok 404 — Does not mutate the original array # PASS test/mask/mask.test.js -ok 420 — mask is a Function -ok 421 — Replaces all but the last num of characters with the specified mask character -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 405 — mask is a Function +ok 406 — Replaces all but the last num of characters with the specified mask character +ok 407 — Replaces all but the last num of characters with the specified mask character +ok 408 — Replaces all but the last num of characters with the specified mask character -# PASS test/capitalize/capitalize.test.js +# PASS test/randomHexColorCode/randomHexColorCode.test.js -ok 424 — capitalize is a Function -ok 425 — Capitalizes the first letter of a string -ok 426 — Capitalizes the first letter of a string -ok 427 — Works with characters -ok 428 — "Works with single character words +ok 409 — randomHexColorCode is a Function +ok 410 — randomHexColorCode has to proper length +ok 411 — The color code starts with "#" +ok 412 — The color code contains only valid hex-digits -# PASS test/converge/converge.test.js +# PASS test/binarySearch/binarySearch.test.js -ok 429 — converge is a Function -ok 430 — Produces the average of the array -ok 431 — Produces the strange concatenation - -# PASS test/JSONtoCSV/JSONtoCSV.test.js - -ok 432 — JSONtoCSV is a Function -ok 433 — JSONtoCSV works with default delimiter -ok 434 — JSONtoCSV works with custom delimiter +ok 413 — binarySearch is a Function +ok 414 — Finds item in array +ok 415 — Returns -1 when not found +ok 416 — Works with empty arrays +ok 417 — Works for one element arrays # PASS test/toOrdinalSuffix/toOrdinalSuffix.test.js -ok 435 — toOrdinalSuffix is a Function -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 -ok 439 — Adds an ordinal suffix to a number +ok 418 — toOrdinalSuffix is a Function +ok 419 — Adds an ordinal suffix to a number +ok 420 — Adds an ordinal suffix to a number +ok 421 — Adds an ordinal suffix to a number +ok 422 — Adds an ordinal suffix to a number + +# PASS test/factorial/factorial.test.js + +ok 423 — factorial is a Function +ok 424 — Calculates the factorial of 720 +ok 425 — Calculates the factorial of 0 +ok 426 — Calculates the factorial of 1 +ok 427 — Calculates the factorial of 4 +ok 428 — Calculates the factorial of 10 + +# PASS test/JSONtoCSV/JSONtoCSV.test.js + +ok 429 — JSONtoCSV is a Function +ok 430 — JSONtoCSV works with default delimiter +ok 431 — JSONtoCSV works with custom delimiter + +# PASS test/capitalize/capitalize.test.js + +ok 432 — capitalize is a Function +ok 433 — Capitalizes the first letter of a string +ok 434 — Capitalizes the first letter of a string +ok 435 — Works with characters +ok 436 — "Works with single character words # PASS test/isAnagram/isAnagram.test.js -ok 440 — isAnagram is a Function -ok 441 — Checks valid anagram -ok 442 — Works with spaces -ok 443 — Ignores case -ok 444 — Ignores special characters +ok 437 — isAnagram is a Function +ok 438 — Checks valid anagram +ok 439 — Works with spaces +ok 440 — Ignores case +ok 441 — Ignores special characters -# PASS test/deepClone/deepClone.test.js +# PASS test/converge/converge.test.js -ok 445 — deepClone is a Function -ok 446 — Shallow cloning works -ok 447 — Deep cloning works -ok 448 — Array shallow cloning works -ok 449 — Array deep cloning works - -# PASS test/isString/isString.test.js - -ok 450 — isString is a Function -ok 451 — foo is a string -ok 452 — "10" is a string -ok 453 — Empty string is a string -ok 454 — 10 is not a string -ok 455 — true is not string - -# PASS test/shuffle/shuffle.test.js - -ok 456 — shuffle is a Function -ok 457 — Shuffles the array -ok 458 — New array contains all original elements -ok 459 — Works for empty arrays -ok 460 — Works for single-element arrays +ok 442 — converge is a Function +ok 443 — Produces the average of the array +ok 444 — Produces the strange concatenation # PASS test/tomorrow/tomorrow.test.js -ok 461 — tomorrow is a Function -ok 462 — Returns the correct year -ok 463 — Returns the correct month -ok 464 — Returns the correct date +ok 445 — tomorrow is a Function +ok 446 — Returns the correct year +ok 447 — Returns the correct month +ok 448 — Returns the correct date -# PASS test/stringPermutations/stringPermutations.test.js +# PASS test/deepClone/deepClone.test.js -ok 465 — stringPermutations is a Function -ok 466 — Generates all stringPermutations of a string -ok 467 — Works for single-letter strings -ok 468 — Works for empty strings - -# PASS test/dropRight/dropRight.test.js - -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 +ok 449 — deepClone is a Function +ok 450 — Shallow cloning works +ok 451 — Deep cloning works +ok 452 — Array shallow cloning works +ok 453 — Array deep cloning works # PASS test/prettyBytes/prettyBytes.test.js -ok 473 — prettyBytes is a Function -ok 474 — Converts a number in bytes to a human-readable string. -ok 475 — Converts a number in bytes to a human-readable string. -ok 476 — Converts a number in bytes to a human-readable string. +ok 454 — prettyBytes is a Function +ok 455 — Converts a number in bytes to a human-readable string. +ok 456 — Converts a number in bytes to a human-readable string. +ok 457 — Converts a number in bytes to a human-readable string. -# PASS test/hexToRGB/hexToRGB.test.js +# PASS test/isString/isString.test.js -ok 477 — hexToRGB is a Function -ok 478 — Converts a color code to a rgb() or rgba() string -ok 479 — Converts a color code to a rgb() or rgba() string -ok 480 — Converts a color code to a rgb() or rgba() string +ok 458 — isString is a Function +ok 459 — foo is a string +ok 460 — "10" is a string +ok 461 — Empty string is a string +ok 462 — 10 is not a string +ok 463 — true is not string + +# PASS test/dropRight/dropRight.test.js + +ok 464 — dropRight is a Function +ok 465 — Returns a new array with n elements removed from the right +ok 466 — Returns a new array with n elements removed from the right +ok 467 — Returns a new array with n elements removed from the right + +# PASS test/shuffle/shuffle.test.js + +ok 468 — shuffle is a Function +ok 469 — Shuffles the array +ok 470 — New array contains all original elements +ok 471 — Works for empty arrays +ok 472 — Works for single-element arrays + +# PASS test/stringPermutations/stringPermutations.test.js + +ok 473 — stringPermutations is a Function +ok 474 — Generates all stringPermutations of a string +ok 475 — Works for single-letter strings +ok 476 — Works for empty strings # PASS test/partition/partition.test.js -ok 481 — partition is a Function -ok 482 — Groups the elements into two arrays, depending on the provided function's truthiness for each element. - -# PASS test/formatDuration/formatDuration.test.js - -ok 483 — formatDuration is a Function -ok 484 — Returns the human readable format of the given number of milliseconds -ok 485 — Returns the human readable format of the given number of milliseconds +ok 477 — partition is a Function +ok 478 — Groups the elements into two arrays, depending on the provided function's truthiness for each element. # PASS test/isObjectLike/isObjectLike.test.js -ok 486 — isObjectLike is a Function -ok 487 — Returns true for an object -ok 488 — Returns true for an array -ok 489 — Returns false for a function -ok 490 — Returns false for null +ok 479 — isObjectLike is a Function +ok 480 — Returns true for an object +ok 481 — Returns true for an array +ok 482 — Returns false for a function +ok 483 — Returns false for null # PASS test/capitalizeEveryWord/capitalizeEveryWord.test.js -ok 491 — capitalizeEveryWord is a Function -ok 492 — Capitalizes the first letter of every word in a string -ok 493 — Works with characters -ok 494 — Works with one word string +ok 484 — capitalizeEveryWord is a Function +ok 485 — Capitalizes the first letter of every word in a string +ok 486 — Works with characters +ok 487 — Works with one word string -# PASS test/untildify/untildify.test.js +# PASS test/formatDuration/formatDuration.test.js -ok 495 — untildify is a Function -ok 496 — Contains no tildes -ok 497 — Does not alter the rest of the path -ok 498 — Does not alter paths without tildes +ok 488 — formatDuration is a Function +ok 489 — Returns the human readable format of the given number of milliseconds +ok 490 — Returns the human readable format of the given number of milliseconds + +# PASS test/hexToRGB/hexToRGB.test.js + +ok 491 — hexToRGB is a Function +ok 492 — Converts a color code to a rgb() or rgba() string +ok 493 — Converts a color code to a rgb() or rgba() string +ok 494 — Converts a color code to a rgb() or rgba() string # PASS test/standardDeviation/standardDeviation.test.js -ok 499 — standardDeviation is a Function -ok 500 — Returns the standard deviation of an array of numbers -ok 501 — Returns the standard deviation of an array of numbers +ok 495 — standardDeviation is a Function +ok 496 — Returns the standard deviation of an array of numbers +ok 497 — Returns the standard deviation of an array of numbers + +# PASS test/untildify/untildify.test.js + +ok 498 — untildify is a Function +ok 499 — Contains no tildes +ok 500 — Does not alter the rest of the path +ok 501 — Does not alter paths without tildes # PASS test/isObject/isObject.test.js @@ -746,61 +746,61 @@ ok 504 — isObject([]) is a object ok 505 — isObject({ a:1 }) is a object ok 506 — isObject(true) is not a object +# PASS test/URLJoin/URLJoin.test.js + +ok 507 — URLJoin is a Function +ok 508 — Returns proper URL +ok 509 — Returns proper URL + # PASS test/sumPower/sumPower.test.js -ok 507 — sumPower is a Function -ok 508 — Returns the sum of the powers of all the numbers from start to end -ok 509 — Returns the sum of the powers of all the numbers from start to end -ok 510 — Returns the sum of the powers of all the numbers from start to end +ok 510 — sumPower is a Function +ok 511 — Returns the sum of the powers of all the numbers from start to end +ok 512 — Returns the sum of the powers of all the numbers from start to end +ok 513 — Returns the sum of the powers of all the numbers from start to end # PASS test/reducedFilter/reducedFilter.test.js -ok 511 — reducedFilter is a Function -ok 512 — Filter an array of objects based on a condition while also filtering out unspecified keys. +ok 514 — reducedFilter is a Function +ok 515 — Filter an array of objects based on a condition while also filtering out unspecified keys. # PASS test/CSVToJSON/CSVToJSON.test.js -ok 513 — CSVToJSON is a Function -ok 514 — CSVToJSON works with default delimiter -ok 515 — CSVToJSON works with custom delimiter - -# PASS test/URLJoin/URLJoin.test.js - -ok 516 — URLJoin is a Function -ok 517 — Returns proper URL -ok 518 — Returns proper URL - -# PASS test/byteSize/byteSize.test.js - -ok 519 — byteSize is a Function -ok 520 — Works for a single letter -ok 521 — Works for a common string -ok 522 — Works for emoji - -# PASS test/unzip/unzip.test.js - -ok 523 — unzip is a Function -ok 524 — unzip([['a', 1, true], ['b', 2, false]]) equals [['a','b'], [1, 2], [true, false]] -ok 525 — unzip([['a', 1, true], ['b', 2]]) equals [['a','b'], [1, 2], [true]] - -# PASS test/sortedIndex/sortedIndex.test.js - -ok 526 — sortedIndex is a Function -ok 527 — Returns the lowest index at which value should be inserted into array in order to maintain its sort order. -ok 528 — Returns the lowest index at which value should be inserted into array in order to maintain its sort order. +ok 516 — CSVToJSON is a Function +ok 517 — CSVToJSON works with default delimiter +ok 518 — CSVToJSON works with custom delimiter # PASS test/isAbsoluteURL/isAbsoluteURL.test.js -ok 529 — isAbsoluteURL is a Function -ok 530 — Given string is an absolute URL -ok 531 — Given string is an absolute URL -ok 532 — Given string is not an absolute URL +ok 519 — isAbsoluteURL is a Function +ok 520 — Given string is an absolute URL +ok 521 — Given string is an absolute URL +ok 522 — Given string is not an absolute URL + +# PASS test/byteSize/byteSize.test.js + +ok 523 — byteSize is a Function +ok 524 — Works for a single letter +ok 525 — Works for a common string +ok 526 — Works for emoji # PASS test/uniqueSymmetricDifference/uniqueSymmetricDifference.test.js -ok 533 — uniqueSymmetricDifference is a Function -ok 534 — Returns the symmetric difference between two arrays. -ok 535 — Does not return duplicates from one array +ok 527 — uniqueSymmetricDifference is a Function +ok 528 — Returns the symmetric difference between two arrays. +ok 529 — Does not return duplicates from one array + +# PASS test/sortedIndex/sortedIndex.test.js + +ok 530 — sortedIndex is a Function +ok 531 — Returns the lowest index at which value should be inserted into array in order to maintain its sort order. +ok 532 — Returns the lowest index at which value should be inserted into array in order to maintain its sort order. + +# PASS test/unzip/unzip.test.js + +ok 533 — unzip is a Function +ok 534 — unzip([['a', 1, true], ['b', 2, false]]) equals [['a','b'], [1, 2], [true, false]] +ok 535 — unzip([['a', 1, true], ['b', 2]]) equals [['a','b'], [1, 2], [true]] # PASS test/matches/matches.test.js @@ -808,17 +808,17 @@ ok 536 — matches is a Function ok 537 — Matches returns true for two similar objects ok 538 — Matches returns false for two non-similar objects -# PASS test/isValidJSON/isValidJSON.test.js - -ok 539 — isValidJSON is a Function -ok 540 — {"name":"Adam","age":20} is a valid JSON -ok 541 — {"name":"Adam",age:"20"} is not a valid JSON -ok 542 — null is a valid JSON - # PASS test/collectInto/collectInto.test.js -ok 543 — collectInto is a Function -ok 544 — Works with multiple promises +ok 539 — collectInto is a Function +ok 540 — Works with multiple promises + +# PASS test/isValidJSON/isValidJSON.test.js + +ok 541 — isValidJSON is a Function +ok 542 — {"name":"Adam","age":20} is a valid JSON +ok 543 — {"name":"Adam",age:"20"} is not a valid JSON +ok 544 — null is a valid JSON # PASS test/uncurry/uncurry.test.js @@ -827,18 +827,18 @@ ok 546 — Works without a provided value for n ok 547 — Works with n = 2 ok 548 — Works with n = 3 -# PASS test/pad/pad.test.js - -ok 549 — pad is a Function -ok 550 — cat is padded on both sides -ok 551 — length of string is 8 -ok 552 — pads 42 with "0" -ok 553 — does not truncates if string exceeds length - # PASS test/symmetricDifferenceWith/symmetricDifferenceWith.test.js -ok 554 — symmetricDifferenceWith is a Function -ok 555 — Returns the symmetric difference between two arrays, using a provided function as a comparator +ok 549 — symmetricDifferenceWith is a Function +ok 550 — Returns the symmetric difference between two arrays, using a provided function as a comparator + +# PASS test/pad/pad.test.js + +ok 551 — pad is a Function +ok 552 — cat is padded on both sides +ok 553 — length of string is 8 +ok 554 — pads 42 with "0" +ok 555 — does not truncates if string exceeds length # PASS test/functionName/functionName.test.js @@ -859,52 +859,52 @@ ok 563 — lowercaseKeys is a Function ok 564 — Lowercases object keys ok 565 — Does not mutate original object -# PASS test/matchesWith/matchesWith.test.js +# PASS test/collatz/collatz.test.js -ok 566 — matchesWith is a Function -ok 567 — Returns true for two objects with similar values, based on the provided function +ok 566 — collatz is a Function +ok 567 — When n is even, divide by 2 +ok 568 — When n is odd, times by 3 and add 1 +ok 569 — Eventually reaches 1 # PASS test/reject/reject.test.js -ok 568 — reject is a Function -ok 569 — Works with numbers -ok 570 — Works with strings +ok 570 — reject is a Function +ok 571 — Works with numbers +ok 572 — Works with strings -# PASS test/symmetricDifference/symmetricDifference.test.js +# PASS test/matchesWith/matchesWith.test.js -ok 571 — symmetricDifference is a Function -ok 572 — Returns the symmetric difference between two arrays. -ok 573 — Returns duplicates from one array - -# PASS test/collatz/collatz.test.js - -ok 574 — collatz is a Function -ok 575 — When n is even, divide by 2 -ok 576 — When n is odd, times by 3 and add 1 -ok 577 — Eventually reaches 1 +ok 573 — matchesWith is a Function +ok 574 — Returns true for two objects with similar values, based on the provided function # PASS test/UUIDGeneratorNode/UUIDGeneratorNode.test.js -ok 578 — UUIDGeneratorNode is a Function -ok 579 — Contains dashes in the proper places -ok 580 — Only contains hexadecimal digits +ok 575 — UUIDGeneratorNode is a Function +ok 576 — Contains dashes in the proper places +ok 577 — Only contains hexadecimal digits + +# PASS test/symmetricDifference/symmetricDifference.test.js + +ok 578 — symmetricDifference is a Function +ok 579 — Returns the symmetric difference between two arrays. +ok 580 — Returns duplicates from one array # PASS test/intersectionWith/intersectionWith.test.js ok 581 — intersectionWith is a Function ok 582 — Returns a list of elements that exist in both arrays, using a provided comparator function -# PASS test/luhnCheck/luhnCheck.test.js - -ok 583 — luhnCheck is a Function -ok 584 — validates identification number -ok 585 — validates identification number -ok 586 — validates identification number - # PASS test/pipeAsyncFunctions/pipeAsyncFunctions.test.js -ok 587 — pipeAsyncFunctions is a Function -ok 588 — pipeAsyncFunctions result should be 15 +ok 583 — pipeAsyncFunctions is a Function +ok 584 — pipeAsyncFunctions result should be 15 + +# PASS test/luhnCheck/luhnCheck.test.js + +ok 585 — luhnCheck is a Function +ok 586 — validates identification number +ok 587 — validates identification number +ok 588 — validates identification number # PASS test/nthArg/nthArg.test.js @@ -919,84 +919,84 @@ ok 593 — flattenObject is a Function ok 594 — Flattens an object with the paths for keys ok 595 — Works with arrays -# PASS test/drop/drop.test.js - -ok 596 — drop is a Function -ok 597 — Works without the last argument -ok 598 — Removes appropriate element count as specified -ok 599 — Empties array given a count greater than length - # PASS test/sample/sample.test.js -ok 600 — sample is a Function -ok 601 — Returns a random element from the array -ok 602 — Works for single-element arrays -ok 603 — Returns undefined for empty array +ok 596 — sample is a Function +ok 597 — Returns a random element from the array +ok 598 — Works for single-element arrays +ok 599 — Returns undefined for empty array -# PASS test/differenceBy/differenceBy.test.js +# PASS test/drop/drop.test.js -ok 604 — differenceBy is a Function -ok 605 — Works using a native function and numbers -ok 606 — Works with arrow function and objects +ok 600 — drop is a Function +ok 601 — Works without the last argument +ok 602 — Removes appropriate element count as specified +ok 603 — Empties array given a count greater than length # PASS test/functions/functions.test.js -ok 607 — functions is a Function -ok 608 — Returns own methods -ok 609 — Returns own and inherited methods +ok 604 — functions is a Function +ok 605 — Returns own methods +ok 606 — Returns own and inherited methods -# PASS test/renameKeys/renameKeys.test.js +# PASS test/differenceBy/differenceBy.test.js -ok 610 — renameKeys is a Function -ok 611 — renameKeys is a Function +ok 607 — differenceBy is a Function +ok 608 — Works using a native function and numbers +ok 609 — Works with arrow function and objects # PASS test/isLowerCase/isLowerCase.test.js -ok 612 — isLowerCase is a Function -ok 613 — passed string is a lowercase -ok 614 — passed string is a lowercase -ok 615 — passed value is not a lowercase +ok 610 — isLowerCase is a Function +ok 611 — passed string is a lowercase +ok 612 — passed string is a lowercase +ok 613 — passed value is not a lowercase # PASS test/memoize/memoize.test.js -ok 616 — memoize is a Function -ok 617 — Function works properly -ok 618 — Function works properly -ok 619 — Cache stores values +ok 614 — memoize is a Function +ok 615 — Function works properly +ok 616 — Function works properly +ok 617 — Cache stores values -# PASS test/bindKey/bindKey.test.js +# PASS test/renameKeys/renameKeys.test.js -ok 620 — bindKey is a Function -ok 621 — Binds function to an object context - -# PASS test/elo/elo.test.js - -ok 622 — elo is a Function -ok 623 — Standard 1v1s -ok 624 — Standard 1v1s -ok 625 — 4 player FFA, all same rank +ok 618 — renameKeys is a Function +ok 619 — renameKeys is a Function # PASS test/averageBy/averageBy.test.js -ok 626 — averageBy is a Function -ok 627 — Produces the right result with a function -ok 628 — Produces the right result with a property name +ok 620 — averageBy is a Function +ok 621 — Produces the right result with a function +ok 622 — Produces the right result with a property name # PASS test/symmetricDifferenceBy/symmetricDifferenceBy.test.js -ok 629 — symmetricDifferenceBy is a Function -ok 630 — Returns the symmetric difference between two arrays, after applying the provided function to each array element of both +ok 623 — symmetricDifferenceBy is a Function +ok 624 — 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 631 — arrayToCSV is a Function -ok 632 — arrayToCSV works with default delimiter -ok 633 — arrayToCSV works with custom delimiter +ok 625 — bindKey is a Function +ok 626 — Binds function to an object context + +# PASS test/isPromiseLike/isPromiseLike.test.js + +ok 627 — isPromiseLike is a Function +ok 628 — Returns true for a promise-like object +ok 629 — Returns false for an empty object # PASS test/findLastKey/findLastKey.test.js -ok 634 — findLastKey is a Function -ok 635 — eturns the appropriate key +ok 630 — findLastKey is a Function +ok 631 — eturns the appropriate key + +# PASS test/elo/elo.test.js + +ok 632 — elo is a Function +ok 633 — Standard 1v1s +ok 634 — Standard 1v1s +ok 635 — 4 player FFA, all same rank # PASS test/isArrayLike/isArrayLike.test.js @@ -1005,57 +1005,57 @@ ok 637 — Returns true for a string ok 638 — Returns true for an array ok 639 — Returns false for null -# PASS test/isPromiseLike/isPromiseLike.test.js +# PASS test/arrayToCSV/arrayToCSV.test.js -ok 640 — isPromiseLike is a Function -ok 641 — Returns true for a promise-like object -ok 642 — Returns false for an empty object - -# PASS test/isUpperCase/isUpperCase.test.js - -ok 643 — isUpperCase is a Function -ok 644 — ABC is all upper case -ok 645 — abc is not all upper case -ok 646 — A3@$ is all uppercase - -# PASS test/promisify/promisify.test.js - -ok 647 — promisify is a Function -ok 648 — Returns a promise -ok 649 — Runs the function provided +ok 640 — arrayToCSV is a Function +ok 641 — arrayToCSV works with default delimiter +ok 642 — arrayToCSV works with custom delimiter # PASS test/truthCheckCollection/truthCheckCollection.test.js -ok 650 — truthCheckCollection is a Function -ok 651 — second argument is truthy on all elements of a collection +ok 643 — truthCheckCollection is a Function +ok 644 — second argument is truthy on all elements of a collection -# PASS test/pullAtValue/pullAtValue.test.js +# PASS test/isUpperCase/isUpperCase.test.js -ok 652 — pullAtValue is a Function -ok 653 — Pulls the specified values -ok 654 — Pulls the specified values +ok 645 — isUpperCase is a Function +ok 646 — ABC is all upper case +ok 647 — abc is not all upper case +ok 648 — A3@$ is all uppercase + +# PASS test/promisify/promisify.test.js + +ok 649 — promisify is a Function +ok 650 — Returns a promise +ok 651 — Runs the function provided # PASS test/maxBy/maxBy.test.js -ok 655 — maxBy is a Function -ok 656 — Produces the right result with a function -ok 657 — Produces the right result with a property name +ok 652 — maxBy is a Function +ok 653 — Produces the right result with a function +ok 654 — Produces the right result with a property name # PASS test/minBy/minBy.test.js -ok 658 — minBy is a Function -ok 659 — Produces the right result with a function -ok 660 — Produces the right result with a property name +ok 655 — minBy is a Function +ok 656 — Produces the right result with a function +ok 657 — Produces the right result with a property name -# PASS test/findKey/findKey.test.js +# PASS test/pullAtValue/pullAtValue.test.js -ok 661 — findKey is a Function -ok 662 — Returns the appropriate key +ok 658 — pullAtValue is a Function +ok 659 — Pulls the specified values +ok 660 — Pulls the specified values # PASS test/unzipWith/unzipWith.test.js -ok 663 — unzipWith is a Function -ok 664 — unzipWith([[1, 10, 100], [2, 20, 200]], (...args) => args.reduce((acc, v) => acc + v, 0)) equals [3, 30, 300] +ok 661 — unzipWith is a Function +ok 662 — 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 663 — findKey is a Function +ok 664 — Returns the appropriate key # PASS test/indentString/indentString.test.js @@ -1063,1059 +1063,1059 @@ ok 665 — indentString is a Function ok 666 — indentString is a Function ok 667 — indentString is a Function -# PASS test/runPromisesInSeries/runPromisesInSeries.test.js - -ok 668 — runPromisesInSeries is a Function -ok 669 — Runs promises in series - -# PASS test/isNil/isNil.test.js - -ok 670 — isNil is a Function -ok 671 — Returns true for null -ok 672 — Returns true for undefined -ok 673 — Returns false for an empty string - -# PASS test/pullAtIndex/pullAtIndex.test.js - -ok 674 — pullAtIndex is a Function -ok 675 — Pulls the given values -ok 676 — Pulls the given values - -# PASS test/getURLParameters/getURLParameters.test.js - -ok 677 — getURLParameters is a Function -ok 678 — Returns an object containing the parameters of the current URL - -# PASS test/isPlainObject/isPlainObject.test.js - -ok 679 — isPlainObject is a Function -ok 680 — Returns true for a plain object -ok 681 — Returns false for a Map (example of non-plain object) - # PASS test/merge/merge.test.js -ok 682 — merge is a Function -ok 683 — Merges two objects - -# PASS test/takeRight/takeRight.test.js - -ok 684 — takeRight is a Function -ok 685 — Returns an array with n elements removed from the end -ok 686 — Returns an array with n elements removed from the end +ok 668 — merge is a Function +ok 669 — Merges two objects # PASS test/bind/bind.test.js -ok 687 — bind is a Function -ok 688 — Binds to an object context +ok 670 — bind is a Function +ok 671 — Binds to an object context -# PASS test/transform/transform.test.js +# PASS test/takeRight/takeRight.test.js -ok 689 — transform is a Function -ok 690 — Transforms an object - -# PASS test/pipeFunctions/pipeFunctions.test.js - -ok 691 — pipeFunctions is a Function -ok 692 — Performs left-to-right function composition - -# PASS test/intersectionBy/intersectionBy.test.js - -ok 693 — intersectionBy is a Function -ok 694 — Returns a list of elements that exist in both arrays, after applying the provided function to each array element of both - -# PASS test/isTravisCI/isTravisCI.test.js - -ok 695 — isTravisCI is a Function -ok 696 — Running on Travis, correctly evaluates +ok 672 — takeRight is a Function +ok 673 — Returns an array with n elements removed from the end +ok 674 — Returns an array with n elements removed from the end # PASS test/coalesceFactory/coalesceFactory.test.js -ok 697 — coalesceFactory is a Function -ok 698 — Returns a customized coalesce function +ok 675 — coalesceFactory is a Function +ok 676 — Returns a customized coalesce function -# PASS test/gcd/gcd.test.js +# PASS test/pullAtIndex/pullAtIndex.test.js -ok 699 — gcd is a Function -ok 700 — Calculates the greatest common divisor between two or more numbers/arrays -ok 701 — Calculates the greatest common divisor between two or more numbers/arrays +ok 677 — pullAtIndex is a Function +ok 678 — Pulls the given values +ok 679 — Pulls the given values -# PASS test/reduceSuccessive/reduceSuccessive.test.js +# PASS test/getURLParameters/getURLParameters.test.js -ok 702 — reduceSuccessive is a Function -ok 703 — Returns the array of successively reduced values - -# PASS test/extendHex/extendHex.test.js - -ok 704 — extendHex is a Function -ok 705 — Extends a 3-digit color code to a 6-digit color code -ok 706 — Extends a 3-digit color code to a 6-digit color code - -# PASS test/take/take.test.js - -ok 707 — take is a Function -ok 708 — Returns an array with n elements removed from the beginning. -ok 709 — Returns an array with n elements removed from the beginning. - -# PASS test/decapitalize/decapitalize.test.js - -ok 710 — decapitalize is a Function -ok 711 — Works with default parameter -ok 712 — Works with second parameter set to true - -# PASS test/indexOfAll/indexOfAll.test.js - -ok 713 — indexOfAll is a Function -ok 714 — Returns all indices of val in an array -ok 715 — Returns all indices of val in an array - -# PASS test/spreadOver/spreadOver.test.js - -ok 716 — spreadOver is a Function -ok 717 — Takes a variadic function and returns a closure that accepts an array of arguments to map to the inputs of the function. - -# PASS test/shallowClone/shallowClone.test.js - -ok 718 — shallowClone is a Function -ok 719 — Shallow cloning works -ok 720 — Does not clone deeply +ok 680 — getURLParameters is a Function +ok 681 — Returns an object containing the parameters of the current URL # PASS test/overArgs/overArgs.test.js -ok 721 — overArgs is a Function -ok 722 — Invokes the provided function with its arguments transformed - -# PASS test/chainAsync/chainAsync.test.js - -ok 723 — chainAsync is a Function -ok 724 — Calls all functions in an array +ok 682 — overArgs is a Function +ok 683 — Invokes the provided function with its arguments transformed # PASS test/cleanObj/cleanObj.test.js -ok 725 — cleanObj is a Function -ok 726 — Removes any properties except the ones specified from a JSON object +ok 684 — cleanObj is a Function +ok 685 — Removes any properties except the ones specified from a JSON object -# PASS test/countBy/countBy.test.js +# PASS test/pipeFunctions/pipeFunctions.test.js -ok 727 — countBy is a Function -ok 728 — Works for functions -ok 729 — Works for property names +ok 686 — pipeFunctions is a Function +ok 687 — Performs left-to-right function composition + +# PASS test/spreadOver/spreadOver.test.js + +ok 688 — spreadOver is a Function +ok 689 — Takes a variadic function and returns a closure that accepts an array of arguments to map to the inputs of the function. # PASS test/partialRight/partialRight.test.js -ok 730 — partialRight is a Function -ok 731 — Appends arguments +ok 690 — partialRight is a Function +ok 691 — Appends arguments + +# PASS test/intersectionBy/intersectionBy.test.js + +ok 692 — intersectionBy is a Function +ok 693 — Returns a list of elements that exist in both arrays, after applying the provided function to each array element of both + +# PASS test/extendHex/extendHex.test.js + +ok 694 — extendHex is a Function +ok 695 — Extends a 3-digit color code to a 6-digit color code +ok 696 — Extends a 3-digit color code to a 6-digit color code + +# PASS test/decapitalize/decapitalize.test.js + +ok 697 — decapitalize is a Function +ok 698 — Works with default parameter +ok 699 — Works with second parameter set to true + +# PASS test/isTravisCI/isTravisCI.test.js + +ok 700 — isTravisCI is a Function +ok 701 — Running on Travis, correctly evaluates + +# PASS test/shallowClone/shallowClone.test.js + +ok 702 — shallowClone is a Function +ok 703 — Shallow cloning works +ok 704 — Does not clone deeply + +# PASS test/isPlainObject/isPlainObject.test.js + +ok 705 — isPlainObject is a Function +ok 706 — Returns true for a plain object +ok 707 — Returns false for a Map (example of non-plain object) + +# PASS test/gcd/gcd.test.js + +ok 708 — gcd is a Function +ok 709 — Calculates the greatest common divisor between two or more numbers/arrays +ok 710 — Calculates the greatest common divisor between two or more numbers/arrays + +# PASS test/reduceSuccessive/reduceSuccessive.test.js + +ok 711 — reduceSuccessive is a Function +ok 712 — Returns the array of successively reduced values # PASS test/nthElement/nthElement.test.js -ok 732 — nthElement is a Function -ok 733 — Returns the nth element of an array. -ok 734 — Returns the nth element of an array. +ok 713 — nthElement is a Function +ok 714 — Returns the nth element of an array. +ok 715 — Returns the nth element of an array. + +# PASS test/take/take.test.js + +ok 716 — take is a Function +ok 717 — Returns an array with n elements removed from the beginning. +ok 718 — Returns an array with n elements removed from the beginning. + +# PASS test/indexOfAll/indexOfAll.test.js + +ok 719 — indexOfAll is a Function +ok 720 — Returns all indices of val in an array +ok 721 — Returns all indices of val in an array + +# PASS test/runPromisesInSeries/runPromisesInSeries.test.js + +ok 722 — runPromisesInSeries is a Function +ok 723 — Runs promises in series + +# PASS test/chainAsync/chainAsync.test.js + +ok 724 — chainAsync is a Function +ok 725 — Calls all functions in an array + +# PASS test/countBy/countBy.test.js + +ok 726 — countBy is a Function +ok 727 — Works for functions +ok 728 — Works for property names + +# PASS test/isNil/isNil.test.js + +ok 729 — isNil is a Function +ok 730 — Returns true for null +ok 731 — Returns true for undefined +ok 732 — Returns false for an empty string + +# PASS test/transform/transform.test.js + +ok 733 — transform is a Function +ok 734 — Transforms an object # PASS test/hashNode/hashNode.test.js ok 735 — hashNode is a Function ok 736 — Produces the appropriate hash -# PASS test/permutations/permutations.test.js +# PASS test/getDaysDiffBetweenDates/getDaysDiffBetweenDates.test.js -ok 737 — permutations is a Function -ok 738 — Generates all permutations of an array - -# PASS test/compose/compose.test.js - -ok 739 — compose is a Function -ok 740 — Performs right-to-left function composition - -# PASS test/composeRight/composeRight.test.js - -ok 741 — composeRight is a Function -ok 742 — Performs left-to-right function composition +ok 737 — getDaysDiffBetweenDates is a Function +ok 738 — Returns the difference in days between two dates # PASS test/minN/minN.test.js -ok 743 — minN is a Function -ok 744 — Returns the n minimum elements from the provided array -ok 745 — Returns the n minimum elements from the provided array - -# PASS test/maxN/maxN.test.js - -ok 746 — maxN is a Function -ok 747 — Returns the n maximum elements from the provided array -ok 748 — Returns the n maximum elements from the provided array - -# PASS test/getDaysDiffBetweenDates/getDaysDiffBetweenDates.test.js - -ok 749 — getDaysDiffBetweenDates is a Function -ok 750 — Returns the difference in days between two dates - -# PASS test/differenceWith/differenceWith.test.js - -ok 751 — differenceWith is a Function -ok 752 — Filters out all values from an array - -# PASS test/splitLines/splitLines.test.js - -ok 753 — splitLines is a Function -ok 754 — Splits a multiline string into an array of lines. +ok 739 — minN is a Function +ok 740 — Returns the n minimum elements from the provided array +ok 741 — Returns the n minimum elements from the provided array # PASS test/flatten/flatten.test.js -ok 755 — flatten is a Function -ok 756 — Flattens an array -ok 757 — Flattens an array +ok 742 — flatten is a Function +ok 743 — Flattens an array +ok 744 — Flattens an array -# PASS test/size/size.test.js +# PASS test/permutations/permutations.test.js -ok 758 — size is a Function -ok 759 — Get size of arrays, objects or strings. -ok 760 — Get size of arrays, objects or strings. - -# PASS test/initializeArrayWithValues/initializeArrayWithValues.test.js - -ok 761 — initializeArrayWithValues is a Function -ok 762 — Initializes and fills an array with the specified values - -# PASS test/when/when.test.js - -ok 763 — when is a Function -ok 764 — Returns the proper result -ok 765 — Returns the proper result +ok 745 — permutations is a Function +ok 746 — Generates all permutations of an array # PASS test/sortedLastIndexBy/sortedLastIndexBy.test.js -ok 766 — sortedLastIndexBy is a Function -ok 767 — Returns the highest index to insert the element without messing up the list order +ok 747 — sortedLastIndexBy is a Function +ok 748 — Returns the highest index to insert the element without messing up the list order -# PASS test/lcm/lcm.test.js +# PASS test/maxN/maxN.test.js -ok 768 — lcm is a Function -ok 769 — Returns the least common multiple of two or more numbers. -ok 770 — Returns the least common multiple of two or more numbers. +ok 749 — maxN is a Function +ok 750 — Returns the n maximum elements from the provided array +ok 751 — Returns the n maximum elements from the provided array -# PASS test/rearg/rearg.test.js +# PASS test/composeRight/composeRight.test.js -ok 771 — rearg is a Function -ok 772 — Reorders arguments in invoked function +ok 752 — composeRight is a Function +ok 753 — Performs left-to-right function composition + +# PASS test/when/when.test.js + +ok 754 — when is a Function +ok 755 — Returns the proper result +ok 756 — Returns the proper result + +# PASS test/palindrome/palindrome.test.js + +ok 757 — palindrome is a Function +ok 758 — Given string is a palindrome +ok 759 — Given string is not a palindrome + +# PASS test/median/median.test.js + +ok 760 — median is a Function +ok 761 — Returns the median of an array of numbers +ok 762 — Returns the median of an array of numbers + +# PASS test/splitLines/splitLines.test.js + +ok 763 — splitLines is a Function +ok 764 — Splits a multiline string into an array of lines. + +# PASS test/degreesToRads/degreesToRads.test.js + +ok 765 — degreesToRads is a Function +ok 766 — Returns the appropriate value + +# PASS test/initializeArrayWithValues/initializeArrayWithValues.test.js + +ok 767 — initializeArrayWithValues is a Function +ok 768 — Initializes and fills an array with the specified values + +# PASS test/bindAll/bindAll.test.js + +ok 769 — bindAll is a Function +ok 770 — Binds to an object context + +# PASS test/bifurcateBy/bifurcateBy.test.js + +ok 771 — bifurcateBy is a Function +ok 772 — Splits the collection into two groups # PASS test/forOwnRight/forOwnRight.test.js ok 773 — forOwnRight is a Function ok 774 — Iterates over an element's key-value pairs in reverse -# PASS test/bindAll/bindAll.test.js +# PASS test/lcm/lcm.test.js -ok 775 — bindAll is a Function -ok 776 — Binds to an object context - -# PASS test/degreesToRads/degreesToRads.test.js - -ok 777 — degreesToRads is a Function -ok 778 — Returns the appropriate value - -# PASS test/isFunction/isFunction.test.js - -ok 779 — isFunction is a Function -ok 780 — passed value is a function -ok 781 — passed value is not a function +ok 775 — lcm is a Function +ok 776 — Returns the least common multiple of two or more numbers. +ok 777 — Returns the least common multiple of two or more numbers. # PASS test/sortedIndexBy/sortedIndexBy.test.js -ok 782 — sortedIndexBy is a Function -ok 783 — Returns the lowest index to insert the element without messing up the list order +ok 778 — sortedIndexBy is a Function +ok 779 — Returns the lowest index to insert the element without messing up the list order -# PASS test/median/median.test.js +# PASS test/compose/compose.test.js -ok 784 — median is a Function -ok 785 — Returns the median of an array of numbers -ok 786 — Returns the median of an array of numbers +ok 780 — compose is a Function +ok 781 — Performs right-to-left function composition # PASS test/partial/partial.test.js -ok 787 — partial is a Function -ok 788 — Prepends arguments - -# PASS test/dropRightWhile/dropRightWhile.test.js - -ok 789 — dropRightWhile is a Function -ok 790 — Removes elements from the end of an array until the passed function returns true. - -# 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/palindrome/palindrome.test.js - -ok 793 — palindrome is a Function -ok 794 — Given string is a palindrome -ok 795 — Given string is not a palindrome - -# PASS test/mapValues/mapValues.test.js - -ok 796 — mapValues is a Function -ok 797 — Maps values - -# PASS test/unionWith/unionWith.test.js - -ok 798 — unionWith is a Function -ok 799 — Produces the appropriate results - -# PASS test/bifurcateBy/bifurcateBy.test.js - -ok 800 — bifurcateBy is a Function -ok 801 — Splits the collection into two groups - -# PASS test/unescapeHTML/unescapeHTML.test.js - -ok 802 — unescapeHTML is a Function -ok 803 — Unescapes escaped HTML characters. +ok 782 — partial is a Function +ok 783 — Prepends arguments # PASS test/percentile/percentile.test.js -ok 804 — percentile is a Function -ok 805 — Uses the percentile formula to calculate how many numbers in the given array are less or equal to the given value. +ok 784 — percentile is a Function +ok 785 — Uses the percentile formula to calculate how many numbers in the given array are less or equal to the given value. -# PASS test/sortedLastIndex/sortedLastIndex.test.js +# PASS test/differenceWith/differenceWith.test.js -ok 806 — sortedLastIndex is a Function -ok 807 — Returns the highest index to insert the element without messing up the list order +ok 786 — differenceWith is a Function +ok 787 — Filters out all values from an array -# PASS test/flip/flip.test.js +# PASS test/size/size.test.js -ok 808 — flip is a Function -ok 809 — Flips argument order - -# PASS test/attempt/attempt.test.js - -ok 810 — attempt is a Function -ok 811 — Returns a value -ok 812 — Returns an error - -# PASS test/compact/compact.test.js - -ok 813 — compact is a Function -ok 814 — Removes falsey values from an array +ok 788 — size is a Function +ok 789 — Get size of arrays, objects or strings. +ok 790 — Get size of arrays, objects or strings. # PASS test/bifurcate/bifurcate.test.js -ok 815 — bifurcate is a Function -ok 816 — Splits the collection into two groups +ok 791 — bifurcate is a Function +ok 792 — Splits the collection into two groups + +# PASS test/dropRightWhile/dropRightWhile.test.js + +ok 793 — dropRightWhile is a Function +ok 794 — Removes elements from the end of an array until the passed function returns true. + +# PASS test/unionWith/unionWith.test.js + +ok 795 — unionWith is a Function +ok 796 — Produces the appropriate results + +# PASS test/mapValues/mapValues.test.js + +ok 797 — mapValues is a Function +ok 798 — Maps values + +# PASS test/unescapeHTML/unescapeHTML.test.js + +ok 799 — unescapeHTML is a Function +ok 800 — Unescapes escaped HTML characters. + +# PASS test/attempt/attempt.test.js + +ok 801 — attempt is a Function +ok 802 — Returns a value +ok 803 — Returns an error + +# PASS test/sortedLastIndex/sortedLastIndex.test.js + +ok 804 — sortedLastIndex is a Function +ok 805 — Returns the highest index to insert the element without messing up the list order + +# PASS test/rearg/rearg.test.js + +ok 806 — rearg is a Function +ok 807 — Reorders arguments in invoked function + +# PASS test/compact/compact.test.js + +ok 808 — compact is a Function +ok 809 — Removes falsey values from an array + +# PASS test/pickBy/pickBy.test.js + +ok 810 — pickBy is a Function +ok 811 — Creates an object composed of the properties the given function returns truthy for. # PASS test/sortCharactersInString/sortCharactersInString.test.js -ok 817 — sortCharactersInString is a Function -ok 818 — Alphabetically sorts the characters in a string. +ok 812 — sortCharactersInString is a Function +ok 813 — Alphabetically sorts the characters in a string. -# PASS test/stableSort/stableSort.test.js +# PASS test/isFunction/isFunction.test.js -ok 819 — stableSort is a Function -ok 820 — Array is properly sorted - -# PASS test/escapeHTML/escapeHTML.test.js - -ok 821 — escapeHTML is a Function -ok 822 — Escapes a string for use in HTML - -# PASS test/initialize2DArray/initialize2DArray.test.js - -ok 823 — initialize2DArray is a Function -ok 824 — Initializes a 2D array of given width and height and value - -# PASS test/forEachRight/forEachRight.test.js - -ok 825 — forEachRight is a Function -ok 826 — Iterates over the array in reverse - -# PASS test/get/get.test.js - -ok 827 — get is a Function -ok 828 — Retrieve a property indicated by the selector from an object. - -# PASS test/isNumber/isNumber.test.js - -ok 829 — isNumber is a Function -ok 830 — passed argument is a number -ok 831 — passed argument is not a number +ok 814 — isFunction is a Function +ok 815 — passed value is a function +ok 816 — passed value is not a function # PASS test/isBoolean/isBoolean.test.js -ok 832 — isBoolean is a Function -ok 833 — passed value is not a boolean -ok 834 — passed value is not a boolean - -# PASS test/pullBy/pullBy.test.js - -ok 835 — pullBy is a Function -ok 836 — Pulls the specified values - -# PASS test/unflattenObject/unflattenObject.test.js - -ok 837 — unflattenObject is a Function -ok 838 — Unflattens an object with the paths for keys +ok 817 — isBoolean is a Function +ok 818 — passed value is not a boolean +ok 819 — passed value is not a boolean # PASS test/omitBy/omitBy.test.js -ok 839 — omitBy is a Function -ok 840 — Creates an object composed of the properties the given function returns falsey for +ok 820 — omitBy is a Function +ok 821 — Creates an object composed of the properties the given function returns falsey for -# PASS test/clampNumber/clampNumber.test.js +# PASS test/flip/flip.test.js -ok 841 — clampNumber is a Function -ok 842 — Clamps num within the inclusive range specified by the boundary values a and b +ok 822 — flip is a Function +ok 823 — Flips argument order -# PASS test/isNull/isNull.test.js +# PASS test/pullBy/pullBy.test.js -ok 843 — isNull is a Function -ok 844 — passed argument is a null -ok 845 — passed argument is a null +ok 824 — pullBy is a Function +ok 825 — Pulls the specified values -# PASS test/stripHTMLTags/stripHTMLTags.test.js +# PASS test/get/get.test.js -ok 846 — stripHTMLTags is a Function -ok 847 — Removes HTML tags +ok 826 — get is a Function +ok 827 — Retrieve a property indicated by the selector from an object. -# PASS test/toDecimalMark/toDecimalMark.test.js +# PASS test/initialize2DArray/initialize2DArray.test.js -ok 848 — toDecimalMark is a Function -ok 849 — convert a float-point arithmetic to the Decimal mark form - -# PASS test/truncateString/truncateString.test.js - -ok 850 — truncateString is a Function -ok 851 — Truncates a "boomerang" up to a specified length. - -# PASS test/filterNonUnique/filterNonUnique.test.js - -ok 852 — filterNonUnique is a Function -ok 853 — Filters out the non-unique values in an array - -# PASS test/countOccurrences/countOccurrences.test.js - -ok 854 — countOccurrences is a Function -ok 855 — Counts the occurrences of a value in an array - -# PASS test/xProd/xProd.test.js - -ok 856 — xProd is a Function -ok 857 — xProd([1, 2], ['a', 'b']) returns [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] - -# PASS test/isArray/isArray.test.js - -ok 858 — isArray is a Function -ok 859 — passed value is an array -ok 860 — passed value is not an array +ok 828 — initialize2DArray is a Function +ok 829 — Initializes a 2D array of given width and height and value # PASS test/objectToPairs/objectToPairs.test.js -ok 861 — objectToPairs is a Function -ok 862 — Creates an array of key-value pair arrays from an object. +ok 830 — objectToPairs is a Function +ok 831 — Creates an array of key-value pair arrays from an object. -# PASS test/remove/remove.test.js +# PASS test/unflattenObject/unflattenObject.test.js -ok 863 — remove is a Function -ok 864 — Removes elements from an array for which the given function returns false - -# PASS test/forOwn/forOwn.test.js - -ok 865 — forOwn is a Function -ok 866 — Iterates over an element's key-value pairs +ok 832 — unflattenObject is a Function +ok 833 — Unflattens an object with the paths for keys # PASS test/objectFromPairs/objectFromPairs.test.js -ok 867 — objectFromPairs is a Function -ok 868 — Creates an object from the given key-value pairs. +ok 834 — objectFromPairs is a Function +ok 835 — Creates an object from the given key-value pairs. -# PASS test/removeNonASCII/removeNonASCII.test.js +# PASS test/escapeHTML/escapeHTML.test.js -ok 869 — removeNonASCII is a Function -ok 870 — Removes non-ASCII characters +ok 836 — escapeHTML is a Function +ok 837 — Escapes a string for use in HTML -# PASS test/pick/pick.test.js +# PASS test/isArray/isArray.test.js -ok 871 — pick is a Function -ok 872 — Picks the key-value pairs corresponding to the given keys from an object. +ok 838 — isArray is a Function +ok 839 — passed value is an array +ok 840 — passed value is not an array -# PASS test/ary/ary.test.js +# PASS test/isNumber/isNumber.test.js -ok 873 — ary is a Function -ok 874 — Discards arguments with index >=n +ok 841 — isNumber is a Function +ok 842 — passed argument is a number +ok 843 — passed argument is not a number -# PASS test/curry/curry.test.js +# PASS test/forEachRight/forEachRight.test.js -ok 875 — curry is a Function -ok 876 — curries a Math.pow -ok 877 — curries a Math.min +ok 844 — forEachRight is a Function +ok 845 — Iterates over the array in reverse -# PASS test/dropWhile/dropWhile.test.js +# PASS test/stableSort/stableSort.test.js -ok 878 — dropWhile is a Function -ok 879 — Removes elements in an array until the passed function returns true. +ok 846 — stableSort is a Function +ok 847 — Array is properly sorted -# PASS test/takeRightWhile/takeRightWhile.test.js +# PASS test/xProd/xProd.test.js -ok 880 — takeRightWhile is a Function -ok 881 — Removes elements until the function returns true +ok 848 — xProd is a Function +ok 849 — xProd([1, 2], ['a', 'b']) returns [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] + +# PASS test/stripHTMLTags/stripHTMLTags.test.js + +ok 850 — stripHTMLTags is a Function +ok 851 — Removes HTML tags + +# PASS test/toDecimalMark/toDecimalMark.test.js + +ok 852 — toDecimalMark is a Function +ok 853 — convert a float-point arithmetic to the Decimal mark form # PASS test/findLastIndex/findLastIndex.test.js -ok 882 — findLastIndex is a Function -ok 883 — Finds last index for which the given function returns true +ok 854 — findLastIndex is a Function +ok 855 — Finds last index for which the given function returns true -# PASS test/defaults/defaults.test.js +# PASS test/filterNonUnique/filterNonUnique.test.js -ok 884 — defaults is a Function -ok 885 — Assigns default values for undefined properties +ok 856 — filterNonUnique is a Function +ok 857 — Filters out the non-unique values in an array + +# PASS test/forOwn/forOwn.test.js + +ok 858 — forOwn is a Function +ok 859 — Iterates over an element's key-value pairs # PASS test/unfold/unfold.test.js -ok 886 — unfold is a Function -ok 887 — Works with a given function, producing an array +ok 860 — unfold is a Function +ok 861 — Works with a given function, producing an array -# PASS test/intersection/intersection.test.js +# PASS test/ary/ary.test.js -ok 888 — intersection is a Function -ok 889 — Returns a list of elements that exist in both arrays +ok 862 — ary is a Function +ok 863 — Discards arguments with index >=n -# PASS test/similarity/similarity.test.js +# PASS test/takeRightWhile/takeRightWhile.test.js -ok 890 — similarity is a Function -ok 891 — Returns an array of elements that appear in both arrays. +ok 864 — takeRightWhile is a Function +ok 865 — Removes elements until the function returns true -# PASS test/over/over.test.js +# PASS test/dropWhile/dropWhile.test.js -ok 892 — over is a Function -ok 893 — Applies given functions over multiple arguments +ok 866 — dropWhile is a Function +ok 867 — Removes elements in an array until the passed function returns true. -# PASS test/findLast/findLast.test.js +# PASS test/countOccurrences/countOccurrences.test.js -ok 894 — findLast is a Function -ok 895 — Finds last element for which the given function returns true +ok 868 — countOccurrences is a Function +ok 869 — Counts the occurrences of a value in an array -# PASS test/parseCookie/parseCookie.test.js +# PASS test/removeNonASCII/removeNonASCII.test.js -ok 896 — parseCookie is a Function -ok 897 — Parses the cookie +ok 870 — removeNonASCII is a Function +ok 871 — Removes non-ASCII characters -# PASS test/omit/omit.test.js +# PASS test/curry/curry.test.js -ok 898 — omit is a Function -ok 899 — Omits the key-value pairs corresponding to the given keys from an object +ok 872 — curry is a Function +ok 873 — curries a Math.pow +ok 874 — curries a Math.min + +# PASS test/pick/pick.test.js + +ok 875 — pick is a Function +ok 876 — Picks the key-value pairs corresponding to the given keys from an object. + +# PASS test/remove/remove.test.js + +ok 877 — remove is a Function +ok 878 — Removes elements from an array for which the given function returns false + +# PASS test/clampNumber/clampNumber.test.js + +ok 879 — clampNumber is a Function +ok 880 — Clamps num within the inclusive range specified by the boundary values a and b # PASS test/atob/atob.test.js -ok 900 — atob is a Function -ok 901 — atob("Zm9vYmFy") equals "foobar" -ok 902 — atob("Z") returns "" +ok 881 — atob is a Function +ok 882 — atob("Zm9vYmFy") equals "foobar" +ok 883 — atob("Z") returns "" + +# PASS test/truncateString/truncateString.test.js + +ok 884 — truncateString is a Function +ok 885 — Truncates a "boomerang" up to a specified length. # PASS test/delay/delay.test.js -ok 903 — delay is a Function -ok 904 — Works as expecting, passing arguments properly +ok 886 — delay is a Function +ok 887 — Works as expecting, passing arguments properly -# PASS test/pull/pull.test.js +# PASS test/isNull/isNull.test.js -ok 905 — pull is a Function -ok 906 — Pulls the specified values +ok 888 — isNull is a Function +ok 889 — passed argument is a null +ok 890 — passed argument is a null -# PASS test/isEven/isEven.test.js +# PASS test/defaults/defaults.test.js -ok 907 — isEven is a Function -ok 908 — 4 is even number -ok 909 — 5 is not an even number - -# PASS test/negate/negate.test.js - -ok 910 — negate is a Function -ok 911 — Negates a predicate function - -# PASS test/hammingDistance/hammingDistance.test.js - -ok 912 — hammingDistance is a Function -ok 913 — retuns hamming disance between 2 values - -# PASS test/initial/initial.test.js - -ok 914 — initial is a Function -ok 915 — Returns all the elements of an array except the last one - -# PASS test/coalesce/coalesce.test.js - -ok 916 — coalesce is a Function -ok 917 — Returns the first non-null/undefined argument - -# PASS test/escapeRegExp/escapeRegExp.test.js - -ok 918 — escapeRegExp is a Function -ok 919 — Escapes a string to use in a regular expression - -# PASS test/powerset/powerset.test.js - -ok 920 — powerset is a Function -ok 921 — Returns the powerset of a given array of numbers. - -# PASS test/times/times.test.js - -ok 922 — times is a Function -ok 923 — Runs a function the specified amount of times - -# PASS test/takeWhile/takeWhile.test.js - -ok 924 — takeWhile is a Function -ok 925 — Removes elements until the function returns true - -# PASS test/serializeCookie/serializeCookie.test.js - -ok 926 — serializeCookie is a Function -ok 927 — Serializes the cookie - -# PASS test/tail/tail.test.js - -ok 928 — tail is a Function -ok 929 — Returns tail -ok 930 — Returns tail - -# PASS test/sleep/sleep.test.js - -ok 931 — sleep is a Function -ok 932 — Works as expected - -# PASS test/everyNth/everyNth.test.js - -ok 933 — everyNth is a Function -ok 934 — Returns every nth element in an array +ok 891 — defaults is a Function +ok 892 — Assigns default values for undefined properties # PASS test/RGBToHex/RGBToHex.test.js -ok 935 — RGBToHex is a Function -ok 936 — Converts the values of RGB components to a color code. - -# PASS test/unionBy/unionBy.test.js - -ok 937 — unionBy is a Function -ok 938 — Produces the appropriate results - -# PASS test/fibonacci/fibonacci.test.js - -ok 939 — fibonacci is a Function -ok 940 — Generates an array, containing the Fibonacci sequence - -# PASS test/radsToDegrees/radsToDegrees.test.js - -ok 941 — radsToDegrees is a Function -ok 942 — Returns the appropriate value - -# PASS test/difference/difference.test.js - -ok 943 — difference is a Function -ok 944 — Returns the difference between two arrays - -# PASS test/primes/primes.test.js - -ok 945 — primes is a Function -ok 946 — Generates primes up to a given number, using the Sieve of Eratosthenes. - -# PASS test/unary/unary.test.js - -ok 947 — unary is a Function -ok 948 — Discards arguments after the first one - -# PASS test/distance/distance.test.js - -ok 949 — distance is a Function -ok 950 — Calculates the distance between two points +ok 893 — RGBToHex is a Function +ok 894 — Converts the values of RGB components to a color code. # PASS test/cloneRegExp/cloneRegExp.test.js -ok 951 — cloneRegExp is a Function -ok 952 — Clones regular expressions properly +ok 895 — cloneRegExp is a Function +ok 896 — Clones regular expressions properly + +# PASS test/intersection/intersection.test.js + +ok 897 — intersection is a Function +ok 898 — Returns a list of elements that exist in both arrays + +# PASS test/takeWhile/takeWhile.test.js + +ok 899 — takeWhile is a Function +ok 900 — Removes elements until the function returns true + +# PASS test/radsToDegrees/radsToDegrees.test.js + +ok 901 — radsToDegrees is a Function +ok 902 — Returns the appropriate value + +# PASS test/difference/difference.test.js + +ok 903 — difference is a Function +ok 904 — Returns the difference between two arrays + +# PASS test/powerset/powerset.test.js + +ok 905 — powerset is a Function +ok 906 — Returns the powerset of a given array of numbers. + +# PASS test/omit/omit.test.js + +ok 907 — omit is a Function +ok 908 — Omits the key-value pairs corresponding to the given keys from an object + +# PASS test/initial/initial.test.js + +ok 909 — initial is a Function +ok 910 — Returns all the elements of an array except the last one # PASS test/deepFlatten/deepFlatten.test.js -ok 953 — deepFlatten is a Function -ok 954 — Deep flattens an array +ok 911 — deepFlatten is a Function +ok 912 — Deep flattens an array + +# PASS test/everyNth/everyNth.test.js + +ok 913 — everyNth is a Function +ok 914 — Returns every nth element in an array + +# PASS test/negate/negate.test.js + +ok 915 — negate is a Function +ok 916 — Negates a predicate function + +# PASS test/escapeRegExp/escapeRegExp.test.js + +ok 917 — escapeRegExp is a Function +ok 918 — Escapes a string to use in a regular expression + +# PASS test/sleep/sleep.test.js + +ok 919 — sleep is a Function +ok 920 — Works as expected + +# PASS test/similarity/similarity.test.js + +ok 921 — similarity is a Function +ok 922 — Returns an array of elements that appear in both arrays. + +# PASS test/parseCookie/parseCookie.test.js + +ok 923 — parseCookie is a Function +ok 924 — Parses the cookie + +# PASS test/coalesce/coalesce.test.js + +ok 925 — coalesce is a Function +ok 926 — Returns the first non-null/undefined argument + +# PASS test/primes/primes.test.js + +ok 927 — primes is a Function +ok 928 — Generates primes up to a given number, using the Sieve of Eratosthenes. + +# PASS test/isEven/isEven.test.js + +ok 929 — isEven is a Function +ok 930 — 4 is even number +ok 931 — 5 is not an even number + +# PASS test/over/over.test.js + +ok 932 — over is a Function +ok 933 — Applies given functions over multiple arguments + +# PASS test/tail/tail.test.js + +ok 934 — tail is a Function +ok 935 — Returns tail +ok 936 — Returns tail + +# PASS test/findLast/findLast.test.js + +ok 937 — findLast is a Function +ok 938 — Finds last element for which the given function returns true + +# PASS test/times/times.test.js + +ok 939 — times is a Function +ok 940 — Runs a function the specified amount of times + +# PASS test/serializeCookie/serializeCookie.test.js + +ok 941 — serializeCookie is a Function +ok 942 — Serializes the cookie + +# PASS test/distance/distance.test.js + +ok 943 — distance is a Function +ok 944 — Calculates the distance between two points + +# PASS test/hammingDistance/hammingDistance.test.js + +ok 945 — hammingDistance is a Function +ok 946 — retuns hamming disance between 2 values + +# PASS test/fibonacci/fibonacci.test.js + +ok 947 — fibonacci is a Function +ok 948 — Generates an array, containing the Fibonacci sequence + +# PASS test/pull/pull.test.js + +ok 949 — pull is a Function +ok 950 — Pulls the specified values + +# PASS test/btoa/btoa.test.js + +ok 951 — btoa is a Function +ok 952 — btoa("foobar") equals "Zm9vYmFy" + +# PASS test/sdbm/sdbm.test.js + +ok 953 — sdbm is a Function +ok 954 — Hashes the input string into a whole number. + +# PASS test/unary/unary.test.js + +ok 955 — unary is a Function +ok 956 — Discards arguments after the first one # PASS test/mapKeys/mapKeys.test.js -ok 955 — mapKeys is a Function -ok 956 — Maps keys +ok 957 — mapKeys is a Function +ok 958 — Maps keys -# PASS test/isSymbol/isSymbol.test.js +# PASS test/initializeArrayWithRangeRight/initializeArrayWithRangeRight.test.js -ok 957 — isSymbol is a Function -ok 958 — Checks if the given argument is a symbol +ok 959 — initializeArrayWithRangeRight is a Function -# PASS test/reverseString/reverseString.test.js +# PASS test/unionBy/unionBy.test.js -ok 959 — reverseString is a Function -ok 960 — Reverses a string. - -# PASS test/isUndefined/isUndefined.test.js - -ok 961 — isUndefined is a Function -ok 962 — Returns true for undefined +ok 960 — unionBy is a Function +ok 961 — Produces the appropriate results # PASS test/isDivisible/isDivisible.test.js -ok 963 — isDivisible is a Function -ok 964 — The number 6 is divisible by 3 +ok 962 — isDivisible is a Function +ok 963 — The number 6 is divisible by 3 # PASS test/digitize/digitize.test.js -ok 965 — digitize is a Function -ok 966 — Converts a number to an array of digits - -# PASS test/getType/getType.test.js - -ok 967 — getType is a Function -ok 968 — Returns the native type of a value - -# PASS test/call/call.test.js - -ok 969 — call is a Function -ok 970 — Calls function on given object - -# PASS test/debounce/debounce.test.js - -ok 971 — debounce is a Function -ok 972 — Works as expected +ok 964 — digitize is a Function +ok 965 — Converts a number to an array of digits # PASS test/sum/sum.test.js -ok 973 — sum is a Function -ok 974 — Returns the sum of two or more numbers/arrays. +ok 966 — sum is a Function +ok 967 — Returns the sum of two or more numbers/arrays. -# PASS test/initializeNDArray/initializeNDArray.test.js +# PASS test/call/call.test.js -ok 975 — initializeNDArray is a Function +ok 968 — call is a Function +ok 969 — Calls function on given object -# PASS test/speechSynthesis/speechSynthesis.test.js +# PASS test/reverseString/reverseString.test.js -ok 976 — speechSynthesis is a Function +ok 970 — reverseString is a Function +ok 971 — Reverses a string. -# PASS test/detectDeviceType/detectDeviceType.test.js +# PASS test/isSymbol/isSymbol.test.js -ok 977 — detectDeviceType is a Function +ok 972 — isSymbol is a Function +ok 973 — Checks if the given argument is a symbol -# PASS test/fibonacciUntilNum/fibonacciUntilNum.test.js +# PASS test/debounce/debounce.test.js -ok 978 — fibonacciUntilNum is a Function +ok 974 — debounce is a Function +ok 975 — Works as expected + +# PASS test/getType/getType.test.js + +ok 976 — getType is a Function +ok 977 — Returns the native type of a value + +# PASS test/isUndefined/isUndefined.test.js + +ok 978 — isUndefined is a Function +ok 979 — Returns true for undefined # PASS test/elementIsVisibleInViewport/elementIsVisibleInViewport.test.js -ok 979 — elementIsVisibleInViewport is a Function +ok 980 — elementIsVisibleInViewport is a Function -# PASS test/onUserInputChange/onUserInputChange.test.js +# PASS test/UUIDGeneratorBrowser/UUIDGeneratorBrowser.test.js -ok 980 — onUserInputChange is a Function +ok 981 — UUIDGeneratorBrowser is a Function -# PASS test/isPrime/isPrime.test.js +# PASS test/isBrowserTabFocused/isBrowserTabFocused.test.js -ok 981 — isPrime is a Function -ok 982 — passed number is a prime +ok 982 — isBrowserTabFocused is a Function # PASS test/recordAnimationFrames/recordAnimationFrames.test.js ok 983 — recordAnimationFrames is a Function -# PASS test/nodeListToArray/nodeListToArray.test.js +# PASS test/fibonacciUntilNum/fibonacciUntilNum.test.js -ok 984 — nodeListToArray is a Function +ok 984 — fibonacciUntilNum is a Function -# PASS test/getScrollPosition/getScrollPosition.test.js +# PASS test/isPrime/isPrime.test.js -ok 985 — getScrollPosition is a Function +ok 985 — isPrime is a Function +ok 986 — passed number is a prime -# PASS test/getMeridiemSuffixOfInteger/getMeridiemSuffixOfInteger.test.js +# PASS test/initializeNDArray/initializeNDArray.test.js -ok 986 — getMeridiemSuffixOfInteger is a Function - -# PASS test/isArmstrongNumber/isArmstrongNumber.test.js - -ok 987 — isArmstrongNumber is a Function - -# PASS test/UUIDGeneratorBrowser/UUIDGeneratorBrowser.test.js - -ok 988 — UUIDGeneratorBrowser is a Function - -# PASS test/sdbm/sdbm.test.js - -ok 989 — sdbm is a Function -ok 990 — Hashes the input string into a whole number. - -# PASS test/initializeArrayWithRangeRight/initializeArrayWithRangeRight.test.js - -ok 991 — initializeArrayWithRangeRight is a Function - -# PASS test/levenshteinDistance/levenshteinDistance.test.js - -ok 992 — levenshteinDistance is a Function +ok 987 — initializeNDArray is a Function # PASS test/fibonacciCountUntilNum/fibonacciCountUntilNum.test.js -ok 993 — fibonacciCountUntilNum is a Function +ok 988 — fibonacciCountUntilNum is a Function -# PASS test/isBrowserTabFocused/isBrowserTabFocused.test.js +# PASS test/isArmstrongNumber/isArmstrongNumber.test.js -ok 994 — isBrowserTabFocused is a Function +ok 989 — isArmstrongNumber is a Function + +# PASS test/getMeridiemSuffixOfInteger/getMeridiemSuffixOfInteger.test.js + +ok 990 — getMeridiemSuffixOfInteger is a Function + +# PASS test/getScrollPosition/getScrollPosition.test.js + +ok 991 — getScrollPosition is a Function + +# PASS test/detectDeviceType/detectDeviceType.test.js + +ok 992 — detectDeviceType is a Function + +# PASS test/levenshteinDistance/levenshteinDistance.test.js + +ok 993 — levenshteinDistance is a Function # PASS test/getColonTimeFromDate/getColonTimeFromDate.test.js -ok 995 — getColonTimeFromDate is a Function +ok 994 — getColonTimeFromDate is a Function -# PASS test/btoa/btoa.test.js +# PASS test/onUserInputChange/onUserInputChange.test.js -ok 996 — btoa is a Function -ok 997 — btoa("foobar") equals "Zm9vYmFy" +ok 995 — onUserInputChange is a Function -# PASS test/elementContains/elementContains.test.js +# PASS test/removeVowels/removeVowels.test.js -ok 998 — elementContains is a Function - -# PASS test/isArrayBuffer/isArrayBuffer.test.js - -ok 999 — isArrayBuffer is a Function - -# PASS test/bottomVisible/bottomVisible.test.js - -ok 1000 — bottomVisible is a Function - -# PASS test/arrayToHtmlList/arrayToHtmlList.test.js - -ok 1001 — arrayToHtmlList is a Function - -# PASS test/mostPerformant/mostPerformant.test.js - -ok 1002 — mostPerformant is a Function - -# PASS test/copyToClipboard/copyToClipboard.test.js - -ok 1003 — copyToClipboard is a Function - -# PASS test/createEventHub/createEventHub.test.js - -ok 1004 — createEventHub is a Function - -# PASS test/observeMutations/observeMutations.test.js - -ok 1005 — observeMutations is a Function +ok 996 — removeVowels is a Function # PASS test/httpsRedirect/httpsRedirect.test.js -ok 1006 — httpsRedirect is a Function +ok 997 — httpsRedirect is a Function + +# PASS test/bottomVisible/bottomVisible.test.js + +ok 998 — bottomVisible is a Function + +# PASS test/howManyTimes/howManyTimes.test.js + +ok 999 — howManyTimes is a Function + +# PASS test/mostPerformant/mostPerformant.test.js + +ok 1000 — mostPerformant is a Function + +# PASS test/nodeListToArray/nodeListToArray.test.js + +ok 1001 — nodeListToArray is a Function + +# PASS test/isTypedArray/isTypedArray.test.js + +ok 1002 — isTypedArray is a Function + +# PASS test/observeMutations/observeMutations.test.js + +ok 1003 — observeMutations is a Function + +# PASS test/readFileLines/readFileLines.test.js + +ok 1004 — readFileLines is a Function + +# PASS test/elementContains/elementContains.test.js + +ok 1005 — elementContains is a Function + +# PASS test/speechSynthesis/speechSynthesis.test.js + +ok 1006 — speechSynthesis is a Function # PASS test/createElement/createElement.test.js ok 1007 — createElement is a Function -# PASS test/smoothScroll/smoothScroll.test.js +# PASS test/arrayToHtmlList/arrayToHtmlList.test.js -ok 1008 — smoothScroll is a Function +ok 1008 — arrayToHtmlList is a Function -# PASS test/triggerEvent/triggerEvent.test.js +# PASS test/copyToClipboard/copyToClipboard.test.js -ok 1009 — triggerEvent is a Function +ok 1009 — copyToClipboard is a Function -# PASS test/isWeakSet/isWeakSet.test.js +# PASS test/isArrayBuffer/isArrayBuffer.test.js -ok 1010 — isWeakSet is a Function +ok 1010 — isArrayBuffer is a Function -# PASS test/removeVowels/removeVowels.test.js +# PASS test/createEventHub/createEventHub.test.js -ok 1011 — removeVowels is a Function - -# PASS test/isTypedArray/isTypedArray.test.js - -ok 1012 — isTypedArray is a Function - -# PASS test/isSimilar/isSimilar.test.js - -ok 1013 — isSimilar is a Function - -# PASS test/timeTaken/timeTaken.test.js - -ok 1014 — timeTaken is a Function - -# PASS test/scrollToTop/scrollToTop.test.js - -ok 1015 — scrollToTop is a Function - -# PASS test/JSONToFile/JSONToFile.test.js - -ok 1016 — JSONToFile is a Function - -# PASS test/toggleClass/toggleClass.test.js - -ok 1017 — toggleClass is a Function +ok 1011 — createEventHub is a Function # PASS test/insertBefore/insertBefore.test.js -ok 1018 — insertBefore is a Function - -# PASS test/countVowels/countVowels.test.js - -ok 1019 — countVowels is a Function - -# PASS test/howManyTimes/howManyTimes.test.js - -ok 1020 — howManyTimes is a Function +ok 1012 — insertBefore is a Function # PASS test/JSONToDate/JSONToDate.test.js -ok 1021 — JSONToDate is a Function +ok 1013 — JSONToDate is a Function -# PASS test/hashBrowser/hashBrowser.test.js +# PASS test/currentURL/currentURL.test.js -ok 1022 — hashBrowser is a Function +ok 1014 — currentURL is a Function + +# PASS test/isWeakSet/isWeakSet.test.js + +ok 1015 — isWeakSet is a Function + +# PASS test/toggleClass/toggleClass.test.js + +ok 1016 — toggleClass is a Function + +# PASS test/countVowels/countVowels.test.js + +ok 1017 — countVowels is a Function + +# PASS test/isBrowser/isBrowser.test.js + +ok 1018 — isBrowser is a Function + +# PASS test/httpDelete/httpDelete.test.js + +ok 1019 — httpDelete is a Function + +# PASS test/triggerEvent/triggerEvent.test.js + +ok 1020 — triggerEvent is a Function + +# PASS test/JSONToFile/JSONToFile.test.js + +ok 1021 — JSONToFile is a Function + +# PASS test/timeTaken/timeTaken.test.js + +ok 1022 — timeTaken is a Function # PASS test/insertAfter/insertAfter.test.js ok 1023 — insertAfter is a Function -# PASS test/currentURL/currentURL.test.js +# PASS test/smoothScroll/smoothScroll.test.js -ok 1024 — currentURL is a Function +ok 1024 — smoothScroll is a Function -# PASS test/readFileLines/readFileLines.test.js +# PASS test/scrollToTop/scrollToTop.test.js -ok 1025 — readFileLines is a Function +ok 1025 — scrollToTop is a Function -# PASS test/getStyle/getStyle.test.js +# PASS test/isSimilar/isSimilar.test.js -ok 1026 — getStyle is a Function - -# PASS test/isBrowser/isBrowser.test.js - -ok 1027 — isBrowser is a Function - -# PASS test/httpDelete/httpDelete.test.js - -ok 1028 — httpDelete is a Function - -# PASS test/hasFlags/hasFlags.test.js - -ok 1029 — hasFlags is a Function - -# PASS test/hasClass/hasClass.test.js - -ok 1030 — hasClass is a Function - -# PASS test/isRegExp/isRegExp.test.js - -ok 1031 — isRegExp is a Function +ok 1026 — isSimilar is a Function # PASS test/redirect/redirect.test.js -ok 1032 — redirect is a Function +ok 1027 — redirect is a Function -# PASS test/httpPost/httpPost.test.js +# PASS test/hashBrowser/hashBrowser.test.js -ok 1033 — httpPost is a Function +ok 1028 — hashBrowser is a Function # PASS test/isWeakMap/isWeakMap.test.js -ok 1034 — isWeakMap is a Function +ok 1029 — isWeakMap is a Function -# PASS test/setStyle/setStyle.test.js +# PASS test/httpPost/httpPost.test.js -ok 1035 — setStyle is a Function +ok 1030 — httpPost is a Function -# PASS test/runAsync/runAsync.test.js +# PASS test/hasFlags/hasFlags.test.js -ok 1036 — runAsync is a Function +ok 1031 — hasFlags is a Function + +# PASS test/getStyle/getStyle.test.js + +ok 1032 — getStyle is a Function # PASS test/throttle/throttle.test.js -ok 1037 — throttle is a Function +ok 1033 — throttle is a Function # PASS test/solveRPN/solveRPN.test.js -ok 1038 — solveRPN is a Function +ok 1034 — solveRPN is a Function -# PASS test/pipeLog/pipeLog.test.js +# PASS test/hasClass/hasClass.test.js -ok 1039 — pipeLog is a Function - -# PASS test/off/off.test.js - -ok 1040 — off is a Function - -# PASS test/prefix/prefix.test.js - -ok 1041 — prefix is a Function - -# PASS test/toHash/toHash.test.js - -ok 1042 — toHash is a Function - -# PASS test/defer/defer.test.js - -ok 1043 — defer is a Function - -# PASS test/zipWith/zipWith.test.js - -ok 1044 — zipWith is a Function - -# PASS test/show/show.test.js - -ok 1045 — show is a Function - -# PASS test/isMap/isMap.test.js - -ok 1046 — isMap is a Function - -# PASS test/isSet/isSet.test.js - -ok 1047 — isSet is a Function - -# PASS test/hz/hz.test.js - -ok 1048 — hz is a Function - -# PASS test/httpGet/httpGet.test.js - -ok 1049 — httpGet is a Function - -# PASS test/once/once.test.js - -ok 1050 — once is a Function - -# PASS test/on/on.test.js - -ok 1051 — on is a Function - -# PASS test/counter/counter.test.js - -ok 1052 — counter is a Function - -# PASS test/sumBy/sumBy.test.js - -ok 1053 — sumBy is a Function +ok 1035 — hasClass is a Function # PASS test/factors/factors.test.js -ok 1054 — factors is a Function +ok 1036 — factors is a Function + +# PASS test/httpGet/httpGet.test.js + +ok 1037 — httpGet is a Function + +# PASS test/isRegExp/isRegExp.test.js + +ok 1038 — isRegExp is a Function + +# PASS test/runAsync/runAsync.test.js + +ok 1039 — runAsync is a Function + +# PASS test/setStyle/setStyle.test.js + +ok 1040 — setStyle is a Function + +# PASS test/counter/counter.test.js + +ok 1041 — counter is a Function # PASS test/colorize/colorize.test.js -ok 1055 — colorize is a Function - -# PASS test/nest/nest.test.js - -ok 1056 — nest is a Function - -# PASS test/hide/hide.test.js - -ok 1057 — hide is a Function +ok 1042 — colorize is a Function # PASS test/httpPut/httpPut.test.js -ok 1058 — httpPut is a Function +ok 1043 — httpPut is a Function + +# PASS test/pipeLog/pipeLog.test.js + +ok 1044 — pipeLog is a Function + +# PASS test/sumBy/sumBy.test.js + +ok 1045 — sumBy is a Function + +# PASS test/off/off.test.js + +ok 1046 — off is a Function + +# PASS test/show/show.test.js + +ok 1047 — show is a Function + +# PASS test/toHash/toHash.test.js + +ok 1048 — toHash is a Function + +# PASS test/zipWith/zipWith.test.js + +ok 1049 — zipWith is a Function + +# PASS test/nest/nest.test.js + +ok 1050 — nest is a Function + +# PASS test/hide/hide.test.js + +ok 1051 — hide is a Function + +# PASS test/defer/defer.test.js + +ok 1052 — defer is a Function + +# PASS test/isMap/isMap.test.js + +ok 1053 — isMap is a Function + +# PASS test/prefix/prefix.test.js + +ok 1054 — prefix is a Function + +# PASS test/once/once.test.js + +ok 1055 — once is a Function + +# PASS test/isSet/isSet.test.js + +ok 1056 — isSet is a Function + +# PASS test/hz/hz.test.js + +ok 1057 — hz is a Function + +# PASS test/on/on.test.js + +ok 1058 — on is a Function 1..1058 # Test Suites: 100% ██████████, 350 passed, 350 total # Tests: 100% ██████████, 1058 passed, 1058 total -# Time: 47.876s +# Time: 48.724s # Ran all test suites.