diff --git a/snippets/CSVToArray.md b/snippets/CSVToArray.md index 8f5c15f5a..02f7ad575 100644 --- a/snippets/CSVToArray.md +++ b/snippets/CSVToArray.md @@ -1,6 +1,8 @@ --- title: CSVToArray tags: string,array,intermediate +firstSeen: 2018-06-27T20:57:54+03:00 +lastUpdated: 2020-11-03T21:46:13+02:00 --- Converts a comma-separated values (CSV) string to a 2D array. diff --git a/snippets/CSVToJSON.md b/snippets/CSVToJSON.md index e14a57226..aea3081cb 100644 --- a/snippets/CSVToJSON.md +++ b/snippets/CSVToJSON.md @@ -1,6 +1,8 @@ --- title: CSVToJSON tags: string,object,advanced +firstSeen: 2018-06-27T21:14:24+03:00 +lastUpdated: 2020-11-03T22:11:18+02:00 --- Converts a comma-separated values (CSV) string to a 2D array of objects. diff --git a/snippets/HSBToRGB.md b/snippets/HSBToRGB.md index 1926a5333..628bb7d58 100644 --- a/snippets/HSBToRGB.md +++ b/snippets/HSBToRGB.md @@ -1,6 +1,8 @@ --- title: HSBToRGB tags: math,intermediate +firstSeen: 2020-09-18T14:25:07+03:00 +lastUpdated: 2020-09-18T14:25:07+03:00 --- Converts a HSB color tuple to RGB format. diff --git a/snippets/HSLToRGB.md b/snippets/HSLToRGB.md index 2c764128e..8045f4efd 100644 --- a/snippets/HSLToRGB.md +++ b/snippets/HSLToRGB.md @@ -1,6 +1,8 @@ --- title: HSLToRGB tags: math,intermediate +firstSeen: 2020-10-01T23:15:49+03:00 +lastUpdated: 2020-10-04T11:24:27+03:00 --- Converts a HSL color tuple to RGB format. diff --git a/snippets/JSONToFile.md b/snippets/JSONToFile.md index 12e6eb0d5..e42f5eb04 100644 --- a/snippets/JSONToFile.md +++ b/snippets/JSONToFile.md @@ -1,6 +1,8 @@ --- title: JSONToFile tags: node,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Writes a JSON object to a file. diff --git a/snippets/JSONtoCSV.md b/snippets/JSONtoCSV.md index 7e9aa089f..745b94a7c 100644 --- a/snippets/JSONtoCSV.md +++ b/snippets/JSONtoCSV.md @@ -1,6 +1,8 @@ --- title: JSONtoCSV tags: array,string,object,advanced +firstSeen: 2018-07-06T20:25:46+03:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Converts an array of objects to a comma-separated values (CSV) string that contains only the `columns` specified. diff --git a/snippets/RGBToHSB.md b/snippets/RGBToHSB.md index 6e340be51..c80d1c372 100644 --- a/snippets/RGBToHSB.md +++ b/snippets/RGBToHSB.md @@ -1,6 +1,8 @@ --- title: RGBToHSB tags: math,intermediate +firstSeen: 2020-09-18T14:25:07+03:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Converts a RGB color tuple to HSB format. diff --git a/snippets/RGBToHSL.md b/snippets/RGBToHSL.md index 1d7ddb2a1..b5825187c 100644 --- a/snippets/RGBToHSL.md +++ b/snippets/RGBToHSL.md @@ -1,6 +1,8 @@ --- title: RGBToHSL tags: math,intermediate +firstSeen: 2020-10-01T23:16:30+03:00 +lastUpdated: 2020-10-04T11:25:12+03:00 --- Converts a RGB color tuple to HSL format. diff --git a/snippets/RGBToHex.md b/snippets/RGBToHex.md index 988772038..84360a533 100644 --- a/snippets/RGBToHex.md +++ b/snippets/RGBToHex.md @@ -1,6 +1,8 @@ --- title: RGBToHex tags: string,math,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-11-03T22:11:18+02:00 --- Converts the values of RGB components to a hexadecimal color code. diff --git a/snippets/URLJoin.md b/snippets/URLJoin.md index e71e6e7c1..000a2fdc1 100644 --- a/snippets/URLJoin.md +++ b/snippets/URLJoin.md @@ -1,6 +1,8 @@ --- title: URLJoin tags: string,regexp,advanced +firstSeen: 2018-01-16T15:53:03+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Joins all given URL segments together, then normalizes the resulting URL. diff --git a/snippets/UUIDGeneratorBrowser.md b/snippets/UUIDGeneratorBrowser.md index 2f1f88d01..1079863f4 100644 --- a/snippets/UUIDGeneratorBrowser.md +++ b/snippets/UUIDGeneratorBrowser.md @@ -1,6 +1,8 @@ --- title: UUIDGeneratorBrowser tags: browser,random,intermediate +firstSeen: 2017-12-29T09:47:10+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Generates a UUID in a browser. diff --git a/snippets/UUIDGeneratorNode.md b/snippets/UUIDGeneratorNode.md index 83f890022..a796ad6b8 100644 --- a/snippets/UUIDGeneratorNode.md +++ b/snippets/UUIDGeneratorNode.md @@ -1,6 +1,8 @@ --- title: UUIDGeneratorNode tags: node,random,intermediate +firstSeen: 2017-12-29T09:47:10+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Generates a UUID in Node.JS. diff --git a/snippets/accumulate.md b/snippets/accumulate.md index 707195949..9d0af2d00 100644 --- a/snippets/accumulate.md +++ b/snippets/accumulate.md @@ -1,6 +1,8 @@ --- title: accumulate tags: math,array,intermediate +firstSeen: 2020-05-04T12:20:46+03:00 +lastUpdated: 2020-11-03T21:46:13+02:00 --- Creates an array of partial sums. diff --git a/snippets/addClass.md b/snippets/addClass.md index 0bc8b5916..b0d55ec86 100644 --- a/snippets/addClass.md +++ b/snippets/addClass.md @@ -1,6 +1,8 @@ --- title: addClass tags: browser,beginner +firstSeen: 2020-12-30T19:21:15+02:00 +lastUpdated: 2020-12-30T19:21:15+02:00 --- Adds a class to an HTML element. diff --git a/snippets/addDaysToDate.md b/snippets/addDaysToDate.md index d0183f20a..7b097bfee 100644 --- a/snippets/addDaysToDate.md +++ b/snippets/addDaysToDate.md @@ -1,6 +1,8 @@ --- title: addDaysToDate tags: date,intermediate +firstSeen: 2020-10-12T03:03:18+03:00 +lastUpdated: 2020-11-28T19:18:29+02:00 --- Calculates the date of `n` days from the given date, returning its string representation. diff --git a/snippets/addEventListenerAll.md b/snippets/addEventListenerAll.md index a3a93be1b..37dc180a2 100644 --- a/snippets/addEventListenerAll.md +++ b/snippets/addEventListenerAll.md @@ -1,6 +1,8 @@ --- title: addEventListenerAll tags: browser,event,intermediate +firstSeen: 2021-04-22T08:53:29+03:00 +lastUpdated: 2021-04-22T08:53:29+03:00 --- Attaches an event listener to all the provided targets. diff --git a/snippets/addMinutesToDate.md b/snippets/addMinutesToDate.md index 651456558..790fa2072 100644 --- a/snippets/addMinutesToDate.md +++ b/snippets/addMinutesToDate.md @@ -1,6 +1,8 @@ --- title: addMinutesToDate tags: date,intermediate +firstSeen: 2020-11-28T19:27:46+02:00 +lastUpdated: 2020-11-28T19:27:46+02:00 --- Calculates the date of `n` minutes from the given date, returning its string representation. diff --git a/snippets/addMultipleEvents.md b/snippets/addMultipleEvents.md index 0a6098c0d..f0d6b5109 100644 --- a/snippets/addMultipleEvents.md +++ b/snippets/addMultipleEvents.md @@ -1,6 +1,8 @@ --- title: addMultipleListeners tags: browser,event,intermediate +firstSeen: 2020-10-08T00:40:30+03:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Adds multiple event listeners with the same handler to an element. diff --git a/snippets/addStyles.md b/snippets/addStyles.md index 297a37783..769ceebb1 100644 --- a/snippets/addStyles.md +++ b/snippets/addStyles.md @@ -1,6 +1,8 @@ --- title: addStyles tags: browser,beginner +firstSeen: 2021-01-07T00:37:43+02:00 +lastUpdated: 2021-01-07T00:37:43+02:00 --- Adds the provided styles to the given element. diff --git a/snippets/addWeekDays.md b/snippets/addWeekDays.md index 8ce8da656..cd6a2d1eb 100644 --- a/snippets/addWeekDays.md +++ b/snippets/addWeekDays.md @@ -1,6 +1,8 @@ --- title: addWeekDays tags: date,intermediate +firstSeen: 2020-10-11T16:51:39+03:00 +lastUpdated: 2021-01-08T00:23:44+02:00 --- Calculates the date after adding the given number of business days. diff --git a/snippets/all.md b/snippets/all.md index dcaae0111..86605b328 100644 --- a/snippets/all.md +++ b/snippets/all.md @@ -1,6 +1,8 @@ --- title: all tags: array,beginner +firstSeen: 2018-02-14T11:46:15+02:00 +lastUpdated: 2020-10-18T20:24:28+03:00 --- Checks if the provided predicate function returns `true` for all elements in a collection. diff --git a/snippets/allEqual.md b/snippets/allEqual.md index 6ed2743c3..d606b5b67 100644 --- a/snippets/allEqual.md +++ b/snippets/allEqual.md @@ -1,6 +1,8 @@ --- title: allEqual tags: array,beginner +firstSeen: 2018-08-03T00:03:08+03:00 +lastUpdated: 2020-10-18T20:24:28+03:00 --- Checks if all elements in an array are equal. diff --git a/snippets/allEqualBy.md b/snippets/allEqualBy.md index 204ea01cb..cfb4b838d 100644 --- a/snippets/allEqualBy.md +++ b/snippets/allEqualBy.md @@ -1,6 +1,8 @@ --- title: allEqualBy tags: array,intermediate +firstSeen: 2020-10-19T22:14:49+03:00 +lastUpdated: 2020-10-19T22:14:49+03:00 --- Checks if all elements in an array are equal, based on the provided mapping function. diff --git a/snippets/allUnique.md b/snippets/allUnique.md index 886bc8a30..3764e96d0 100644 --- a/snippets/allUnique.md +++ b/snippets/allUnique.md @@ -1,6 +1,8 @@ --- title: allUnique tags: array,beginner +firstSeen: 2020-10-19T19:47:26+03:00 +lastUpdated: 2021-01-08T00:23:44+02:00 --- Checks if all elements in an array are unique. diff --git a/snippets/allUniqueBy.md b/snippets/allUniqueBy.md index 8ee515855..4acaef6ae 100644 --- a/snippets/allUniqueBy.md +++ b/snippets/allUniqueBy.md @@ -1,6 +1,8 @@ --- title: allUniqueBy tags: array,intermediate +firstSeen: 2020-10-19T22:15:05+03:00 +lastUpdated: 2021-01-08T00:23:44+02:00 --- Checks if all elements in an array are unique, based on the provided mapping function. diff --git a/snippets/and.md b/snippets/and.md index 1c7cc0d33..fca05cfca 100644 --- a/snippets/and.md +++ b/snippets/and.md @@ -2,6 +2,8 @@ title: and tags: math,logic,beginner unlisted: true +firstSeen: 2020-05-13T11:35:31+03:00 +lastUpdated: 2021-01-04T13:04:15+02:00 --- Checks if both arguments are `true`. diff --git a/snippets/any.md b/snippets/any.md index 88b45746e..ffa4f16de 100644 --- a/snippets/any.md +++ b/snippets/any.md @@ -1,6 +1,8 @@ --- title: any tags: array,beginner +firstSeen: 2018-02-14T11:46:15+02:00 +lastUpdated: 2020-10-18T20:24:28+03:00 --- Checks if the provided predicate function returns `true` for at least one element in a collection. diff --git a/snippets/aperture.md b/snippets/aperture.md index 849b0ce2d..e3c43aeda 100644 --- a/snippets/aperture.md +++ b/snippets/aperture.md @@ -1,6 +1,8 @@ --- title: aperture tags: array,intermediate +firstSeen: 2020-05-13T13:25:33+03:00 +lastUpdated: 2020-10-18T20:24:28+03:00 --- Creates an array of `n`-tuples of consecutive elements. diff --git a/snippets/approximatelyEqual.md b/snippets/approximatelyEqual.md index 9165fc8fc..16ea25b25 100644 --- a/snippets/approximatelyEqual.md +++ b/snippets/approximatelyEqual.md @@ -1,6 +1,8 @@ --- title: approximatelyEqual tags: math,beginner +firstSeen: 2018-02-14T12:47:13+02:00 +lastUpdated: 2020-11-01T20:50:57+02:00 --- Checks if two numbers are approximately equal to each other. diff --git a/snippets/arithmeticProgression.md b/snippets/arithmeticProgression.md index 6ac182b3f..d1fd6234a 100644 --- a/snippets/arithmeticProgression.md +++ b/snippets/arithmeticProgression.md @@ -1,6 +1,8 @@ --- title: arithmeticProgression tags: math,algorithm,beginner +firstSeen: 2020-10-04T11:37:07+03:00 +lastUpdated: 2020-12-28T13:49:24+02:00 --- Creates an array of numbers in the arithmetic progression, starting with the given positive integer and up to the specified limit. diff --git a/snippets/arrayToCSV.md b/snippets/arrayToCSV.md index 8788ceb2a..e6b79f9de 100644 --- a/snippets/arrayToCSV.md +++ b/snippets/arrayToCSV.md @@ -1,6 +1,8 @@ --- title: arrayToCSV tags: array,string,intermediate +firstSeen: 2018-06-27T20:26:43+03:00 +lastUpdated: 2020-11-03T21:55:08+02:00 --- Converts a 2D array to a comma-separated values (CSV) string. diff --git a/snippets/arrayToHTMLList.md b/snippets/arrayToHTMLList.md index 9a07d585e..6cfcfb59f 100644 --- a/snippets/arrayToHTMLList.md +++ b/snippets/arrayToHTMLList.md @@ -1,6 +1,8 @@ --- title: arrayToHTMLList tags: browser,array,intermediate +firstSeen: 2020-10-08T00:02:45+03:00 +lastUpdated: 2020-10-20T11:46:23+03:00 --- Converts the given array elements into `
  • ` tags and appends them to the list of the given id. diff --git a/snippets/ary.md b/snippets/ary.md index b575f30b4..3b41985bb 100644 --- a/snippets/ary.md +++ b/snippets/ary.md @@ -1,6 +1,8 @@ --- title: ary tags: function,advanced +firstSeen: 2018-01-24T13:59:54+02:00 +lastUpdated: 2020-10-18T20:24:28+03:00 --- Creates a function that accepts up to `n` arguments, ignoring any additional arguments. diff --git a/snippets/atob.md b/snippets/atob.md index b7b515b25..a397d1955 100644 --- a/snippets/atob.md +++ b/snippets/atob.md @@ -1,6 +1,8 @@ --- title: atob tags: node,string,beginner +firstSeen: 2018-01-17T21:43:21+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Decodes a string of data which has been encoded using base-64 encoding. diff --git a/snippets/attempt.md b/snippets/attempt.md index f76d7e613..62d495bf3 100644 --- a/snippets/attempt.md +++ b/snippets/attempt.md @@ -1,6 +1,8 @@ --- title: attempt tags: function,intermediate +firstSeen: 2018-01-28T14:44:40+02:00 +lastUpdated: 2020-10-18T20:24:28+03:00 --- Attempts to invoke a function with the provided arguments, returning either the result or the caught error object. diff --git a/snippets/average.md b/snippets/average.md index dd4bd7771..bce7f58de 100644 --- a/snippets/average.md +++ b/snippets/average.md @@ -1,6 +1,8 @@ --- title: average tags: math,array,beginner +firstSeen: 2017-12-29T13:29:49+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Calculates the average of two or more numbers. diff --git a/snippets/averageBy.md b/snippets/averageBy.md index 3d3eb29df..6d1bccca5 100644 --- a/snippets/averageBy.md +++ b/snippets/averageBy.md @@ -1,6 +1,8 @@ --- title: averageBy tags: math,array,intermediate +firstSeen: 2018-01-11T12:25:54+02:00 +lastUpdated: 2020-10-21T21:17:45+03:00 --- Calculates the average of an array, after mapping each element to a value using the provided function. diff --git a/snippets/bifurcate.md b/snippets/bifurcate.md index ba7bc7c03..b0c82f350 100644 --- a/snippets/bifurcate.md +++ b/snippets/bifurcate.md @@ -1,6 +1,8 @@ --- title: bifurcate tags: array,intermediate +firstSeen: 2018-02-14T12:13:07+02:00 +lastUpdated: 2020-11-01T20:50:57+02:00 --- Splits values into two groups, based on the result of the given `filter` array. diff --git a/snippets/bifurcateBy.md b/snippets/bifurcateBy.md index 1ed241c97..3c9afd9ec 100644 --- a/snippets/bifurcateBy.md +++ b/snippets/bifurcateBy.md @@ -1,6 +1,8 @@ --- title: bifurcateBy tags: array,intermediate +firstSeen: 2018-02-14T12:13:07+02:00 +lastUpdated: 2020-11-01T20:50:57+02:00 --- Splits values into two groups, based on the result of the given filtering function. diff --git a/snippets/binary.md b/snippets/binary.md index a0e0ea44f..cd50363b0 100644 --- a/snippets/binary.md +++ b/snippets/binary.md @@ -1,6 +1,8 @@ --- title: binary tags: function,intermediate +firstSeen: 2020-05-13T13:36:36+03:00 +lastUpdated: 2020-10-18T23:04:45+03:00 --- Creates a function that accepts up to two arguments, ignoring any additional arguments. diff --git a/snippets/binarySearch.md b/snippets/binarySearch.md index deef65478..68986e711 100644 --- a/snippets/binarySearch.md +++ b/snippets/binarySearch.md @@ -1,6 +1,8 @@ --- title: binarySearch tags: algorithm,array,beginner +firstSeen: 2020-12-28T12:35:44+02:00 +lastUpdated: 2020-12-29T13:06:47+02:00 --- Finds the index of a given element in a sorted array using the binary search algorithm. diff --git a/snippets/bind.md b/snippets/bind.md index 4979178fe..9b9cdff08 100644 --- a/snippets/bind.md +++ b/snippets/bind.md @@ -1,6 +1,8 @@ --- title: bind tags: function,object,advanced +firstSeen: 2018-01-24T14:14:49+02:00 +lastUpdated: 2020-10-18T23:04:45+03:00 --- Creates a function that invokes `fn` with a given context, optionally prepending any additional supplied parameters to the arguments. diff --git a/snippets/bindAll.md b/snippets/bindAll.md index a88371b9d..0099ff492 100644 --- a/snippets/bindAll.md +++ b/snippets/bindAll.md @@ -1,6 +1,8 @@ --- title: bindAll tags: object,function,intermediate +firstSeen: 2018-01-26T14:14:53+02:00 +lastUpdated: 2020-11-03T22:11:18+02:00 --- Binds methods of an object to the object itself, overwriting the existing method. diff --git a/snippets/bindKey.md b/snippets/bindKey.md index 636c1f0f9..e4c519674 100644 --- a/snippets/bindKey.md +++ b/snippets/bindKey.md @@ -1,6 +1,8 @@ --- title: bindKey tags: function,object,advanced +firstSeen: 2018-01-24T14:22:43+02:00 +lastUpdated: 2020-10-18T23:04:45+03:00 --- Creates a function that invokes the method at a given key of an object, optionally prepending any additional supplied parameters to the arguments. diff --git a/snippets/binomialCoefficient.md b/snippets/binomialCoefficient.md index 791283296..a7c8f7d53 100644 --- a/snippets/binomialCoefficient.md +++ b/snippets/binomialCoefficient.md @@ -1,6 +1,8 @@ --- title: binomialCoefficient tags: math,algorithm,beginner +firstSeen: 2018-02-14T12:34:02+02:00 +lastUpdated: 2020-12-28T13:49:24+02:00 --- Calculates the number of ways to choose `k` items from `n` items without repetition and without order. diff --git a/snippets/both.md b/snippets/both.md index 3b05f9876..15c5605e9 100644 --- a/snippets/both.md +++ b/snippets/both.md @@ -2,6 +2,8 @@ title: both tags: function,logic,beginner unlisted: true +firstSeen: 2020-05-13T11:35:36+03:00 +lastUpdated: 2021-01-04T13:04:15+02:00 --- Checks if both of the given functions return `true` for a given set of arguments. diff --git a/snippets/bottomVisible.md b/snippets/bottomVisible.md index 6355041f5..30575ea4a 100644 --- a/snippets/bottomVisible.md +++ b/snippets/bottomVisible.md @@ -1,6 +1,8 @@ --- title: bottomVisible tags: browser,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Checks if the bottom of the page is visible. diff --git a/snippets/btoa.md b/snippets/btoa.md index e22c37224..8f823884d 100644 --- a/snippets/btoa.md +++ b/snippets/btoa.md @@ -1,6 +1,8 @@ --- title: btoa tags: node,string,beginner +firstSeen: 2018-01-17T21:43:21+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Creates a base-64 encoded ASCII string from a String object in which each character in the string is treated as a byte of binary data. diff --git a/snippets/bubbleSort.md b/snippets/bubbleSort.md index c3126a3a0..2e6931f3f 100644 --- a/snippets/bubbleSort.md +++ b/snippets/bubbleSort.md @@ -1,6 +1,8 @@ --- title: bubbleSort tags: algorithm,array,beginner +firstSeen: 2020-12-27T21:20:31+02:00 +lastUpdated: 2020-12-29T12:18:58+02:00 --- Sorts an array of numbers, using the bubble sort algorithm. diff --git a/snippets/bucketSort.md b/snippets/bucketSort.md index 8cb8471f5..e51ee1ea5 100644 --- a/snippets/bucketSort.md +++ b/snippets/bucketSort.md @@ -1,6 +1,8 @@ --- title: bucketSort tags: algorithm,array,intermediate +firstSeen: 2020-12-28T22:11:56+02:00 +lastUpdated: 2020-12-29T12:22:44+02:00 --- Sorts an array of numbers, using the bucket sort algorithm. diff --git a/snippets/byteSize.md b/snippets/byteSize.md index 03ecf13e0..0a79c55e9 100644 --- a/snippets/byteSize.md +++ b/snippets/byteSize.md @@ -1,6 +1,8 @@ --- title: byteSize tags: string,beginner +firstSeen: 2017-12-29T14:30:34+02:00 +lastUpdated: 2020-10-18T23:04:45+03:00 --- Returns the length of a string in bytes. diff --git a/snippets/caesarCipher.md b/snippets/caesarCipher.md index 42f65225d..f81fa4570 100644 --- a/snippets/caesarCipher.md +++ b/snippets/caesarCipher.md @@ -1,6 +1,8 @@ --- title: caesarCipher tags: algorithm,string,beginner +firstSeen: 2020-12-28T20:10:18+02:00 +lastUpdated: 2020-12-29T12:29:21+02:00 --- Encrypts or decrypts a given string using the Caesar cipher. diff --git a/snippets/call.md b/snippets/call.md index ce176f8fd..1cf4c5d7a 100644 --- a/snippets/call.md +++ b/snippets/call.md @@ -1,6 +1,8 @@ --- title: call tags: function,advanced +firstSeen: 2017-12-22T21:54:30+02:00 +lastUpdated: 2021-06-13T13:50:25+03:00 --- Given a key and a set of arguments, call them when given a context. diff --git a/snippets/capitalize.md b/snippets/capitalize.md index 509a1b555..b2bf5e2e8 100644 --- a/snippets/capitalize.md +++ b/snippets/capitalize.md @@ -1,6 +1,8 @@ --- title: capitalize tags: string,intermediate +firstSeen: 2017-12-17T16:41:31+02:00 +lastUpdated: 2020-11-01T20:50:57+02:00 --- Capitalizes the first letter of a string. diff --git a/snippets/capitalizeEveryWord.md b/snippets/capitalizeEveryWord.md index ff29c5862..75951b47d 100644 --- a/snippets/capitalizeEveryWord.md +++ b/snippets/capitalizeEveryWord.md @@ -1,6 +1,8 @@ --- title: capitalizeEveryWord tags: string,regexp,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Capitalizes the first letter of every word in a string. diff --git a/snippets/cartesianProduct.md b/snippets/cartesianProduct.md index 5c80b8bea..15854c1a6 100644 --- a/snippets/cartesianProduct.md +++ b/snippets/cartesianProduct.md @@ -1,6 +1,8 @@ --- title: cartesianProduct tags: math,array,beginner +firstSeen: 2020-12-28T20:23:47+02:00 +lastUpdated: 2020-12-29T12:31:43+02:00 --- Calculates the cartesian product of two arrays. diff --git a/snippets/castArray.md b/snippets/castArray.md index 7fc0b3f01..6363592e7 100644 --- a/snippets/castArray.md +++ b/snippets/castArray.md @@ -1,6 +1,8 @@ --- title: castArray tags: type,array,beginner +firstSeen: 2018-01-23T20:54:12+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Casts the provided value as an array if it's not one. diff --git a/snippets/celsiusToFahrenheit.md b/snippets/celsiusToFahrenheit.md index 0161ac958..5dcaaffd3 100644 --- a/snippets/celsiusToFahrenheit.md +++ b/snippets/celsiusToFahrenheit.md @@ -2,6 +2,8 @@ title: celsiusToFahrenheit tags: math,beginner unlisted: true +firstSeen: 2020-04-16T11:00:06+03:00 +lastUpdated: 2021-01-04T13:04:15+02:00 --- Converts Celsius to Fahrenheit. diff --git a/snippets/chainAsync.md b/snippets/chainAsync.md index c6feb34d5..9b1ffcc57 100644 --- a/snippets/chainAsync.md +++ b/snippets/chainAsync.md @@ -1,6 +1,8 @@ --- title: chainAsync tags: function,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Chains asynchronous functions. diff --git a/snippets/changeLightness.md b/snippets/changeLightness.md index 559957b1e..568b38ce8 100644 --- a/snippets/changeLightness.md +++ b/snippets/changeLightness.md @@ -1,6 +1,8 @@ --- title: changeLightness tags: string,browser,regexp,intermediate +firstSeen: 2020-10-30T17:38:31+02:00 +lastUpdated: 2020-10-31T16:37:54+02:00 --- Changes the lightness value of an `hsl()` color string. diff --git a/snippets/checkProp.md b/snippets/checkProp.md index 719ce4a14..be4387869 100644 --- a/snippets/checkProp.md +++ b/snippets/checkProp.md @@ -1,6 +1,8 @@ --- title: checkProp tags: function,object,intermediate +firstSeen: 2019-03-17T03:53:00+02:00 +lastUpdated: 2020-11-01T20:50:57+02:00 --- Creates a function that will invoke a predicate function for the specified property on a given object. diff --git a/snippets/chunk.md b/snippets/chunk.md index 887019e60..6587d728e 100644 --- a/snippets/chunk.md +++ b/snippets/chunk.md @@ -1,6 +1,8 @@ --- title: chunk tags: array,intermediate +firstSeen: 2017-12-17T16:41:31+02:00 +lastUpdated: 2020-11-03T21:35:12+02:00 --- Chunks an array into smaller arrays of a specified size. diff --git a/snippets/chunkIntoN.md b/snippets/chunkIntoN.md index 3fa087486..dc3f4f5b9 100644 --- a/snippets/chunkIntoN.md +++ b/snippets/chunkIntoN.md @@ -1,6 +1,8 @@ --- title: chunkIntoN tags: array,intermediate +firstSeen: 2020-05-04T13:00:46+03:00 +lastUpdated: 2020-11-03T21:46:13+02:00 --- Chunks an array into `n` smaller arrays. diff --git a/snippets/chunkify.md b/snippets/chunkify.md index 00d6ac04c..13ce22438 100644 --- a/snippets/chunkify.md +++ b/snippets/chunkify.md @@ -1,6 +1,8 @@ --- title: chunkify tags: function,generator,array,advanced +firstSeen: 2021-03-16T22:50:40+02:00 +lastUpdated: 2021-03-16T22:50:40+02:00 --- Chunks an iterable into smaller arrays of a specified size. diff --git a/snippets/clampNumber.md b/snippets/clampNumber.md index 1d01ed463..abaa9a1e9 100644 --- a/snippets/clampNumber.md +++ b/snippets/clampNumber.md @@ -1,6 +1,8 @@ --- title: clampNumber tags: math,beginner +firstSeen: 2017-12-20T19:19:18+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Clamps `num` within the inclusive range specified by the boundary values `a` and `b`. diff --git a/snippets/cloneRegExp.md b/snippets/cloneRegExp.md index 33d8b1998..2754495f2 100644 --- a/snippets/cloneRegExp.md +++ b/snippets/cloneRegExp.md @@ -1,6 +1,8 @@ --- title: cloneRegExp tags: type,intermediate +firstSeen: 2018-01-01T19:45:47+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Clones a regular expression. diff --git a/snippets/coalesce.md b/snippets/coalesce.md index 2a6c118fb..0ee5a201c 100644 --- a/snippets/coalesce.md +++ b/snippets/coalesce.md @@ -1,6 +1,8 @@ --- title: coalesce tags: type,beginner +firstSeen: 2017-12-17T10:08:55+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Returns the first defined, non-null argument. diff --git a/snippets/coalesceFactory.md b/snippets/coalesceFactory.md index 1c181a1c6..e0e4bb9b4 100644 --- a/snippets/coalesceFactory.md +++ b/snippets/coalesceFactory.md @@ -1,6 +1,8 @@ --- title: coalesceFactory tags: function,type,intermediate +firstSeen: 2017-12-18T12:15:36+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Customizes a coalesce function that returns the first argument which is true based on the given validator. diff --git a/snippets/collectInto.md b/snippets/collectInto.md index c74725e7a..7b4389dc3 100644 --- a/snippets/collectInto.md +++ b/snippets/collectInto.md @@ -1,6 +1,8 @@ --- title: collectInto tags: function,array,intermediate +firstSeen: 2017-12-22T05:08:36+02:00 +lastUpdated: 2021-06-13T13:50:25+03:00 --- Changes a function that accepts an array into a variadic function. diff --git a/snippets/colorize.md b/snippets/colorize.md index a203fd157..8b163a7d6 100644 --- a/snippets/colorize.md +++ b/snippets/colorize.md @@ -1,6 +1,8 @@ --- title: colorize tags: node,string,intermediate +firstSeen: 2018-01-13T13:36:59+02:00 +lastUpdated: 2020-11-03T22:11:18+02:00 --- Adds special characters to text to print in color in the console (combined with `console.log()`). diff --git a/snippets/combine.md b/snippets/combine.md index c526d4002..23732f29d 100644 --- a/snippets/combine.md +++ b/snippets/combine.md @@ -1,6 +1,8 @@ --- title: combine tags: array,object,intermediate +firstSeen: 2020-10-04T00:26:51+03:00 +lastUpdated: 2020-10-08T02:22:39+03:00 --- Combines two arrays of objects, using the specified key to match objects. diff --git a/snippets/compact.md b/snippets/compact.md index e7b6250e4..a2aad3042 100644 --- a/snippets/compact.md +++ b/snippets/compact.md @@ -1,6 +1,8 @@ --- title: compact tags: array,beginner +firstSeen: 2017-12-14T08:19:15+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Removes falsy values from an array. diff --git a/snippets/compactObject.md b/snippets/compactObject.md index 74feb38d1..e7481742b 100644 --- a/snippets/compactObject.md +++ b/snippets/compactObject.md @@ -1,6 +1,8 @@ --- title: compactObject tags: object,array,recursion,advanced +firstSeen: 2020-11-27T13:57:41+02:00 +lastUpdated: 2020-11-27T13:57:41+02:00 --- Deeply removes all falsy values from an object or array. diff --git a/snippets/compactWhitespace.md b/snippets/compactWhitespace.md index 5a6e9dbc8..fd39ed3e6 100644 --- a/snippets/compactWhitespace.md +++ b/snippets/compactWhitespace.md @@ -1,6 +1,8 @@ --- title: compactWhitespace tags: string,regexp,beginner +firstSeen: 2018-12-12T19:11:33+02:00 +lastUpdated: 2020-10-18T23:04:45+03:00 --- Compacts whitespaces in a string. diff --git a/snippets/complement.md b/snippets/complement.md index 9f62b315c..1b96ed930 100644 --- a/snippets/complement.md +++ b/snippets/complement.md @@ -1,6 +1,8 @@ --- title: complement tags: function,logic,beginner +firstSeen: 2020-05-13T11:28:33+03:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Returns a function that is the logical complement of the given function, `fn`. diff --git a/snippets/compose.md b/snippets/compose.md index d160e3702..576090122 100644 --- a/snippets/compose.md +++ b/snippets/compose.md @@ -1,6 +1,8 @@ --- title: compose tags: function,intermediate +firstSeen: 2017-12-17T16:41:31+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Performs right-to-left function composition. diff --git a/snippets/composeRight.md b/snippets/composeRight.md index af9e1ba2d..50d6753ff 100644 --- a/snippets/composeRight.md +++ b/snippets/composeRight.md @@ -1,6 +1,8 @@ --- title: composeRight tags: function,intermediate +firstSeen: 2018-01-23T22:12:56+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Performs left-to-right function composition. diff --git a/snippets/containsWhitespace.md b/snippets/containsWhitespace.md index 45e0e7998..11086d21e 100644 --- a/snippets/containsWhitespace.md +++ b/snippets/containsWhitespace.md @@ -1,6 +1,8 @@ --- title: containsWhitespace tags: string,regexp,beginner +firstSeen: 2020-03-25T12:37:13+02:00 +lastUpdated: 2020-10-18T23:04:45+03:00 --- Checks if the given string contains any whitespace characters. diff --git a/snippets/converge.md b/snippets/converge.md index 804503238..953c40f9a 100644 --- a/snippets/converge.md +++ b/snippets/converge.md @@ -1,6 +1,8 @@ --- title: converge tags: function,intermediate +firstSeen: 2018-02-07T12:23:04+02:00 +lastUpdated: 2021-01-08T00:23:44+02:00 --- Accepts a converging function and a list of branching functions and returns a function that applies each branching function to the arguments and the results of the branching functions are passed as arguments to the converging function. diff --git a/snippets/copySign.md b/snippets/copySign.md index 7a968f4b9..ded165872 100644 --- a/snippets/copySign.md +++ b/snippets/copySign.md @@ -1,6 +1,8 @@ --- title: copySign tags: math,beginner +firstSeen: 2020-10-07T23:52:57+03:00 +lastUpdated: 2020-10-07T23:52:57+03:00 --- Returns the absolute value of the first number, but the sign of the second. diff --git a/snippets/copyToClipboard.md b/snippets/copyToClipboard.md index d4c684b46..82c5ff65d 100644 --- a/snippets/copyToClipboard.md +++ b/snippets/copyToClipboard.md @@ -1,6 +1,8 @@ --- title: copyToClipboard tags: browser,string,event,advanced +firstSeen: 2017-12-31T11:40:33+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Copies a string to the clipboard. diff --git a/snippets/countBy.md b/snippets/countBy.md index 3d3edfd2c..e006521ba 100644 --- a/snippets/countBy.md +++ b/snippets/countBy.md @@ -1,6 +1,8 @@ --- title: countBy tags: array,object,intermediate +firstSeen: 2018-01-11T13:45:53+02:00 +lastUpdated: 2020-11-03T22:11:18+02:00 --- Groups the elements of an array based on the given function and returns the count of elements in each group. diff --git a/snippets/countOccurrences.md b/snippets/countOccurrences.md index d9c8a1227..60359f0dc 100644 --- a/snippets/countOccurrences.md +++ b/snippets/countOccurrences.md @@ -1,6 +1,8 @@ --- title: countOccurrences tags: array,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-18T23:04:45+03:00 --- Counts the occurrences of a value in an array. diff --git a/snippets/countSubstrings.md b/snippets/countSubstrings.md index ab95bd8e4..98bc36bca 100644 --- a/snippets/countSubstrings.md +++ b/snippets/countSubstrings.md @@ -1,6 +1,8 @@ --- title: countSubstrings tags: string,algorithm,beginner +firstSeen: 2020-12-31T13:58:51+02:00 +lastUpdated: 2021-01-08T00:23:44+02:00 --- Counts the occurrences of a substring in a given string. diff --git a/snippets/countWeekDaysBetween.md b/snippets/countWeekDaysBetween.md index 951fd985d..35cdf605e 100644 --- a/snippets/countWeekDaysBetween.md +++ b/snippets/countWeekDaysBetween.md @@ -1,6 +1,8 @@ --- title: countWeekDaysBetween tags: date,intermediate +firstSeen: 2020-10-11T11:44:44+03:00 +lastUpdated: 2020-10-20T11:21:07+03:00 --- Counts the weekdays between two dates. diff --git a/snippets/counter.md b/snippets/counter.md index 8b4b3721c..15bd335ab 100644 --- a/snippets/counter.md +++ b/snippets/counter.md @@ -1,6 +1,8 @@ --- title: counter tags: browser,advanced +firstSeen: 2018-05-06T17:55:46+03:00 +lastUpdated: 2020-11-01T20:50:57+02:00 --- Creates a counter with the specified range, step and duration for the specified selector. diff --git a/snippets/createDirIfNotExists.md b/snippets/createDirIfNotExists.md index 2e76b0b7d..4fef6a026 100644 --- a/snippets/createDirIfNotExists.md +++ b/snippets/createDirIfNotExists.md @@ -1,6 +1,8 @@ --- title: createDirIfNotExists tags: node,beginner +firstSeen: 2018-12-12T19:25:16+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Creates a directory, if it does not exist. diff --git a/snippets/createElement.md b/snippets/createElement.md index e50471fce..96a10db40 100644 --- a/snippets/createElement.md +++ b/snippets/createElement.md @@ -1,6 +1,8 @@ --- title: createElement tags: browser,beginner +firstSeen: 2018-01-05T18:21:44+02:00 +lastUpdated: 2020-10-19T18:51:03+03:00 --- Creates an element from a string (without appending it to the document). diff --git a/snippets/createEventHub.md b/snippets/createEventHub.md index e03a5d1d4..043358c44 100644 --- a/snippets/createEventHub.md +++ b/snippets/createEventHub.md @@ -1,6 +1,8 @@ --- title: createEventHub tags: browser,event,advanced +firstSeen: 2018-01-05T15:07:26+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Creates a pub/sub ([publish–subscribe](https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern)) event hub with `emit`, `on`, and `off` methods. diff --git a/snippets/currentURL.md b/snippets/currentURL.md index a17b81ff0..5f84e305c 100644 --- a/snippets/currentURL.md +++ b/snippets/currentURL.md @@ -1,6 +1,8 @@ --- title: currentURL tags: browser,beginner +firstSeen: 2017-12-18T11:05:03+02:00 +lastUpdated: 2020-10-20T11:46:23+03:00 --- Returns the current URL. diff --git a/snippets/curry.md b/snippets/curry.md index a54dfd2b5..68a084130 100644 --- a/snippets/curry.md +++ b/snippets/curry.md @@ -1,6 +1,8 @@ --- title: curry tags: function,recursion,advanced +firstSeen: 2017-12-10T15:21:35+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Curries a function. diff --git a/snippets/cycleGenerator.md b/snippets/cycleGenerator.md index 586b6fff9..95355e41c 100644 --- a/snippets/cycleGenerator.md +++ b/snippets/cycleGenerator.md @@ -1,6 +1,8 @@ --- title: cycleGenerator tags: function,generator,advanced +firstSeen: 2020-10-11T17:05:38+03:00 +lastUpdated: 2020-10-11T17:05:38+03:00 --- Creates a generator, looping over the given array indefinitely. diff --git a/snippets/dayName.md b/snippets/dayName.md index 2344faa13..4c64a969c 100644 --- a/snippets/dayName.md +++ b/snippets/dayName.md @@ -1,6 +1,8 @@ --- title: dayName tags: date,beginner +firstSeen: 2020-10-04T00:31:08+03:00 +lastUpdated: 2020-11-01T20:50:57+02:00 --- Gets the name of the weekday from a `Date` object. diff --git a/snippets/dayOfYear.md b/snippets/dayOfYear.md index 6cb7e240e..b38c819a5 100644 --- a/snippets/dayOfYear.md +++ b/snippets/dayOfYear.md @@ -1,6 +1,8 @@ --- title: dayOfYear tags: date,beginner +firstSeen: 2018-09-29T13:22:20+03:00 +lastUpdated: 2020-10-19T18:51:03+03:00 --- Gets the day of the year (number in the range 1-366) from a `Date` object. diff --git a/snippets/daysAgo.md b/snippets/daysAgo.md index 24e0870dd..23c7d38ec 100644 --- a/snippets/daysAgo.md +++ b/snippets/daysAgo.md @@ -1,6 +1,8 @@ --- title: daysAgo tags: date,beginner +firstSeen: 2020-10-06T05:35:23+03:00 +lastUpdated: 2020-10-20T11:21:07+03:00 --- Calculates the date of `n` days ago from today as a string representation. diff --git a/snippets/daysFromNow.md b/snippets/daysFromNow.md index 13da018e2..1178ccecd 100644 --- a/snippets/daysFromNow.md +++ b/snippets/daysFromNow.md @@ -1,6 +1,8 @@ --- title: daysFromNow tags: date,beginner +firstSeen: 2020-10-09T02:49:17+03:00 +lastUpdated: 2020-10-20T11:21:07+03:00 --- Calculates the date of `n` days from today as a string representation. diff --git a/snippets/debounce.md b/snippets/debounce.md index dc0d2b885..ab45c004f 100644 --- a/snippets/debounce.md +++ b/snippets/debounce.md @@ -1,6 +1,8 @@ --- title: debounce tags: function,intermediate +firstSeen: 2018-01-28T15:18:26+02:00 +lastUpdated: 2020-10-19T18:51:03+03:00 --- Creates a debounced function that delays invoking the provided function until at least `ms` milliseconds have elapsed since the last time it was invoked. diff --git a/snippets/debouncePromise.md b/snippets/debouncePromise.md index b86b99dc5..4d7bdf8ae 100644 --- a/snippets/debouncePromise.md +++ b/snippets/debouncePromise.md @@ -1,6 +1,8 @@ --- title: debouncePromise tags: function,promise,advanced +firstSeen: 2020-10-10T21:09:04+03:00 +lastUpdated: 2020-10-19T18:51:03+03:00 --- Creates a debounced function that returns a promise, but delays invoking the provided function until at least `ms` milliseconds have elapsed since the last time it was invoked. diff --git a/snippets/decapitalize.md b/snippets/decapitalize.md index 14565b15f..929ac3d92 100644 --- a/snippets/decapitalize.md +++ b/snippets/decapitalize.md @@ -1,6 +1,8 @@ --- title: decapitalize tags: string,intermediate +firstSeen: 2018-01-11T11:58:40+02:00 +lastUpdated: 2020-11-01T20:50:57+02:00 --- Decapitalizes the first letter of a string. diff --git a/snippets/deepClone.md b/snippets/deepClone.md index 54bcb9b9d..fd7d49193 100644 --- a/snippets/deepClone.md +++ b/snippets/deepClone.md @@ -1,6 +1,8 @@ --- title: deepClone tags: object,recursion,advanced +firstSeen: 2018-01-23T20:48:46+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Creates a deep clone of an object. diff --git a/snippets/deepFlatten.md b/snippets/deepFlatten.md index 200d486a2..789b654b6 100644 --- a/snippets/deepFlatten.md +++ b/snippets/deepFlatten.md @@ -1,6 +1,8 @@ --- title: deepFlatten tags: array,recursion,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Deep flattens an array. diff --git a/snippets/deepFreeze.md b/snippets/deepFreeze.md index 41184f6ca..6f136db79 100644 --- a/snippets/deepFreeze.md +++ b/snippets/deepFreeze.md @@ -1,6 +1,8 @@ --- title: deepFreeze tags: object,recursion,intermediate +firstSeen: 2018-08-25T18:54:16+03:00 +lastUpdated: 2020-10-19T18:51:03+03:00 --- Deep freezes an object. diff --git a/snippets/deepGet.md b/snippets/deepGet.md index c8e2fbe71..685566aca 100644 --- a/snippets/deepGet.md +++ b/snippets/deepGet.md @@ -1,6 +1,8 @@ --- title: deepGet tags: object,intermediate +firstSeen: 2019-05-09T13:30:52+03:00 +lastUpdated: 2020-10-19T18:51:03+03:00 --- Gets the target value in a nested JSON object, based on the `keys` array. diff --git a/snippets/deepMapKeys.md b/snippets/deepMapKeys.md index 5e155f460..68c9b386b 100644 --- a/snippets/deepMapKeys.md +++ b/snippets/deepMapKeys.md @@ -1,6 +1,8 @@ --- title: deepMapKeys tags: object,recursion,advanced +firstSeen: 2018-11-29T15:22:53+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Deep maps an object's keys. diff --git a/snippets/defaults.md b/snippets/defaults.md index a72fcfe84..f86be5caf 100644 --- a/snippets/defaults.md +++ b/snippets/defaults.md @@ -1,6 +1,8 @@ --- title: defaults tags: object,intermediate +firstSeen: 2018-01-19T13:51:05+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Assigns default values for all properties in an object that are `undefined`. diff --git a/snippets/defer.md b/snippets/defer.md index fe485d5f0..b8e08461f 100644 --- a/snippets/defer.md +++ b/snippets/defer.md @@ -1,6 +1,8 @@ --- title: defer tags: function,intermediate +firstSeen: 2018-01-01T23:40:31+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Defers invoking a function until the current call stack has cleared. diff --git a/snippets/degreesToRads.md b/snippets/degreesToRads.md index 783b85f52..b8191fab3 100644 --- a/snippets/degreesToRads.md +++ b/snippets/degreesToRads.md @@ -1,6 +1,8 @@ --- title: degreesToRads tags: math,beginner +firstSeen: 2018-02-14T12:24:50+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Converts an angle from degrees to radians. diff --git a/snippets/delay.md b/snippets/delay.md index 0ee1f0e57..4532da969 100644 --- a/snippets/delay.md +++ b/snippets/delay.md @@ -1,6 +1,8 @@ --- title: delay tags: function,intermediate +firstSeen: 2018-01-24T14:32:20+02:00 +lastUpdated: 2020-10-19T18:51:03+03:00 --- Invokes the provided function after `ms` milliseconds. diff --git a/snippets/detectDeviceType.md b/snippets/detectDeviceType.md index 16675c863..a6cc9915d 100644 --- a/snippets/detectDeviceType.md +++ b/snippets/detectDeviceType.md @@ -1,6 +1,8 @@ --- title: detectDeviceType tags: browser,regexp,intermediate +firstSeen: 2017-12-24T09:39:23+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Detects whether the page is being viewed on a mobile device or a desktop. diff --git a/snippets/detectLanguage.md b/snippets/detectLanguage.md index ff31377c8..69969e211 100644 --- a/snippets/detectLanguage.md +++ b/snippets/detectLanguage.md @@ -1,6 +1,8 @@ --- title: detectLanguage tags: browser,intermediate +firstSeen: 2020-10-05T18:03:26+03:00 +lastUpdated: 2020-10-06T18:47:16+03:00 --- Detects the preferred language of the current user. diff --git a/snippets/difference.md b/snippets/difference.md index 41dafbd8c..aeb1b381c 100644 --- a/snippets/difference.md +++ b/snippets/difference.md @@ -1,6 +1,8 @@ --- title: difference tags: array,beginner +firstSeen: 2017-12-17T16:41:31+02:00 +lastUpdated: 2020-10-19T18:51:03+03:00 --- Calculates the difference between two arrays, without filtering duplicate values. diff --git a/snippets/differenceBy.md b/snippets/differenceBy.md index e6861d939..d1d4c87f1 100644 --- a/snippets/differenceBy.md +++ b/snippets/differenceBy.md @@ -1,6 +1,8 @@ --- title: differenceBy tags: array,intermediate +firstSeen: 2018-01-24T11:49:03+02:00 +lastUpdated: 2020-10-19T18:52:00+03:00 --- Returns the difference between two arrays, after applying the provided function to each array element of both. diff --git a/snippets/differenceWith.md b/snippets/differenceWith.md index a68f8abc9..d69daea66 100644 --- a/snippets/differenceWith.md +++ b/snippets/differenceWith.md @@ -1,6 +1,8 @@ --- title: differenceWith tags: array,intermediate +firstSeen: 2017-12-19T12:32:24+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Filters out all values from an array for which the comparator function does not return `true`. diff --git a/snippets/dig.md b/snippets/dig.md index c19a26011..a91cc9409 100644 --- a/snippets/dig.md +++ b/snippets/dig.md @@ -1,6 +1,8 @@ --- title: dig tags: object,recursion,intermediate +firstSeen: 2018-07-08T23:06:24+03:00 +lastUpdated: 2020-10-19T18:51:03+03:00 --- Gets the target value in a nested JSON object, based on the given key. diff --git a/snippets/digitize.md b/snippets/digitize.md index 6206bd1ae..e6b1a7426 100644 --- a/snippets/digitize.md +++ b/snippets/digitize.md @@ -1,6 +1,8 @@ --- title: digitize tags: math,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-18T14:58:09+03:00 --- Converts a number to an array of digits, removing its sign if necessary. diff --git a/snippets/distance.md b/snippets/distance.md index bc375a64e..e27e2eeef 100644 --- a/snippets/distance.md +++ b/snippets/distance.md @@ -1,6 +1,8 @@ --- title: distance tags: math,algorithm,beginner +firstSeen: 2017-12-17T16:41:31+02:00 +lastUpdated: 2020-12-28T13:49:24+02:00 --- Calculates the distance between two points. diff --git a/snippets/divmod.md b/snippets/divmod.md index 70567771d..8881cc5bf 100644 --- a/snippets/divmod.md +++ b/snippets/divmod.md @@ -1,6 +1,8 @@ --- title: divmod tags: math,beginner +firstSeen: 2020-10-07T23:59:13+03:00 +lastUpdated: 2020-10-07T23:59:13+03:00 --- Returns an array consisting of the quotient and remainder of the given numbers. diff --git a/snippets/drop.md b/snippets/drop.md index c89dd2f86..f478051c5 100644 --- a/snippets/drop.md +++ b/snippets/drop.md @@ -1,6 +1,8 @@ --- title: drop tags: array,beginner +firstSeen: 2018-01-26T12:23:18+02:00 +lastUpdated: 2020-11-01T20:50:57+02:00 --- Creates a new array with `n` elements removed from the left. diff --git a/snippets/dropRight.md b/snippets/dropRight.md index b38f9704d..f21ebf618 100644 --- a/snippets/dropRight.md +++ b/snippets/dropRight.md @@ -1,6 +1,8 @@ --- title: dropRight tags: array,beginner +firstSeen: 2017-12-19T12:06:47+02:00 +lastUpdated: 2020-11-01T20:50:57+02:00 --- Creates a new array with `n` elements removed from the right. diff --git a/snippets/dropRightWhile.md b/snippets/dropRightWhile.md index 452aae6e5..c140420f1 100644 --- a/snippets/dropRightWhile.md +++ b/snippets/dropRightWhile.md @@ -1,6 +1,8 @@ --- title: dropRightWhile tags: array,intermediate +firstSeen: 2018-01-26T12:23:18+02:00 +lastUpdated: 2020-10-19T18:51:03+03:00 --- Removes elements from the end of an array until the passed function returns `true`. diff --git a/snippets/dropWhile.md b/snippets/dropWhile.md index 6eaa33133..d9a3d970b 100644 --- a/snippets/dropWhile.md +++ b/snippets/dropWhile.md @@ -1,6 +1,8 @@ --- title: dropWhile tags: array,intermediate +firstSeen: 2018-01-26T12:23:18+02:00 +lastUpdated: 2020-10-19T18:51:03+03:00 --- Removes elements in an array until the passed function returns `true`. diff --git a/snippets/either.md b/snippets/either.md index 5fa9a5fb3..c54cd8355 100644 --- a/snippets/either.md +++ b/snippets/either.md @@ -1,6 +1,8 @@ --- title: either tags: function,logic,beginner +firstSeen: 2020-05-13T11:35:46+03:00 +lastUpdated: 2020-10-19T18:51:03+03:00 --- Checks if at least one function returns `true` for a given set of arguments. diff --git a/snippets/elementContains.md b/snippets/elementContains.md index 126671b48..66ccc4961 100644 --- a/snippets/elementContains.md +++ b/snippets/elementContains.md @@ -1,6 +1,8 @@ --- title: elementContains tags: browser,intermediate +firstSeen: 2018-06-19T20:57:58+03:00 +lastUpdated: 2020-11-03T22:11:18+02:00 --- Checks if the `parent` element contains the `child` element. diff --git a/snippets/elementIsFocused.md b/snippets/elementIsFocused.md index d5c136524..35a62772d 100644 --- a/snippets/elementIsFocused.md +++ b/snippets/elementIsFocused.md @@ -1,6 +1,8 @@ --- title: elementIsFocused tags: browser,beginner +firstSeen: 2020-08-07T15:21:27+03:00 +lastUpdated: 2020-10-19T18:51:03+03:00 --- Checks if the given element is focused. diff --git a/snippets/elementIsVisibleInViewport.md b/snippets/elementIsVisibleInViewport.md index cc08a7cba..448fd2088 100644 --- a/snippets/elementIsVisibleInViewport.md +++ b/snippets/elementIsVisibleInViewport.md @@ -1,6 +1,8 @@ --- title: elementIsVisibleInViewport tags: browser,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Checks if the element specified is visible in the viewport. diff --git a/snippets/equals.md b/snippets/equals.md index 8f6ba4dae..4138bb315 100644 --- a/snippets/equals.md +++ b/snippets/equals.md @@ -1,6 +1,8 @@ --- title: equals tags: object,array,type,advanced +firstSeen: 2018-01-15T18:34:11+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Performs a deep comparison between two values to determine if they are equivalent. diff --git a/snippets/escapeHTML.md b/snippets/escapeHTML.md index bd99a50d5..1b56c0f1b 100644 --- a/snippets/escapeHTML.md +++ b/snippets/escapeHTML.md @@ -1,6 +1,8 @@ --- title: escapeHTML tags: string,browser,regexp,intermediate +firstSeen: 2017-12-29T15:09:21+02:00 +lastUpdated: 2020-10-19T18:51:03+03:00 --- Escapes a string for use in HTML. diff --git a/snippets/escapeRegExp.md b/snippets/escapeRegExp.md index d84f865c4..093c4961e 100644 --- a/snippets/escapeRegExp.md +++ b/snippets/escapeRegExp.md @@ -1,6 +1,8 @@ --- title: escapeRegExp tags: string,regexp,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Escapes a string to use in a regular expression. diff --git a/snippets/euclideanDistance.md b/snippets/euclideanDistance.md index 5ce5a39bc..cc438ecae 100644 --- a/snippets/euclideanDistance.md +++ b/snippets/euclideanDistance.md @@ -1,6 +1,8 @@ --- title: euclideanDistance tags: math,algorithm,intermediate +firstSeen: 2020-12-28T13:41:19+02:00 +lastUpdated: 2020-12-28T13:41:19+02:00 --- Calculates the distance between two points in any number of dimensions. diff --git a/snippets/everyNth.md b/snippets/everyNth.md index 691c75457..e462600f0 100644 --- a/snippets/everyNth.md +++ b/snippets/everyNth.md @@ -1,6 +1,8 @@ --- title: everyNth tags: array,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-19T18:51:03+03:00 --- Returns every `nth` element in an array. diff --git a/snippets/expandTabs.md b/snippets/expandTabs.md index 91c559659..fca2e54b4 100644 --- a/snippets/expandTabs.md +++ b/snippets/expandTabs.md @@ -1,6 +1,8 @@ --- title: expandTabs tags: string,regexp,beginner +firstSeen: 2020-06-01T17:05:39+03:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Convert tabs to spaces, where each tab corresponds to `count` spaces. diff --git a/snippets/extendHex.md b/snippets/extendHex.md index f99a515ff..93d01505c 100644 --- a/snippets/extendHex.md +++ b/snippets/extendHex.md @@ -1,6 +1,8 @@ --- title: extendHex tags: string,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Extends a 3-digit color code to a 6-digit color code. diff --git a/snippets/factorial.md b/snippets/factorial.md index cddd9f499..9be5d5518 100644 --- a/snippets/factorial.md +++ b/snippets/factorial.md @@ -1,6 +1,8 @@ --- title: factorial tags: math,algorithm,recursion,beginner +firstSeen: 2017-12-07T14:41:33+02:00 +lastUpdated: 2020-12-28T13:49:24+02:00 --- Calculates the factorial of a number. diff --git a/snippets/fahrenheitToCelsius.md b/snippets/fahrenheitToCelsius.md index 745624b38..22986f310 100644 --- a/snippets/fahrenheitToCelsius.md +++ b/snippets/fahrenheitToCelsius.md @@ -2,6 +2,8 @@ title: fahrenheitToCelsius tags: math,beginner unlisted: true +firstSeen: 2020-04-16T11:00:06+03:00 +lastUpdated: 2021-01-04T13:04:15+02:00 --- Converts Fahrenheit to Celsius. diff --git a/snippets/fibonacci.md b/snippets/fibonacci.md index c761e9c5b..4cae957c3 100644 --- a/snippets/fibonacci.md +++ b/snippets/fibonacci.md @@ -1,6 +1,8 @@ --- title: fibonacci tags: math,algorithm,intermediate +firstSeen: 2017-12-17T16:41:31+02:00 +lastUpdated: 2020-12-28T13:49:24+02:00 --- Generates an array, containing the Fibonacci sequence, up until the nth term. diff --git a/snippets/filterNonUnique.md b/snippets/filterNonUnique.md index ee290fcc4..f1b93b0f7 100644 --- a/snippets/filterNonUnique.md +++ b/snippets/filterNonUnique.md @@ -1,6 +1,8 @@ --- title: filterNonUnique tags: array,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-11-02T19:40:45+02:00 --- Creates an array with the non-unique values filtered out. diff --git a/snippets/filterNonUniqueBy.md b/snippets/filterNonUniqueBy.md index 308f42969..3e8afc85c 100644 --- a/snippets/filterNonUniqueBy.md +++ b/snippets/filterNonUniqueBy.md @@ -1,6 +1,8 @@ --- title: filterNonUniqueBy tags: array,intermediate +firstSeen: 2018-07-18T20:40:53+03:00 +lastUpdated: 2020-11-02T19:40:27+02:00 --- Creates an array with the non-unique values filtered out, based on a provided comparator function. diff --git a/snippets/filterUnique.md b/snippets/filterUnique.md index 5fa27edbf..e47fa6a80 100644 --- a/snippets/filterUnique.md +++ b/snippets/filterUnique.md @@ -1,6 +1,8 @@ --- title: filterUnique tags: array,beginner +firstSeen: 2020-11-02T19:41:00+02:00 +lastUpdated: 2020-11-02T19:41:00+02:00 --- Creates an array with the unique values filtered out. diff --git a/snippets/filterUniqueBy.md b/snippets/filterUniqueBy.md index 4ffcbd45c..cf6972bcb 100644 --- a/snippets/filterUniqueBy.md +++ b/snippets/filterUniqueBy.md @@ -1,6 +1,8 @@ --- title: filterUniqueBy tags: array,intermediate +firstSeen: 2020-11-02T19:41:07+02:00 +lastUpdated: 2020-11-02T19:41:07+02:00 --- Creates an array with the unique values filtered out, based on a provided comparator function. diff --git a/snippets/findClosestAnchor.md b/snippets/findClosestAnchor.md index 1083b3520..6ea2aa647 100644 --- a/snippets/findClosestAnchor.md +++ b/snippets/findClosestAnchor.md @@ -1,6 +1,8 @@ --- title: findClosestAnchor tags: browser,intermediate +firstSeen: 2021-04-22T08:45:39+03:00 +lastUpdated: 2021-04-22T08:45:39+03:00 --- Finds the anchor node closest to the given `node`, if any. diff --git a/snippets/findClosestMatchingNode.md b/snippets/findClosestMatchingNode.md index 8c0c200de..9187e0c09 100644 --- a/snippets/findClosestMatchingNode.md +++ b/snippets/findClosestMatchingNode.md @@ -1,6 +1,8 @@ --- title: findClosestMatchingNode tags: browser,intermediate +firstSeen: 2021-04-22T08:45:39+03:00 +lastUpdated: 2021-04-22T08:45:39+03:00 --- Finds the closest matching node starting at the given `node`. diff --git a/snippets/findFirstN.md b/snippets/findFirstN.md index 97da01bdf..b47aa4cc5 100644 --- a/snippets/findFirstN.md +++ b/snippets/findFirstN.md @@ -1,6 +1,8 @@ --- title: findFirstN tags: array,intermediate +firstSeen: 2021-05-09T13:31:36+03:00 +lastUpdated: 2021-05-09T13:31:36+03:00 --- Finds the first `n` elements for which the provided function returns a truthy value. diff --git a/snippets/findKey.md b/snippets/findKey.md index c4b793314..391029dd5 100644 --- a/snippets/findKey.md +++ b/snippets/findKey.md @@ -1,6 +1,8 @@ --- title: findKey tags: object,intermediate +firstSeen: 2018-01-23T18:23:20+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Finds the first key that satisfies the provided testing function. diff --git a/snippets/findKeys.md b/snippets/findKeys.md index e6b4030e3..31289fc25 100644 --- a/snippets/findKeys.md +++ b/snippets/findKeys.md @@ -1,6 +1,8 @@ --- title: findKeys tags: object,beginner +firstSeen: 2020-10-25T09:59:13+02:00 +lastUpdated: 2020-11-15T14:43:44+02:00 --- Finds all the keys in the provided object that match the given value. diff --git a/snippets/findLast.md b/snippets/findLast.md index a44829381..97b66dedd 100644 --- a/snippets/findLast.md +++ b/snippets/findLast.md @@ -1,6 +1,8 @@ --- title: findLast tags: array,beginner +firstSeen: 2018-01-11T13:51:58+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Finds the last element for which the provided function returns a truthy value. diff --git a/snippets/findLastIndex.md b/snippets/findLastIndex.md index a5716b9a5..cfc0608b2 100644 --- a/snippets/findLastIndex.md +++ b/snippets/findLastIndex.md @@ -1,6 +1,8 @@ --- title: findLastIndex tags: array,intermediate +firstSeen: 2018-01-24T13:01:51+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Finds the index of the last element for which the provided function returns a truthy value. diff --git a/snippets/findLastKey.md b/snippets/findLastKey.md index c866157d4..f076b8451 100644 --- a/snippets/findLastKey.md +++ b/snippets/findLastKey.md @@ -1,6 +1,8 @@ --- title: findLastKey tags: object,intermediate +firstSeen: 2018-01-23T18:23:20+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Finds the last key that satisfies the provided testing function. diff --git a/snippets/findLastN.md b/snippets/findLastN.md index f8ee1f74b..1ad08e454 100644 --- a/snippets/findLastN.md +++ b/snippets/findLastN.md @@ -1,6 +1,8 @@ --- title: findLastN tags: array,intermediate +firstSeen: 2021-05-09T13:31:36+03:00 +lastUpdated: 2021-05-09T13:31:36+03:00 --- Finds the last `n` elements for which the provided function returns a truthy value. diff --git a/snippets/flatten.md b/snippets/flatten.md index 617e477d2..ec3f00e3e 100644 --- a/snippets/flatten.md +++ b/snippets/flatten.md @@ -1,6 +1,8 @@ --- title: flatten tags: array,recursion,intermediate +firstSeen: 2017-12-17T16:41:31+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Flattens an array up to the specified depth. diff --git a/snippets/flattenObject.md b/snippets/flattenObject.md index 23aa4999c..ab871487c 100644 --- a/snippets/flattenObject.md +++ b/snippets/flattenObject.md @@ -1,6 +1,8 @@ --- title: flattenObject tags: object,recursion,advanced +firstSeen: 2018-02-07T11:30:18+02:00 +lastUpdated: 2020-10-19T18:51:03+03:00 --- Flattens an object with the paths for keys. diff --git a/snippets/flip.md b/snippets/flip.md index 282eb0cd0..8fb22eeae 100644 --- a/snippets/flip.md +++ b/snippets/flip.md @@ -1,6 +1,8 @@ --- title: flip tags: function,intermediate +firstSeen: 2017-12-22T02:42:15+02:00 +lastUpdated: 2021-06-13T13:50:25+03:00 --- Takes a function as an argument, then makes the first argument the last. diff --git a/snippets/forEachRight.md b/snippets/forEachRight.md index eca45a102..0e5c64917 100644 --- a/snippets/forEachRight.md +++ b/snippets/forEachRight.md @@ -1,6 +1,8 @@ --- title: forEachRight tags: array,intermediate +firstSeen: 2018-01-09T01:38:50+02:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Executes a provided function once for each array element, starting from the array's last element. diff --git a/snippets/forOwn.md b/snippets/forOwn.md index 185d0eda0..8e795dbde 100644 --- a/snippets/forOwn.md +++ b/snippets/forOwn.md @@ -1,6 +1,8 @@ --- title: forOwn tags: object,intermediate +firstSeen: 2018-01-18T16:45:56+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Iterates over all own properties of an object, running a callback for each one. diff --git a/snippets/forOwnRight.md b/snippets/forOwnRight.md index acc992e4d..9c8e87362 100644 --- a/snippets/forOwnRight.md +++ b/snippets/forOwnRight.md @@ -1,6 +1,8 @@ --- title: forOwnRight tags: object,intermediate +firstSeen: 2018-01-18T16:45:56+02:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Iterates over all own properties of an object in reverse, running a callback for each one. diff --git a/snippets/formToObject.md b/snippets/formToObject.md index 49b10e7e6..f2f1377f8 100644 --- a/snippets/formToObject.md +++ b/snippets/formToObject.md @@ -1,6 +1,8 @@ --- title: formToObject tags: browser,object,intermediate +firstSeen: 2019-03-13T14:50:06+02:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Encodes a set of form elements as an `object`. diff --git a/snippets/formatDuration.md b/snippets/formatDuration.md index 7e488a522..82ed43ebb 100644 --- a/snippets/formatDuration.md +++ b/snippets/formatDuration.md @@ -1,6 +1,8 @@ --- title: formatDuration tags: date,math,string,intermediate +firstSeen: 2018-01-04T09:26:42+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Returns the human-readable format of the given number of milliseconds. diff --git a/snippets/formatNumber.md b/snippets/formatNumber.md index b572226c4..e6cf3b56e 100644 --- a/snippets/formatNumber.md +++ b/snippets/formatNumber.md @@ -1,6 +1,8 @@ --- title: formatNumber tags: string,math,beginner +firstSeen: 2020-07-30T11:38:51+03:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Formats a number using the local number format order. diff --git a/snippets/formatSeconds.md b/snippets/formatSeconds.md index d66b5a4b1..1f0e6ee77 100644 --- a/snippets/formatSeconds.md +++ b/snippets/formatSeconds.md @@ -1,6 +1,8 @@ --- title: formatSeconds tags: date,math,string,intermediate +firstSeen: 2021-05-09T12:44:55+03:00 +lastUpdated: 2021-05-17T08:59:17+03:00 --- Returns the ISO format of the given number of seconds. diff --git a/snippets/frequencies.md b/snippets/frequencies.md index 1b3afdcc7..b84e73cba 100644 --- a/snippets/frequencies.md +++ b/snippets/frequencies.md @@ -1,6 +1,8 @@ --- title: frequencies tags: array,object,intermediate +firstSeen: 2020-01-03T15:32:35+02:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Creates an object with the unique values of an array as keys and their frequencies as the values. diff --git a/snippets/fromCamelCase.md b/snippets/fromCamelCase.md index 3d6a79125..889c9ae16 100644 --- a/snippets/fromCamelCase.md +++ b/snippets/fromCamelCase.md @@ -1,6 +1,8 @@ --- title: fromCamelCase tags: string,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Converts a string from camelcase. diff --git a/snippets/fromTimestamp.md b/snippets/fromTimestamp.md index 177820df0..7a2b5db98 100644 --- a/snippets/fromTimestamp.md +++ b/snippets/fromTimestamp.md @@ -1,6 +1,8 @@ --- title: fromTimestamp tags: date,beginner +firstSeen: 2020-10-15T21:57:17+03:00 +lastUpdated: 2020-10-15T21:57:17+03:00 --- Creates a `Date` object from a Unix timestamp. diff --git a/snippets/frozenSet.md b/snippets/frozenSet.md index 2568c9deb..94547a650 100644 --- a/snippets/frozenSet.md +++ b/snippets/frozenSet.md @@ -1,6 +1,8 @@ --- title: frozenSet tags: array,intermediate +firstSeen: 2020-10-11T11:52:48+03:00 +lastUpdated: 2020-10-11T11:52:48+03:00 --- Creates a frozen `Set` object. diff --git a/snippets/fullscreen.md b/snippets/fullscreen.md index e2118dbfc..d6d4c4f9b 100644 --- a/snippets/fullscreen.md +++ b/snippets/fullscreen.md @@ -1,6 +1,8 @@ --- title: fullscreen tags: browser,intermediate +firstSeen: 2020-10-04T16:48:00+03:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Opens or closes an element in fullscreen mode. diff --git a/snippets/functionName.md b/snippets/functionName.md index 1c9353cd9..f37c2a0d1 100644 --- a/snippets/functionName.md +++ b/snippets/functionName.md @@ -1,6 +1,8 @@ --- title: functionName tags: function,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Logs the name of a function. diff --git a/snippets/functions.md b/snippets/functions.md index 46bf3794d..2d17f4460 100644 --- a/snippets/functions.md +++ b/snippets/functions.md @@ -1,6 +1,8 @@ --- title: functions tags: object,function,advanced +firstSeen: 2018-01-11T21:18:58+02:00 +lastUpdated: 2020-10-20T11:21:07+03:00 --- Gets an array of function property names from own (and optionally inherited) enumerable properties of an object. diff --git a/snippets/gcd.md b/snippets/gcd.md index ba2f2d7c0..ed5ba000c 100644 --- a/snippets/gcd.md +++ b/snippets/gcd.md @@ -1,6 +1,8 @@ --- title: gcd tags: math,algorithm,recursion,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-12-29T12:36:50+02:00 --- Calculates the greatest common divisor between two or more numbers/arrays. diff --git a/snippets/generateItems.md b/snippets/generateItems.md index 3bb0f8a34..b2e52cb98 100644 --- a/snippets/generateItems.md +++ b/snippets/generateItems.md @@ -1,6 +1,8 @@ --- title: generateItems tags: array,function,intermediate +firstSeen: 2020-10-09T20:41:21+03:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Generates an array with the given amount of items, using the given function. diff --git a/snippets/generatorToArray.md b/snippets/generatorToArray.md index bdddeda1e..3c8c2013b 100644 --- a/snippets/generatorToArray.md +++ b/snippets/generatorToArray.md @@ -1,6 +1,8 @@ --- title: generatorToArray tags: function,array,generator,beginner +firstSeen: 2020-12-31T13:22:18+02:00 +lastUpdated: 2020-12-31T13:22:18+02:00 --- Converts the output of a generator function to an array. diff --git a/snippets/geometricProgression.md b/snippets/geometricProgression.md index cdd3a6f35..69fe49b3e 100644 --- a/snippets/geometricProgression.md +++ b/snippets/geometricProgression.md @@ -1,6 +1,8 @@ --- title: geometricProgression tags: math,algorithm,intermediate +firstSeen: 2018-01-03T09:36:23+02:00 +lastUpdated: 2020-12-28T13:49:24+02:00 --- Initializes an array containing the numbers in the specified range where `start` and `end` are inclusive and the ratio between two terms is `step`. diff --git a/snippets/get.md b/snippets/get.md index fe5c2f084..2f7dd2f43 100644 --- a/snippets/get.md +++ b/snippets/get.md @@ -1,6 +1,8 @@ --- title: get tags: object,regexp,intermediate +firstSeen: 2018-01-18T17:40:42+02:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Retrieves a set of properties indicated by the given selectors from an object. diff --git a/snippets/getAncestors.md b/snippets/getAncestors.md index 3fa7691fd..c8c90dc90 100644 --- a/snippets/getAncestors.md +++ b/snippets/getAncestors.md @@ -1,6 +1,8 @@ --- title: getAncestors tags: browser,beginner +firstSeen: 2020-10-15T09:28:34+03:00 +lastUpdated: 2021-01-05T22:45:34+02:00 --- Returns all the ancestors of an element from the document root to the given element. diff --git a/snippets/getBaseURL.md b/snippets/getBaseURL.md index 2f6dfb76b..4de0c86e2 100644 --- a/snippets/getBaseURL.md +++ b/snippets/getBaseURL.md @@ -1,6 +1,8 @@ --- title: getBaseURL tags: string,browser,regexp,beginner +firstSeen: 2020-05-03T12:20:54+03:00 +lastUpdated: 2021-01-03T20:32:13+02:00 --- Gets the current URL without any parameters or fragment identifiers. diff --git a/snippets/getColonTimeFromDate.md b/snippets/getColonTimeFromDate.md index 0d35a6397..cf5d951a0 100644 --- a/snippets/getColonTimeFromDate.md +++ b/snippets/getColonTimeFromDate.md @@ -1,6 +1,8 @@ --- title: getColonTimeFromDate tags: date,string,beginner +firstSeen: 2018-01-13T17:14:48+02:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Returns a string of the form `HH:MM:SS` from a `Date` object. diff --git a/snippets/getDaysDiffBetweenDates.md b/snippets/getDaysDiffBetweenDates.md index 3dbde0e54..b10bfbd8b 100644 --- a/snippets/getDaysDiffBetweenDates.md +++ b/snippets/getDaysDiffBetweenDates.md @@ -1,6 +1,8 @@ --- title: getDaysDiffBetweenDates tags: date,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2021-04-24T12:42:47+03:00 --- Calculates the difference (in days) between two dates. diff --git a/snippets/getElementsBiggerThanViewport.md b/snippets/getElementsBiggerThanViewport.md index ae96f26b3..a5984279b 100644 --- a/snippets/getElementsBiggerThanViewport.md +++ b/snippets/getElementsBiggerThanViewport.md @@ -1,6 +1,8 @@ --- title: getElementsBiggerThanViewport tags: browser,intermediate +firstSeen: 2020-10-06T17:41:22+03:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Returns an array of HTML elements whose width is larger than that of the viewport's. diff --git a/snippets/getHoursDiffBetweenDates.md b/snippets/getHoursDiffBetweenDates.md index 8b26bc902..e9468ac07 100644 --- a/snippets/getHoursDiffBetweenDates.md +++ b/snippets/getHoursDiffBetweenDates.md @@ -1,6 +1,8 @@ --- title: getHoursDiffBetweenDates tags: date,beginner +firstSeen: 2021-04-24T12:56:21+03:00 +lastUpdated: 2021-04-24T12:56:21+03:00 --- Calculates the difference (in hours) between two dates. diff --git a/snippets/getImages.md b/snippets/getImages.md index 2fc8535b9..266f22461 100644 --- a/snippets/getImages.md +++ b/snippets/getImages.md @@ -1,6 +1,8 @@ --- title: getImages tags: browser,intermediate +firstSeen: 2018-10-07T16:24:36+03:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Fetches all images from within an element and puts them into an array. diff --git a/snippets/getMeridiemSuffixOfInteger.md b/snippets/getMeridiemSuffixOfInteger.md index 1dfb0c90e..4afbd71e4 100644 --- a/snippets/getMeridiemSuffixOfInteger.md +++ b/snippets/getMeridiemSuffixOfInteger.md @@ -1,6 +1,8 @@ --- title: getMeridiemSuffixOfInteger tags: date,beginner +firstSeen: 2018-01-13T17:14:48+02:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Converts an integer to a suffixed string, adding `am` or `pm` based on its value. diff --git a/snippets/getMinutesDiffBetweenDates.md b/snippets/getMinutesDiffBetweenDates.md index 999b251f3..39f62639c 100644 --- a/snippets/getMinutesDiffBetweenDates.md +++ b/snippets/getMinutesDiffBetweenDates.md @@ -1,6 +1,8 @@ --- title: getMinutesDiffBetweenDates tags: date,beginner +firstSeen: 2021-04-24T12:48:49+03:00 +lastUpdated: 2021-04-24T12:48:49+03:00 --- Calculates the difference (in minutes) between two dates. diff --git a/snippets/getMonthsDiffBetweenDates.md b/snippets/getMonthsDiffBetweenDates.md index 077cf3b66..8007f11e0 100644 --- a/snippets/getMonthsDiffBetweenDates.md +++ b/snippets/getMonthsDiffBetweenDates.md @@ -1,6 +1,8 @@ --- title: getMonthsDiffBetweenDates tags: date,intermediate +firstSeen: 2020-08-07T15:15:26+03:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Calculates the difference (in months) between two dates. diff --git a/snippets/getParentsUntil.md b/snippets/getParentsUntil.md index 90d8a0ff5..5490bd1ad 100644 --- a/snippets/getParentsUntil.md +++ b/snippets/getParentsUntil.md @@ -1,6 +1,8 @@ --- title: getParentsUntil tags: browser,intermediate +firstSeen: 2021-01-05T22:47:21+02:00 +lastUpdated: 2021-01-06T13:04:18+02:00 --- Finds all the ancestors of an element up until the element matched by the specified selector. diff --git a/snippets/getProtocol.md b/snippets/getProtocol.md index 507aeeae8..98f1af947 100644 --- a/snippets/getProtocol.md +++ b/snippets/getProtocol.md @@ -1,6 +1,8 @@ --- title: getProtocol tags: browser,beginner +firstSeen: 2020-10-07T01:40:53+03:00 +lastUpdated: 2020-10-20T11:46:23+03:00 --- Gets the protocol being used on the current page. diff --git a/snippets/getScrollPosition.md b/snippets/getScrollPosition.md index 236b6a02f..369bcb416 100644 --- a/snippets/getScrollPosition.md +++ b/snippets/getScrollPosition.md @@ -1,6 +1,8 @@ --- title: getScrollPosition tags: browser,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Returns the scroll position of the current page. diff --git a/snippets/getSecondsDiffBetweenDates.md b/snippets/getSecondsDiffBetweenDates.md index 91e2bf16d..5f7a147cd 100644 --- a/snippets/getSecondsDiffBetweenDates.md +++ b/snippets/getSecondsDiffBetweenDates.md @@ -1,6 +1,8 @@ --- title: getSecondsDiffBetweenDates tags: date,beginner +firstSeen: 2021-04-24T12:39:48+03:00 +lastUpdated: 2021-04-24T12:39:48+03:00 --- Calculates the difference (in seconds) between two dates. diff --git a/snippets/getSelectedText.md b/snippets/getSelectedText.md index 983af8bb5..78da6d607 100644 --- a/snippets/getSelectedText.md +++ b/snippets/getSelectedText.md @@ -1,6 +1,8 @@ --- title: getSelectedText tags: browser,beginner +firstSeen: 2020-08-07T15:34:53+03:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Gets the currently selected text. diff --git a/snippets/getSiblings.md b/snippets/getSiblings.md index 31b1b8954..6d995f644 100644 --- a/snippets/getSiblings.md +++ b/snippets/getSiblings.md @@ -1,6 +1,8 @@ --- title: getSiblings tags: browser,intermediate +firstSeen: 2020-08-07T15:31:48+03:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Returns an array containing all the siblings of the given element. diff --git a/snippets/getStyle.md b/snippets/getStyle.md index 7a930bf4e..9471edba0 100644 --- a/snippets/getStyle.md +++ b/snippets/getStyle.md @@ -1,6 +1,8 @@ --- title: getStyle tags: browser,css,beginner +firstSeen: 2017-12-29T00:08:17+02:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Retrieves the value of a CSS rule for the specified element. diff --git a/snippets/getTimestamp.md b/snippets/getTimestamp.md index 3606ddb7c..fc90871a0 100644 --- a/snippets/getTimestamp.md +++ b/snippets/getTimestamp.md @@ -1,6 +1,8 @@ --- title: getTimestamp tags: date,beginner +firstSeen: 2020-10-08T17:15:56+03:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Gets the Unix timestamp from a `Date` object. diff --git a/snippets/getType.md b/snippets/getType.md index e7d00a14e..83e60d90f 100644 --- a/snippets/getType.md +++ b/snippets/getType.md @@ -1,6 +1,8 @@ --- title: getType tags: type,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Returns the native type of a value. diff --git a/snippets/getURLParameters.md b/snippets/getURLParameters.md index dec79d33d..2a607784d 100644 --- a/snippets/getURLParameters.md +++ b/snippets/getURLParameters.md @@ -1,6 +1,8 @@ --- title: getURLParameters tags: browser,string,regexp,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Creates an object containing the parameters of the current URL. diff --git a/snippets/getVerticalOffset.md b/snippets/getVerticalOffset.md index 33f2e36a9..415937dc7 100644 --- a/snippets/getVerticalOffset.md +++ b/snippets/getVerticalOffset.md @@ -1,6 +1,8 @@ --- title: getVerticalOffset tags: browser,beginner +firstSeen: 2021-01-05T22:41:09+02:00 +lastUpdated: 2021-01-05T22:41:09+02:00 --- Finds the distance from a given element to the top of the document. diff --git a/snippets/groupBy.md b/snippets/groupBy.md index 1c966c1e7..ae486cd5f 100644 --- a/snippets/groupBy.md +++ b/snippets/groupBy.md @@ -1,6 +1,8 @@ --- title: groupBy tags: array,object,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Groups the elements of an array based on the given function. diff --git a/snippets/hammingDistance.md b/snippets/hammingDistance.md index 24b30f65b..65d22769d 100644 --- a/snippets/hammingDistance.md +++ b/snippets/hammingDistance.md @@ -1,6 +1,8 @@ --- title: hammingDistance tags: math,algorithm,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-12-28T13:49:24+02:00 --- Calculates the Hamming distance between two values. diff --git a/snippets/hasClass.md b/snippets/hasClass.md index 2b72c17f5..078a14abd 100644 --- a/snippets/hasClass.md +++ b/snippets/hasClass.md @@ -1,6 +1,8 @@ --- title: hasClass tags: browser,css,beginner +firstSeen: 2017-12-28T23:46:33+02:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Checks if the given element has the specified class. diff --git a/snippets/hasDuplicates.md b/snippets/hasDuplicates.md index c8b9eee70..cff346bee 100644 --- a/snippets/hasDuplicates.md +++ b/snippets/hasDuplicates.md @@ -1,6 +1,8 @@ --- title: hasDuplicates tags: array,beginner +firstSeen: 2020-10-22T20:23:09+03:00 +lastUpdated: 2020-10-22T20:23:09+03:00 --- Checks if there are duplicate values in a flat array. diff --git a/snippets/hasFlags.md b/snippets/hasFlags.md index 3b7bdf34a..3b5952a84 100644 --- a/snippets/hasFlags.md +++ b/snippets/hasFlags.md @@ -1,6 +1,8 @@ --- title: hasFlags tags: node,intermediate +firstSeen: 2018-01-01T18:24:43+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Checks if the current process's arguments contain the specified flags. diff --git a/snippets/hasKey.md b/snippets/hasKey.md index a0be3ee2a..47bf3fd12 100644 --- a/snippets/hasKey.md +++ b/snippets/hasKey.md @@ -1,6 +1,8 @@ --- title: hasKey tags: object,intermediate +firstSeen: 2019-10-15T15:45:13+03:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Checks if the target value exists in a JSON object. diff --git a/snippets/hashBrowser.md b/snippets/hashBrowser.md index 47863305c..51e46cbaa 100644 --- a/snippets/hashBrowser.md +++ b/snippets/hashBrowser.md @@ -1,6 +1,8 @@ --- title: hashBrowser tags: browser,promise,advanced +firstSeen: 2018-01-17T14:09:01+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Creates a hash for a value using the [SHA-256](https://en.wikipedia.org/wiki/SHA-2) algorithm. diff --git a/snippets/hashNode.md b/snippets/hashNode.md index 990d5d64e..2052cd8e4 100644 --- a/snippets/hashNode.md +++ b/snippets/hashNode.md @@ -1,6 +1,8 @@ --- title: hashNode tags: node,promise,advanced +firstSeen: 2018-01-17T14:09:01+02:00 +lastUpdated: 2020-10-19T22:30:46+03:00 --- Creates a hash for a value using the [SHA-256](https://en.wikipedia.org/wiki/SHA-2) algorithm. diff --git a/snippets/haveSameContents.md b/snippets/haveSameContents.md index 97b232f6c..d3a4ecbfd 100644 --- a/snippets/haveSameContents.md +++ b/snippets/haveSameContents.md @@ -1,6 +1,8 @@ --- title: haveSameContents tags: array,intermediate +firstSeen: 2020-01-05T21:40:39+02:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Checks if two arrays contain the same elements regardless of order. diff --git a/snippets/head.md b/snippets/head.md index b790e655b..1a246df58 100644 --- a/snippets/head.md +++ b/snippets/head.md @@ -1,6 +1,8 @@ --- title: head tags: array,beginner +firstSeen: 2017-12-17T16:41:31+02:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Returns the head of an array. diff --git a/snippets/heapsort.md b/snippets/heapsort.md index 16c87592e..a6de95760 100644 --- a/snippets/heapsort.md +++ b/snippets/heapsort.md @@ -1,6 +1,8 @@ --- title: heapsort tags: algorithm,array,recursion,advanced +firstSeen: 2020-12-28T22:48:09+02:00 +lastUpdated: 2020-12-28T22:48:09+02:00 --- Sorts an array of numbers, using the heapsort algorithm. diff --git a/snippets/hexToRGB.md b/snippets/hexToRGB.md index 0e74a66d2..bbd27066f 100644 --- a/snippets/hexToRGB.md +++ b/snippets/hexToRGB.md @@ -1,6 +1,8 @@ --- title: hexToRGB tags: string,math,advanced +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Converts a color code to an `rgb()` or `rgba()` string if alpha value is provided. diff --git a/snippets/hide.md b/snippets/hide.md index 5cdae0777..89a544d39 100644 --- a/snippets/hide.md +++ b/snippets/hide.md @@ -1,6 +1,8 @@ --- title: hide tags: browser,css,beginner +firstSeen: 2017-12-28T23:33:21+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Hides all the elements specified. diff --git a/snippets/httpDelete.md b/snippets/httpDelete.md index 506929f34..d3367d674 100644 --- a/snippets/httpDelete.md +++ b/snippets/httpDelete.md @@ -1,6 +1,8 @@ --- title: httpDelete tags: browser,intermediate +firstSeen: 2020-04-16T11:21:33+03:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Makes a `DELETE` request to the passed URL. diff --git a/snippets/httpGet.md b/snippets/httpGet.md index f42d8f7ac..dc8d1a7b6 100644 --- a/snippets/httpGet.md +++ b/snippets/httpGet.md @@ -1,6 +1,8 @@ --- title: httpGet tags: browser,intermediate +firstSeen: 2018-01-08T18:21:52+02:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Makes a `GET` request to the passed URL. diff --git a/snippets/httpPost.md b/snippets/httpPost.md index cde8c2c6d..28356d0b8 100644 --- a/snippets/httpPost.md +++ b/snippets/httpPost.md @@ -1,6 +1,8 @@ --- title: httpPost tags: browser,intermediate +firstSeen: 2018-01-08T22:07:02+02:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Makes a `POST` request to the passed URL. diff --git a/snippets/httpPut.md b/snippets/httpPut.md index 6e357afce..72a01c560 100644 --- a/snippets/httpPut.md +++ b/snippets/httpPut.md @@ -1,6 +1,8 @@ --- title: httpPut tags: browser,intermediate +firstSeen: 2020-04-16T11:21:33+03:00 +lastUpdated: 2020-10-19T22:49:51+03:00 --- Makes a `PUT` request to the passed URL. diff --git a/snippets/httpsRedirect.md b/snippets/httpsRedirect.md index 88106e023..9c0a56405 100644 --- a/snippets/httpsRedirect.md +++ b/snippets/httpsRedirect.md @@ -1,6 +1,8 @@ --- title: httpsRedirect tags: browser,intermediate +firstSeen: 2017-12-21T08:33:56+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Redirects the page to HTTPS if it's currently in HTTP. diff --git a/snippets/hz.md b/snippets/hz.md index 21bc93104..2ff308a32 100644 --- a/snippets/hz.md +++ b/snippets/hz.md @@ -2,6 +2,8 @@ title: hz tags: function,intermediate unlisted: true +firstSeen: 2018-04-11T16:39:49+03:00 +lastUpdated: 2021-01-04T13:04:15+02:00 --- Measures the number of times a function is executed per second (`hz`/`hertz`). diff --git a/snippets/inRange.md b/snippets/inRange.md index 1f325ae61..2abd45353 100644 --- a/snippets/inRange.md +++ b/snippets/inRange.md @@ -1,6 +1,8 @@ --- title: inRange tags: math,beginner +firstSeen: 2017-12-20T18:33:58+02:00 +lastUpdated: 2020-11-01T20:50:57+02:00 --- Checks if the given number falls within the given range. diff --git a/snippets/includesAll.md b/snippets/includesAll.md index b9a3a6c9a..148a0c503 100644 --- a/snippets/includesAll.md +++ b/snippets/includesAll.md @@ -1,6 +1,8 @@ --- title: includesAll tags: array,beginner +firstSeen: 2019-11-04T21:37:16+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if all the elements in `values` are included in `arr`. diff --git a/snippets/includesAny.md b/snippets/includesAny.md index f7614aa2e..61250ee95 100644 --- a/snippets/includesAny.md +++ b/snippets/includesAny.md @@ -1,6 +1,8 @@ --- title: includesAny tags: array,beginner +firstSeen: 2019-11-03T23:49:17+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if at least one element of `values` is included in `arr`. diff --git a/snippets/indentString.md b/snippets/indentString.md index 671c89d97..c8b3929e8 100644 --- a/snippets/indentString.md +++ b/snippets/indentString.md @@ -1,6 +1,8 @@ --- title: indentString tags: string,beginner +firstSeen: 2018-09-24T22:14:27+03:00 +lastUpdated: 2020-11-01T20:50:57+02:00 --- Indents each line in the provided string. diff --git a/snippets/indexOfAll.md b/snippets/indexOfAll.md index 890c41868..6209978da 100644 --- a/snippets/indexOfAll.md +++ b/snippets/indexOfAll.md @@ -1,6 +1,8 @@ --- title: indexOfAll tags: array,intermediate +firstSeen: 2018-01-06T12:07:56+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Finds all indexes of `val` in an array. diff --git a/snippets/indexOfSubstrings.md b/snippets/indexOfSubstrings.md index cd926c703..cf83b1f1c 100644 --- a/snippets/indexOfSubstrings.md +++ b/snippets/indexOfSubstrings.md @@ -1,6 +1,8 @@ --- title: indexOfSubstrings tags: string,algorithm,generator,intermediate +firstSeen: 2020-12-31T13:58:51+02:00 +lastUpdated: 2020-12-31T13:58:51+02:00 --- Finds all the indexes of a substring in a given string. diff --git a/snippets/initial.md b/snippets/initial.md index 0b0e9f03c..425d46951 100644 --- a/snippets/initial.md +++ b/snippets/initial.md @@ -1,6 +1,8 @@ --- title: initial tags: array,beginner +firstSeen: 2017-12-17T16:41:31+02:00 +lastUpdated: 2020-11-03T21:46:13+02:00 --- Returns all the elements of an array except the last one. diff --git a/snippets/initialize2DArray.md b/snippets/initialize2DArray.md index 90ded7996..f966f6a3a 100644 --- a/snippets/initialize2DArray.md +++ b/snippets/initialize2DArray.md @@ -1,6 +1,8 @@ --- title: initialize2DArray tags: array,intermediate +firstSeen: 2017-12-19T23:38:18+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Initializes a 2D array of given width and height and value. diff --git a/snippets/initializeArrayWithRange.md b/snippets/initializeArrayWithRange.md index ba6b9693e..bd38da718 100644 --- a/snippets/initializeArrayWithRange.md +++ b/snippets/initializeArrayWithRange.md @@ -1,6 +1,8 @@ --- title: initializeArrayWithRange tags: array,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Initializes an array containing the numbers in the specified range where `start` and `end` are inclusive with their common difference `step`. diff --git a/snippets/initializeArrayWithRangeRight.md b/snippets/initializeArrayWithRangeRight.md index e3d3a1c7d..33ffd5ed1 100644 --- a/snippets/initializeArrayWithRangeRight.md +++ b/snippets/initializeArrayWithRangeRight.md @@ -1,6 +1,8 @@ --- title: initializeArrayWithRangeRight tags: array,intermediate +firstSeen: 2018-01-16T17:09:39+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Initializes an array containing the numbers in the specified range (in reverse) where `start` and `end` are inclusive with their common difference `step`. diff --git a/snippets/initializeArrayWithValues.md b/snippets/initializeArrayWithValues.md index 251683434..c56ad3d0c 100644 --- a/snippets/initializeArrayWithValues.md +++ b/snippets/initializeArrayWithValues.md @@ -1,6 +1,8 @@ --- title: initializeArrayWithValues tags: array,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Initializes and fills an array with the specified values. diff --git a/snippets/initializeNDArray.md b/snippets/initializeNDArray.md index 7bf44514d..4e3df9c80 100644 --- a/snippets/initializeNDArray.md +++ b/snippets/initializeNDArray.md @@ -1,6 +1,8 @@ --- title: initializeNDArray tags: array,recursion,intermediate +firstSeen: 2018-04-14T10:52:39+03:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Create a n-dimensional array with given value. diff --git a/snippets/injectCSS.md b/snippets/injectCSS.md index abd760647..d8568c07e 100644 --- a/snippets/injectCSS.md +++ b/snippets/injectCSS.md @@ -1,6 +1,8 @@ --- title: injectCSS tags: browser,css,intermediate +firstSeen: 2020-10-15T22:18:00+03:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Injects the given CSS code into the current document diff --git a/snippets/insertAfter.md b/snippets/insertAfter.md index edf11ba1d..f0b95c9bd 100644 --- a/snippets/insertAfter.md +++ b/snippets/insertAfter.md @@ -1,6 +1,8 @@ --- title: insertAfter tags: browser,beginner +firstSeen: 2018-06-19T20:57:58+03:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Inserts an HTML string after the end of the specified element. diff --git a/snippets/insertAt.md b/snippets/insertAt.md index 2b9bfcd75..0cba31946 100644 --- a/snippets/insertAt.md +++ b/snippets/insertAt.md @@ -1,6 +1,8 @@ --- title: insertAt tags: array,intermediate +firstSeen: 2020-05-22T09:07:35+03:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Mutates the original array to insert the given values after the specified index. diff --git a/snippets/insertBefore.md b/snippets/insertBefore.md index 2ddc80aa8..0ae6528f4 100644 --- a/snippets/insertBefore.md +++ b/snippets/insertBefore.md @@ -1,6 +1,8 @@ --- title: insertBefore tags: browser,beginner +firstSeen: 2018-06-19T20:57:58+03:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Inserts an HTML string before the start of the specified element. diff --git a/snippets/insertionSort.md b/snippets/insertionSort.md index 4f5f78110..2f61cb235 100644 --- a/snippets/insertionSort.md +++ b/snippets/insertionSort.md @@ -1,6 +1,8 @@ --- title: insertionSort tags: algorithm,array,intermediate +firstSeen: 2020-12-28T21:53:53+02:00 +lastUpdated: 2020-12-28T21:53:53+02:00 --- Sorts an array of numbers, using the insertion sort algorithm. diff --git a/snippets/intersection.md b/snippets/intersection.md index 3f93dc549..85838ab30 100644 --- a/snippets/intersection.md +++ b/snippets/intersection.md @@ -1,6 +1,8 @@ --- title: intersection tags: array,intermediate +firstSeen: 2017-12-17T16:41:31+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Returns the elements that exist in both arrays, filtering duplicate values. diff --git a/snippets/intersectionBy.md b/snippets/intersectionBy.md index d237f082c..5163111dc 100644 --- a/snippets/intersectionBy.md +++ b/snippets/intersectionBy.md @@ -1,6 +1,8 @@ --- title: intersectionBy tags: array,intermediate +firstSeen: 2018-01-24T12:53:18+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Returns the elements that exist in both arrays, after applying the provided function to each array element of both. diff --git a/snippets/intersectionWith.md b/snippets/intersectionWith.md index 0caa2cdb9..a75b3c0d5 100644 --- a/snippets/intersectionWith.md +++ b/snippets/intersectionWith.md @@ -1,6 +1,8 @@ --- title: intersectionWith tags: array,intermediate +firstSeen: 2018-01-24T12:53:18+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Returns the elements that exist in both arrays, using a provided comparator function. diff --git a/snippets/invertKeyValues.md b/snippets/invertKeyValues.md index d5b31ae3e..53ea17878 100644 --- a/snippets/invertKeyValues.md +++ b/snippets/invertKeyValues.md @@ -1,6 +1,8 @@ --- title: invertKeyValues tags: object,advanced +firstSeen: 2018-01-01T17:33:46+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Inverts the key-value pairs of an object, without mutating it. diff --git a/snippets/is.md b/snippets/is.md index 9bc45cf74..0d8ccf579 100644 --- a/snippets/is.md +++ b/snippets/is.md @@ -1,6 +1,8 @@ --- title: is tags: type,array,intermediate +firstSeen: 2018-01-17T21:23:46+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the provided value is of the specified type. diff --git a/snippets/isAbsoluteURL.md b/snippets/isAbsoluteURL.md index 2bb90898b..522758bd6 100644 --- a/snippets/isAbsoluteURL.md +++ b/snippets/isAbsoluteURL.md @@ -1,6 +1,8 @@ --- title: isAbsoluteURL tags: string,browser,regexp,intermediate +firstSeen: 2017-12-31T14:42:45+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the given string is an absolute URL. diff --git a/snippets/isAfterDate.md b/snippets/isAfterDate.md index 02891b893..1d06c4ab8 100644 --- a/snippets/isAfterDate.md +++ b/snippets/isAfterDate.md @@ -1,6 +1,8 @@ --- title: isAfterDate tags: date,beginner +firstSeen: 2018-09-29T13:58:38+03:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if a date is after another date. diff --git a/snippets/isAlpha.md b/snippets/isAlpha.md index 5a823b506..2e769c7ac 100644 --- a/snippets/isAlpha.md +++ b/snippets/isAlpha.md @@ -1,6 +1,8 @@ --- title: isAlpha tags: string,regexp,beginner +firstSeen: 2020-12-31T14:01:42+02:00 +lastUpdated: 2020-12-31T14:01:42+02:00 --- Checks if a string contains only alpha characters. diff --git a/snippets/isAlphaNumeric.md b/snippets/isAlphaNumeric.md index d678f7aa5..533b0a3ef 100644 --- a/snippets/isAlphaNumeric.md +++ b/snippets/isAlphaNumeric.md @@ -1,6 +1,8 @@ --- title: isAlphaNumeric tags: string,regexp,beginner +firstSeen: 2020-09-06T07:59:16+03:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if a string contains only alphanumeric characters. diff --git a/snippets/isAnagram.md b/snippets/isAnagram.md index e61ee4e31..69dc12957 100644 --- a/snippets/isAnagram.md +++ b/snippets/isAnagram.md @@ -1,6 +1,8 @@ --- title: isAnagram tags: string,regexp,intermediate +firstSeen: 2018-02-19T15:47:47+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if a string is an anagram of another string (case-insensitive, ignores spaces, punctuation and special characters). diff --git a/snippets/isArrayLike.md b/snippets/isArrayLike.md index 597439527..dd9f489b4 100644 --- a/snippets/isArrayLike.md +++ b/snippets/isArrayLike.md @@ -1,6 +1,8 @@ --- title: isArrayLike tags: type,array,intermediate +firstSeen: 2017-12-31T14:53:01+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the provided argument is array-like (i.e. is iterable). diff --git a/snippets/isAsyncFunction.md b/snippets/isAsyncFunction.md index b98f5d1fb..3555cba77 100644 --- a/snippets/isAsyncFunction.md +++ b/snippets/isAsyncFunction.md @@ -1,6 +1,8 @@ --- title: isAsyncFunction tags: type,function,intermediate +firstSeen: 2020-08-07T15:41:55+03:00 +lastUpdated: 2020-10-20T11:21:07+03:00 --- Checks if the given argument is an `async` function. diff --git a/snippets/isBeforeDate.md b/snippets/isBeforeDate.md index 88cda15f8..358f0c753 100644 --- a/snippets/isBeforeDate.md +++ b/snippets/isBeforeDate.md @@ -1,6 +1,8 @@ --- title: isBeforeDate tags: date,beginner +firstSeen: 2018-09-29T13:58:38+03:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if a date is before another date. diff --git a/snippets/isBetweenDates.md b/snippets/isBetweenDates.md index fd6416522..601334264 100644 --- a/snippets/isBetweenDates.md +++ b/snippets/isBetweenDates.md @@ -1,6 +1,8 @@ --- title: isBetweenDates tags: date,beginner +firstSeen: 2020-10-07T20:31:52+03:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if a date is between two other dates. diff --git a/snippets/isBoolean.md b/snippets/isBoolean.md index cdea2bd11..ae361b395 100644 --- a/snippets/isBoolean.md +++ b/snippets/isBoolean.md @@ -1,6 +1,8 @@ --- title: isBoolean tags: type,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Checks if the given argument is a native boolean element. diff --git a/snippets/isBrowser.md b/snippets/isBrowser.md index f355a45aa..d5bec1ed5 100644 --- a/snippets/isBrowser.md +++ b/snippets/isBrowser.md @@ -1,6 +1,8 @@ --- title: isBrowser tags: browser,node,intermediate +firstSeen: 2018-03-19T04:50:55+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Determines if the current runtime environment is a browser so that front-end modules can run on the server (Node) without throwing errors. diff --git a/snippets/isBrowserTabFocused.md b/snippets/isBrowserTabFocused.md index 8f8f70ce0..05609a515 100644 --- a/snippets/isBrowserTabFocused.md +++ b/snippets/isBrowserTabFocused.md @@ -1,6 +1,8 @@ --- title: isBrowserTabFocused tags: browser,beginner +firstSeen: 2018-04-15T19:18:44+03:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the browser tab of the page is focused. diff --git a/snippets/isContainedIn.md b/snippets/isContainedIn.md index 836d448c4..a6b69fd1d 100644 --- a/snippets/isContainedIn.md +++ b/snippets/isContainedIn.md @@ -1,6 +1,8 @@ --- title: isContainedIn tags: array,intermediate +firstSeen: 2020-01-05T21:40:51+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Checks if the elements of the first array are contained in the second one regardless of order. diff --git a/snippets/isDateValid.md b/snippets/isDateValid.md index 9965d261f..48ba958e0 100644 --- a/snippets/isDateValid.md +++ b/snippets/isDateValid.md @@ -1,6 +1,8 @@ --- title: isDateValid tags: date,intermediate +firstSeen: 2020-10-08T16:39:23+03:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if a valid date object can be created from the given values. diff --git a/snippets/isDeepFrozen.md b/snippets/isDeepFrozen.md index e9e1ee71c..30d9c616f 100644 --- a/snippets/isDeepFrozen.md +++ b/snippets/isDeepFrozen.md @@ -1,6 +1,8 @@ --- title: isDeepFrozen tags: object,recursion,intermediate +firstSeen: 2020-09-04T20:20:11+03:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if an object is deeply frozen. diff --git a/snippets/isDisjoint.md b/snippets/isDisjoint.md index 37e06010e..42cdff2a7 100644 --- a/snippets/isDisjoint.md +++ b/snippets/isDisjoint.md @@ -1,6 +1,8 @@ --- title: isDisjoint tags: array,intermediate +firstSeen: 2020-10-11T11:53:01+03:00 +lastUpdated: 2020-10-11T11:53:01+03:00 --- Checks if the two iterables are disjointed (have no common values). diff --git a/snippets/isDivisible.md b/snippets/isDivisible.md index 409968972..835509a37 100644 --- a/snippets/isDivisible.md +++ b/snippets/isDivisible.md @@ -1,6 +1,8 @@ --- title: isDivisible tags: math,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Checks if the first numeric argument is divisible by the second one. diff --git a/snippets/isDuplexStream.md b/snippets/isDuplexStream.md index a674e1852..f177135dd 100644 --- a/snippets/isDuplexStream.md +++ b/snippets/isDuplexStream.md @@ -1,6 +1,8 @@ --- title: isDuplexStream tags: node,type,intermediate +firstSeen: 2018-10-03T22:16:10+03:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the given argument is a duplex (readable and writable) stream. diff --git a/snippets/isEmpty.md b/snippets/isEmpty.md index 08ab18378..939df0eac 100644 --- a/snippets/isEmpty.md +++ b/snippets/isEmpty.md @@ -1,6 +1,8 @@ --- title: isEmpty tags: type,array,object,string,beginner +firstSeen: 2018-01-23T19:25:17+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the a value is an empty object/collection, has no enumerable properties or is any type that is not considered a collection. diff --git a/snippets/isEven.md b/snippets/isEven.md index a78459d07..d6bc75fb5 100644 --- a/snippets/isEven.md +++ b/snippets/isEven.md @@ -1,6 +1,8 @@ --- title: isEven tags: math,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the given number is even. diff --git a/snippets/isFunction.md b/snippets/isFunction.md index 673449b14..58102a2b3 100644 --- a/snippets/isFunction.md +++ b/snippets/isFunction.md @@ -1,6 +1,8 @@ --- title: isFunction tags: type,function,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Checks if the given argument is a function. diff --git a/snippets/isGeneratorFunction.md b/snippets/isGeneratorFunction.md index 83fe8d824..a99c77d02 100644 --- a/snippets/isGeneratorFunction.md +++ b/snippets/isGeneratorFunction.md @@ -1,6 +1,8 @@ --- title: isGeneratorFunction tags: type,function,intermediate +firstSeen: 2020-08-07T15:40:38+03:00 +lastUpdated: 2020-10-20T11:21:07+03:00 --- Checks if the given argument is a generator function. diff --git a/snippets/isISOString.md b/snippets/isISOString.md index 36c9a6155..dc76195a0 100644 --- a/snippets/isISOString.md +++ b/snippets/isISOString.md @@ -1,6 +1,8 @@ --- title: isISOString tags: date,intermediate +firstSeen: 2020-11-29T12:16:43+02:00 +lastUpdated: 2020-11-29T12:16:43+02:00 --- Checks if the given string is valid in the simplified extended ISO format (ISO 8601). diff --git a/snippets/isLeapYear.md b/snippets/isLeapYear.md index ce8518491..8760ec1f4 100644 --- a/snippets/isLeapYear.md +++ b/snippets/isLeapYear.md @@ -1,6 +1,8 @@ --- title: isLeapYear tags: date,beginner +firstSeen: 2020-02-05T14:00:03+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the given `year` is a leap year. diff --git a/snippets/isLocalStorageEnabled.md b/snippets/isLocalStorageEnabled.md index 204b96c4e..d9a828652 100644 --- a/snippets/isLocalStorageEnabled.md +++ b/snippets/isLocalStorageEnabled.md @@ -1,6 +1,8 @@ --- title: isLocalStorageEnabled tags: browser,intermediate +firstSeen: 2020-12-31T13:13:47+02:00 +lastUpdated: 2020-12-31T13:13:47+02:00 --- Checks if `localStorage` is enabled. diff --git a/snippets/isLowerCase.md b/snippets/isLowerCase.md index 15bedcf4f..2caad2988 100644 --- a/snippets/isLowerCase.md +++ b/snippets/isLowerCase.md @@ -1,6 +1,8 @@ --- title: isLowerCase tags: string,beginner +firstSeen: 2018-01-06T11:16:05+02:00 +lastUpdated: 2020-10-20T11:21:07+03:00 --- Checks if a string is lower case. diff --git a/snippets/isNegativeZero.md b/snippets/isNegativeZero.md index 55b41fb24..997ca5d08 100644 --- a/snippets/isNegativeZero.md +++ b/snippets/isNegativeZero.md @@ -1,6 +1,8 @@ --- title: isNegativeZero tags: math,intermediate +firstSeen: 2018-11-12T15:45:36+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the given value is equal to negative zero (`-0`). diff --git a/snippets/isNil.md b/snippets/isNil.md index 8c629c7ef..c9c1d94f1 100644 --- a/snippets/isNil.md +++ b/snippets/isNil.md @@ -1,6 +1,8 @@ --- title: isNil tags: type,beginner +firstSeen: 2018-01-16T16:50:21+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the specified value is `null` or `undefined`. diff --git a/snippets/isNode.md b/snippets/isNode.md index 18922eea9..a1122f73c 100644 --- a/snippets/isNode.md +++ b/snippets/isNode.md @@ -1,6 +1,8 @@ --- title: isNode tags: node,browser,intermediate +firstSeen: 2020-10-12T20:01:21+03:00 +lastUpdated: 2021-04-02T11:45:13+03:00 --- Determines if the current runtime environment is Node.js. diff --git a/snippets/isNull.md b/snippets/isNull.md index 4de94c744..fb7ec3a39 100644 --- a/snippets/isNull.md +++ b/snippets/isNull.md @@ -1,6 +1,8 @@ --- title: isNull tags: type,beginner +firstSeen: 2017-12-31T12:26:19+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the specified value is `null`. diff --git a/snippets/isNumber.md b/snippets/isNumber.md index c2c3bbb34..f346e2a59 100644 --- a/snippets/isNumber.md +++ b/snippets/isNumber.md @@ -1,6 +1,8 @@ --- title: isNumber tags: type,math,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Checks if the given argument is a number. diff --git a/snippets/isObject.md b/snippets/isObject.md index fc9c35201..058048f02 100644 --- a/snippets/isObject.md +++ b/snippets/isObject.md @@ -1,6 +1,8 @@ --- title: isObject tags: type,object,beginner +firstSeen: 2018-01-11T12:24:06+02:00 +lastUpdated: 2021-01-08T00:23:44+02:00 --- Checks if the passed value is an object or not. diff --git a/snippets/isObjectLike.md b/snippets/isObjectLike.md index c344738d5..88f5ec68b 100644 --- a/snippets/isObjectLike.md +++ b/snippets/isObjectLike.md @@ -1,6 +1,8 @@ --- title: isObjectLike tags: type,object,beginner +firstSeen: 2018-01-23T19:30:03+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Checks if a value is object-like. diff --git a/snippets/isOdd.md b/snippets/isOdd.md index c47167a8e..c975f566e 100644 --- a/snippets/isOdd.md +++ b/snippets/isOdd.md @@ -1,6 +1,8 @@ --- title: isOdd tags: math,beginner +firstSeen: 2019-09-25T20:35:06+03:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the given number is odd. diff --git a/snippets/isPlainObject.md b/snippets/isPlainObject.md index 49977f517..ed1e96af0 100644 --- a/snippets/isPlainObject.md +++ b/snippets/isPlainObject.md @@ -1,6 +1,8 @@ --- title: isPlainObject tags: type,object,intermediate +firstSeen: 2018-01-19T13:59:12+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the provided value is an object created by the Object constructor. diff --git a/snippets/isPowerOfTen.md b/snippets/isPowerOfTen.md index 4ab69c2b3..95b402e0d 100644 --- a/snippets/isPowerOfTen.md +++ b/snippets/isPowerOfTen.md @@ -1,6 +1,8 @@ --- title: isPowerOfTen tags: math,beginner +firstSeen: 2021-01-06T22:53:58+02:00 +lastUpdated: 2021-01-06T22:53:58+02:00 --- Checks if the given number is a power of `10`. diff --git a/snippets/isPowerOfTwo.md b/snippets/isPowerOfTwo.md index 8022ca2ce..9ece092ec 100644 --- a/snippets/isPowerOfTwo.md +++ b/snippets/isPowerOfTwo.md @@ -1,6 +1,8 @@ --- title: isPowerOfTwo tags: math,beginner +firstSeen: 2019-12-31T13:17:12+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the given number is a power of `2`. diff --git a/snippets/isPrime.md b/snippets/isPrime.md index 7f4b443d0..4e7f320b8 100644 --- a/snippets/isPrime.md +++ b/snippets/isPrime.md @@ -1,6 +1,8 @@ --- title: isPrime tags: math,algorithm,beginner +firstSeen: 2017-12-19T22:35:56+02:00 +lastUpdated: 2021-01-12T19:36:36+02:00 --- Checks if the provided integer is a prime number. diff --git a/snippets/isPrimitive.md b/snippets/isPrimitive.md index 839a24630..91deb62ba 100644 --- a/snippets/isPrimitive.md +++ b/snippets/isPrimitive.md @@ -1,6 +1,8 @@ --- title: isPrimitive tags: type,intermediate +firstSeen: 2017-12-31T12:48:13+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Checks if the passed value is primitive or not. diff --git a/snippets/isPromiseLike.md b/snippets/isPromiseLike.md index f03c11a3e..c5d3830a6 100644 --- a/snippets/isPromiseLike.md +++ b/snippets/isPromiseLike.md @@ -1,6 +1,8 @@ --- title: isPromiseLike tags: type,function,promise,intermediate +firstSeen: 2017-12-31T14:25:43+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if an object looks like a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). diff --git a/snippets/isReadableStream.md b/snippets/isReadableStream.md index 3810a5f10..9b93e1f76 100644 --- a/snippets/isReadableStream.md +++ b/snippets/isReadableStream.md @@ -1,6 +1,8 @@ --- title: isReadableStream tags: node,type,intermediate +firstSeen: 2018-10-03T22:16:10+03:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the given argument is a readable stream. diff --git a/snippets/isSameDate.md b/snippets/isSameDate.md index 45db65d47..eefdf1ac7 100644 --- a/snippets/isSameDate.md +++ b/snippets/isSameDate.md @@ -1,6 +1,8 @@ --- title: isSameDate tags: date,beginner +firstSeen: 2018-09-29T13:58:38+03:00 +lastUpdated: 2020-11-03T22:11:18+02:00 --- Checks if a date is the same as another date. diff --git a/snippets/isSameOrigin.md b/snippets/isSameOrigin.md index 273861b37..dec73adcd 100644 --- a/snippets/isSameOrigin.md +++ b/snippets/isSameOrigin.md @@ -1,6 +1,8 @@ --- title: isSameOrigin tags: object,beginner +firstSeen: 2021-04-22T08:27:41+03:00 +lastUpdated: 2021-04-22T08:27:41+03:00 --- Checks if two URLs are on the same origin. diff --git a/snippets/isSessionStorageEnabled.md b/snippets/isSessionStorageEnabled.md index 9aaca6aac..9be6dd824 100644 --- a/snippets/isSessionStorageEnabled.md +++ b/snippets/isSessionStorageEnabled.md @@ -1,6 +1,8 @@ --- title: isSessionStorageEnabled tags: browser,intermediate +firstSeen: 2020-12-31T13:13:47+02:00 +lastUpdated: 2020-12-31T13:13:47+02:00 --- Checks if `sessionStorage` is enabled. diff --git a/snippets/isSorted.md b/snippets/isSorted.md index 080f22295..1acc2adbd 100644 --- a/snippets/isSorted.md +++ b/snippets/isSorted.md @@ -1,6 +1,8 @@ --- title: isSorted tags: array,intermediate +firstSeen: 2018-01-01T19:30:14+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if a numeric array is sorted. diff --git a/snippets/isStream.md b/snippets/isStream.md index 8507a66f0..38c9e5296 100644 --- a/snippets/isStream.md +++ b/snippets/isStream.md @@ -1,6 +1,8 @@ --- title: isStream tags: node,type,intermediate +firstSeen: 2018-10-01T20:12:19+03:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the given argument is a stream. diff --git a/snippets/isString.md b/snippets/isString.md index 740c67399..649e262aa 100644 --- a/snippets/isString.md +++ b/snippets/isString.md @@ -1,6 +1,8 @@ --- title: isString tags: type,string,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the given argument is a string. diff --git a/snippets/isSymbol.md b/snippets/isSymbol.md index 290cf87ac..c119652ff 100644 --- a/snippets/isSymbol.md +++ b/snippets/isSymbol.md @@ -1,6 +1,8 @@ --- title: isSymbol tags: type,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Checks if the given argument is a symbol. diff --git a/snippets/isTravisCI.md b/snippets/isTravisCI.md index 1b3b2d159..7a31f0194 100644 --- a/snippets/isTravisCI.md +++ b/snippets/isTravisCI.md @@ -1,6 +1,8 @@ --- title: isTravisCI tags: node,intermediate +firstSeen: 2018-01-01T17:28:08+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the current environment is [Travis CI](https://travis-ci.org/). diff --git a/snippets/isUndefined.md b/snippets/isUndefined.md index 6e569845f..6992f55f5 100644 --- a/snippets/isUndefined.md +++ b/snippets/isUndefined.md @@ -1,6 +1,8 @@ --- title: isUndefined tags: type,beginner +firstSeen: 2018-01-16T16:50:21+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the specified value is `undefined`. diff --git a/snippets/isUpperCase.md b/snippets/isUpperCase.md index bf04d4f7e..af7b6ee2a 100644 --- a/snippets/isUpperCase.md +++ b/snippets/isUpperCase.md @@ -1,6 +1,8 @@ --- title: isUpperCase tags: string,beginner +firstSeen: 2018-01-06T11:16:05+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Checks if a string is upper case. diff --git a/snippets/isValidJSON.md b/snippets/isValidJSON.md index 8fd0200d2..6aa964bcb 100644 --- a/snippets/isValidJSON.md +++ b/snippets/isValidJSON.md @@ -1,6 +1,8 @@ --- title: isValidJSON tags: type,intermediate +firstSeen: 2017-12-31T14:53:01+02:00 +lastUpdated: 2020-10-18T13:49:49+03:00 --- Checks if the provided string is a valid JSON. diff --git a/snippets/isWeekday.md b/snippets/isWeekday.md index 292bf806e..4f051ab91 100644 --- a/snippets/isWeekday.md +++ b/snippets/isWeekday.md @@ -1,6 +1,8 @@ --- title: isWeekday tags: date,beginner +firstSeen: 2019-07-19T12:12:09+03:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the given date is a weekday. diff --git a/snippets/isWeekend.md b/snippets/isWeekend.md index a97053884..5795d7ddd 100644 --- a/snippets/isWeekend.md +++ b/snippets/isWeekend.md @@ -1,6 +1,8 @@ --- title: isWeekend tags: date,beginner +firstSeen: 2019-07-19T17:07:02+03:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the given date is a weekend. diff --git a/snippets/isWritableStream.md b/snippets/isWritableStream.md index 61d78320c..21b89c24a 100644 --- a/snippets/isWritableStream.md +++ b/snippets/isWritableStream.md @@ -1,6 +1,8 @@ --- title: isWritableStream tags: node,type,intermediate +firstSeen: 2018-10-03T22:16:10+03:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Checks if the given argument is a writable stream. diff --git a/snippets/join.md b/snippets/join.md index 70bae7471..e4d7f45db 100644 --- a/snippets/join.md +++ b/snippets/join.md @@ -1,6 +1,8 @@ --- title: join tags: array,intermediate +firstSeen: 2018-01-01T12:18:40+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Joins all elements of an array into a string and returns this string. diff --git a/snippets/juxt.md b/snippets/juxt.md index 25d9648d0..c9209e342 100644 --- a/snippets/juxt.md +++ b/snippets/juxt.md @@ -1,6 +1,8 @@ --- title: juxt tags: function,advanced +firstSeen: 2020-05-20T19:58:39+03:00 +lastUpdated: 2020-10-20T23:29:39+03:00 --- Takes several functions as argument and returns a function that is the juxtaposition of those functions. diff --git a/snippets/kMeans.md b/snippets/kMeans.md index 3363815e8..57aa1aa65 100644 --- a/snippets/kMeans.md +++ b/snippets/kMeans.md @@ -1,6 +1,8 @@ --- title: kMeans tags: algorithm,array,advanced +firstSeen: 2020-12-28T15:38:40+02:00 +lastUpdated: 2020-12-29T16:32:46+02:00 --- Groups the given data into `k` clusters, using the [k-means clustering](https://en.wikipedia.org/wiki/K-means_clustering) algorithm. diff --git a/snippets/kNearestNeighbors.md b/snippets/kNearestNeighbors.md index 3b789b4b8..41346b253 100644 --- a/snippets/kNearestNeighbors.md +++ b/snippets/kNearestNeighbors.md @@ -1,6 +1,8 @@ --- title: kNearestNeighbors tags: algorithm,array,advanced +firstSeen: 2020-12-28T16:31:43+02:00 +lastUpdated: 2020-12-29T16:31:16+02:00 --- Classifies a data point relative to a labelled data set, using the [k-nearest neighbors](https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm) algorithm. diff --git a/snippets/kmToMiles.md b/snippets/kmToMiles.md index a02f2953f..f7e44d779 100644 --- a/snippets/kmToMiles.md +++ b/snippets/kmToMiles.md @@ -2,6 +2,8 @@ title: kmToMiles tags: math,beginner unlisted: true +firstSeen: 2020-10-04T00:50:13+03:00 +lastUpdated: 2021-01-04T13:04:15+02:00 --- Converts kilometers to miles. diff --git a/snippets/last.md b/snippets/last.md index 32976b5fa..266a43a5e 100644 --- a/snippets/last.md +++ b/snippets/last.md @@ -1,6 +1,8 @@ --- title: last tags: array,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-20T23:02:01+03:00 --- Returns the last element in an array. diff --git a/snippets/lastDateOfMonth.md b/snippets/lastDateOfMonth.md index e8fab0c30..b9081082a 100644 --- a/snippets/lastDateOfMonth.md +++ b/snippets/lastDateOfMonth.md @@ -1,6 +1,8 @@ --- title: lastDateOfMonth tags: date,intermediate +firstSeen: 2020-10-09T20:36:54+03:00 +lastUpdated: 2020-10-09T22:01:42+03:00 --- Returns the string representation of the last date in the given date's month. diff --git a/snippets/lcm.md b/snippets/lcm.md index 66667a8c0..ddcabc2db 100644 --- a/snippets/lcm.md +++ b/snippets/lcm.md @@ -1,6 +1,8 @@ --- title: lcm tags: math,algorithm,recursion,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-12-28T13:49:24+02:00 --- Calculates the least common multiple of two or more numbers. diff --git a/snippets/levenshteinDistance.md b/snippets/levenshteinDistance.md index 1147607e0..ab8441df7 100644 --- a/snippets/levenshteinDistance.md +++ b/snippets/levenshteinDistance.md @@ -1,6 +1,8 @@ --- title: levenshteinDistance tags: string,algorithm,intermediate +firstSeen: 2020-12-27T19:49:12+02:00 +lastUpdated: 2020-12-29T16:27:50+02:00 --- Calculates the difference between two strings, using the [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) algorithm. diff --git a/snippets/linearSearch.md b/snippets/linearSearch.md index 91143c366..b4cc51e4a 100644 --- a/snippets/linearSearch.md +++ b/snippets/linearSearch.md @@ -1,6 +1,8 @@ --- title: linearSearch tags: algorithm,array,beginner +firstSeen: 2020-12-28T12:07:53+02:00 +lastUpdated: 2020-12-28T12:07:53+02:00 --- Finds the first index of a given element in an array using the linear search algorithm. diff --git a/snippets/listenOnce.md b/snippets/listenOnce.md index f06e72543..9c7498ec3 100644 --- a/snippets/listenOnce.md +++ b/snippets/listenOnce.md @@ -1,6 +1,8 @@ --- title: listenOnce tags: browser,event,beginner +firstSeen: 2020-06-01T16:58:52+03:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Adds an event listener to an element that will only run the callback the first time the event is triggered. diff --git a/snippets/logBase.md b/snippets/logBase.md index ebc6dcd65..bca3e06d3 100644 --- a/snippets/logBase.md +++ b/snippets/logBase.md @@ -1,6 +1,8 @@ --- title: logBase tags: math,beginner +firstSeen: 2020-10-07T19:14:30+03:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Calculates the logarithm of the given number in the given base. diff --git a/snippets/longestItem.md b/snippets/longestItem.md index 3e41e8a1b..1baf9abcb 100644 --- a/snippets/longestItem.md +++ b/snippets/longestItem.md @@ -1,6 +1,8 @@ --- title: longestItem tags: array,intermediate +firstSeen: 2018-01-08T21:33:47+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Takes any number of iterable objects or objects with a `length` property and returns the longest one. diff --git a/snippets/lowercaseKeys.md b/snippets/lowercaseKeys.md index 033139a78..fbe68e400 100644 --- a/snippets/lowercaseKeys.md +++ b/snippets/lowercaseKeys.md @@ -1,6 +1,8 @@ --- title: lowercaseKeys tags: object,intermediate +firstSeen: 2017-12-29T13:28:18+02:00 +lastUpdated: 2020-10-20T11:21:07+03:00 --- Creates a new object from the specified object, where all the keys are in lowercase. diff --git a/snippets/luhnCheck.md b/snippets/luhnCheck.md index fa842f1da..ea4b34ba3 100644 --- a/snippets/luhnCheck.md +++ b/snippets/luhnCheck.md @@ -1,6 +1,8 @@ --- title: luhnCheck tags: math,algorithm,advanced +firstSeen: 2018-01-03T11:02:35+02:00 +lastUpdated: 2020-12-28T13:49:24+02:00 --- Implementation of the [Luhn Algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) used to validate a variety of identification numbers, such as credit card numbers, IMEI numbers, National Provider Identifier numbers etc. diff --git a/snippets/mapKeys.md b/snippets/mapKeys.md index 4b144c826..2f37acf79 100644 --- a/snippets/mapKeys.md +++ b/snippets/mapKeys.md @@ -1,6 +1,8 @@ --- title: mapKeys tags: object,intermediate +firstSeen: 2018-01-11T20:33:14+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Maps the keys of an object using the provided function, generating a new object. diff --git a/snippets/mapNumRange.md b/snippets/mapNumRange.md index 40e2a1731..5c6af9c98 100644 --- a/snippets/mapNumRange.md +++ b/snippets/mapNumRange.md @@ -1,6 +1,8 @@ --- title: mapNumRange tags: math,beginner +firstSeen: 2019-02-23T12:38:16+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Maps a number from one range to another range. diff --git a/snippets/mapObject.md b/snippets/mapObject.md index 091e3f8ca..435eb5a27 100644 --- a/snippets/mapObject.md +++ b/snippets/mapObject.md @@ -1,6 +1,8 @@ --- title: mapObject tags: array,object,intermediate +firstSeen: 2017-12-18T12:11:58+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Maps the values of an array to an object using a function. diff --git a/snippets/mapString.md b/snippets/mapString.md index 8b0af94e3..08e5068a0 100644 --- a/snippets/mapString.md +++ b/snippets/mapString.md @@ -1,6 +1,8 @@ --- title: mapString tags: string,intermediate +firstSeen: 2018-07-14T10:59:56+03:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Creates a new string with the results of calling a provided function on every character in the given string. diff --git a/snippets/mapValues.md b/snippets/mapValues.md index bbb182f53..19ba34376 100644 --- a/snippets/mapValues.md +++ b/snippets/mapValues.md @@ -1,6 +1,8 @@ --- title: mapValues tags: object,intermediate +firstSeen: 2018-01-11T20:33:14+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Maps the values of an object using the provided function, generating a new object with the same keys. diff --git a/snippets/mask.md b/snippets/mask.md index 0a62131d8..22af246e1 100644 --- a/snippets/mask.md +++ b/snippets/mask.md @@ -1,6 +1,8 @@ --- title: mask tags: string,intermediate +firstSeen: 2018-01-01T13:02:59+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Replaces all but the last `num` of characters with the specified mask character. diff --git a/snippets/matches.md b/snippets/matches.md index 071968fe0..cc2a2e3c8 100644 --- a/snippets/matches.md +++ b/snippets/matches.md @@ -1,6 +1,8 @@ --- title: matches tags: object,intermediate +firstSeen: 2018-01-23T20:17:32+02:00 +lastUpdated: 2020-11-03T22:11:18+02:00 --- Compares two objects to determine if the first one contains equivalent property values to the second one. diff --git a/snippets/matchesWith.md b/snippets/matchesWith.md index 914330ec5..b82be9975 100644 --- a/snippets/matchesWith.md +++ b/snippets/matchesWith.md @@ -1,6 +1,8 @@ --- title: matchesWith tags: object,intermediate +firstSeen: 2018-01-23T20:17:32+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Compares two objects to determine if the first one contains equivalent property values to the second one, based on a provided function. diff --git a/snippets/maxBy.md b/snippets/maxBy.md index bfb52fcaf..75c848868 100644 --- a/snippets/maxBy.md +++ b/snippets/maxBy.md @@ -1,6 +1,8 @@ --- title: maxBy tags: math,array,beginner +firstSeen: 2018-01-11T12:25:54+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Returns the maximum value of an array, after mapping each element to a value using the provided function. diff --git a/snippets/maxDate.md b/snippets/maxDate.md index 36f9e92c1..a0a73ebfd 100644 --- a/snippets/maxDate.md +++ b/snippets/maxDate.md @@ -1,6 +1,8 @@ --- title: maxDate tags: date,intermediate +firstSeen: 2018-09-29T13:38:20+03:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Returns the maximum of the given dates. diff --git a/snippets/maxN.md b/snippets/maxN.md index cf7864502..e2356284c 100644 --- a/snippets/maxN.md +++ b/snippets/maxN.md @@ -1,6 +1,8 @@ --- title: maxN tags: array,math,intermediate +firstSeen: 2018-01-03T05:18:29+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Returns the `n` maximum elements from the provided array. diff --git a/snippets/median.md b/snippets/median.md index af273a19e..885a594e3 100644 --- a/snippets/median.md +++ b/snippets/median.md @@ -1,6 +1,8 @@ --- title: median tags: math,array,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:23:47+03:00 --- Calculates the median of an array of numbers. diff --git a/snippets/memoize.md b/snippets/memoize.md index a9873649a..594e6b1f4 100644 --- a/snippets/memoize.md +++ b/snippets/memoize.md @@ -1,6 +1,8 @@ --- title: memoize tags: function,advanced +firstSeen: 2017-12-31T13:55:55+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Returns the memoized (cached) function. diff --git a/snippets/merge.md b/snippets/merge.md index 43dada765..1c2092959 100644 --- a/snippets/merge.md +++ b/snippets/merge.md @@ -1,6 +1,8 @@ --- title: merge tags: object,array,intermediate +firstSeen: 2018-01-12T14:44:20+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Creates a new object from the combination of two or more objects. diff --git a/snippets/mergeSort.md b/snippets/mergeSort.md index 4c6e916e7..b41dde893 100644 --- a/snippets/mergeSort.md +++ b/snippets/mergeSort.md @@ -1,6 +1,8 @@ --- title: mergeSort tags: algorithm,array,recursion,advanced +firstSeen: 2020-12-27T22:44:32+02:00 +lastUpdated: 2020-12-27T22:44:32+02:00 --- Sorts an array of numbers, using the merge sort algorithm. diff --git a/snippets/mergeSortedArrays.md b/snippets/mergeSortedArrays.md index fb23232c1..592742be3 100644 --- a/snippets/mergeSortedArrays.md +++ b/snippets/mergeSortedArrays.md @@ -1,6 +1,8 @@ --- title: mergeSortedArrays tags: array,intermediate +firstSeen: 2020-12-27T22:55:37+02:00 +lastUpdated: 2020-12-27T22:55:37+02:00 --- Merges two sorted arrays into one. diff --git a/snippets/midpoint.md b/snippets/midpoint.md index 1a764716a..5755d28c7 100644 --- a/snippets/midpoint.md +++ b/snippets/midpoint.md @@ -1,6 +1,8 @@ --- title: midpoint tags: math,beginner +firstSeen: 2018-11-15T17:49:04+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Calculates the midpoint between two pairs of (x,y) points. diff --git a/snippets/milesToKm.md b/snippets/milesToKm.md index 36e3977de..e103b0838 100644 --- a/snippets/milesToKm.md +++ b/snippets/milesToKm.md @@ -2,6 +2,8 @@ title: milesToKm tags: math,beginner unlisted: true +firstSeen: 2020-10-04T00:51:51+03:00 +lastUpdated: 2021-01-04T13:04:15+02:00 --- Converts miles to kilometers. diff --git a/snippets/minBy.md b/snippets/minBy.md index 38952e502..8678afe88 100644 --- a/snippets/minBy.md +++ b/snippets/minBy.md @@ -1,6 +1,8 @@ --- title: minBy tags: math,array,beginner +firstSeen: 2018-01-11T12:25:54+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Returns the minimum value of an array, after mapping each element to a value using the provided function. diff --git a/snippets/minDate.md b/snippets/minDate.md index 5bf0a009e..cef2041e2 100644 --- a/snippets/minDate.md +++ b/snippets/minDate.md @@ -1,6 +1,8 @@ --- title: minDate tags: date,intermediate +firstSeen: 2018-09-29T13:38:20+03:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Returns the minimum of the given dates. diff --git a/snippets/minN.md b/snippets/minN.md index 71eb826d9..d29c27a50 100644 --- a/snippets/minN.md +++ b/snippets/minN.md @@ -1,6 +1,8 @@ --- title: minN tags: array,math,intermediate +firstSeen: 2018-01-03T05:18:29+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Returns the `n` minimum elements from the provided array. diff --git a/snippets/mostFrequent.md b/snippets/mostFrequent.md index ef09a55ee..2c5c939de 100644 --- a/snippets/mostFrequent.md +++ b/snippets/mostFrequent.md @@ -1,6 +1,8 @@ --- title: mostFrequent tags: array,intermediate +firstSeen: 2020-01-03T15:32:46+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Returns the most frequent element in an array. diff --git a/snippets/mostPerformant.md b/snippets/mostPerformant.md index 958623a76..0bf633c60 100644 --- a/snippets/mostPerformant.md +++ b/snippets/mostPerformant.md @@ -1,6 +1,8 @@ --- title: mostPerformant tags: function,advanced +firstSeen: 2018-02-14T13:38:45+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Returns the index of the function in an array of functions which executed the fastest. diff --git a/snippets/negate.md b/snippets/negate.md index 5edd4c946..8b7382cd0 100644 --- a/snippets/negate.md +++ b/snippets/negate.md @@ -1,6 +1,8 @@ --- title: negate tags: function,beginner +firstSeen: 2017-12-24T08:28:52+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Negates a predicate function. diff --git a/snippets/nest.md b/snippets/nest.md index 9afc11584..47e21db2c 100644 --- a/snippets/nest.md +++ b/snippets/nest.md @@ -1,6 +1,8 @@ --- title: nest tags: object,recursion,intermediate +firstSeen: 2018-02-24T13:49:56+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Nests recursively objects linked to one another in a flat array. diff --git a/snippets/nodeListToArray.md b/snippets/nodeListToArray.md index f1d0e27d0..7c1f6f918 100644 --- a/snippets/nodeListToArray.md +++ b/snippets/nodeListToArray.md @@ -1,6 +1,8 @@ --- title: nodeListToArray tags: browser,array,beginner +firstSeen: 2018-05-06T18:11:21+03:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Converts a `NodeList` to an array. diff --git a/snippets/none.md b/snippets/none.md index ffec8c1b5..e71fa66ca 100644 --- a/snippets/none.md +++ b/snippets/none.md @@ -1,6 +1,8 @@ --- title: none tags: array,beginner +firstSeen: 2018-02-14T11:46:15+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Checks if the provided predicate function returns `false` for all elements in a collection. diff --git a/snippets/nor.md b/snippets/nor.md index 0671e6fd7..b1e524de9 100644 --- a/snippets/nor.md +++ b/snippets/nor.md @@ -2,6 +2,8 @@ title: nor tags: math,logic,beginner unlisted: true +firstSeen: 2021-03-29T21:20:41+03:00 +lastUpdated: 2021-04-02T16:47:15+03:00 --- Checks if none of the arguments are `true`. diff --git a/snippets/normalizeLineEndings.md b/snippets/normalizeLineEndings.md index ddd6ec255..b90a4f811 100644 --- a/snippets/normalizeLineEndings.md +++ b/snippets/normalizeLineEndings.md @@ -1,6 +1,8 @@ --- title: normalizeLineEndings tags: string,regexp,intermediate +firstSeen: 2020-05-04T12:33:13+03:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Normalizes line endings in a string. diff --git a/snippets/not.md b/snippets/not.md index 8e3bdf420..2f5afb298 100644 --- a/snippets/not.md +++ b/snippets/not.md @@ -2,6 +2,8 @@ title: not tags: math,logic,beginner unlisted: true +firstSeen: 2020-05-13T11:28:26+03:00 +lastUpdated: 2021-01-04T13:04:15+02:00 --- Returns the logical inverse of the given value. diff --git a/snippets/nthArg.md b/snippets/nthArg.md index 4f9e72857..eb578dff0 100644 --- a/snippets/nthArg.md +++ b/snippets/nthArg.md @@ -1,6 +1,8 @@ --- title: nthArg tags: function,beginner +firstSeen: 2018-01-23T21:27:37+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Creates a function that gets the argument at index `n`. diff --git a/snippets/nthElement.md b/snippets/nthElement.md index 80577ff79..536e999df 100644 --- a/snippets/nthElement.md +++ b/snippets/nthElement.md @@ -1,6 +1,8 @@ --- title: nthElement tags: array,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Returns the nth element of an array. diff --git a/snippets/nthRoot.md b/snippets/nthRoot.md index d9e55a09d..09ad2e9df 100644 --- a/snippets/nthRoot.md +++ b/snippets/nthRoot.md @@ -1,6 +1,8 @@ --- title: nthRoot tags: math,beginner +firstSeen: 2021-01-06T22:47:48+02:00 +lastUpdated: 2021-01-06T22:47:48+02:00 --- Calculates the nth root of a given number. diff --git a/snippets/objectFromPairs.md b/snippets/objectFromPairs.md index 0bb7242e4..4f470480f 100644 --- a/snippets/objectFromPairs.md +++ b/snippets/objectFromPairs.md @@ -1,6 +1,8 @@ --- title: objectFromPairs tags: object,array,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Creates an object from the given key-value pairs. diff --git a/snippets/objectToEntries.md b/snippets/objectToEntries.md index fa8c4dfdd..44bbb3df1 100644 --- a/snippets/objectToEntries.md +++ b/snippets/objectToEntries.md @@ -1,6 +1,8 @@ --- title: objectToEntries tags: object,array,beginner +firstSeen: 2020-04-16T11:10:13+03:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Creates an array of key-value pair arrays from an object. diff --git a/snippets/objectToPairs.md b/snippets/objectToPairs.md index cec267e11..93bfca48e 100644 --- a/snippets/objectToPairs.md +++ b/snippets/objectToPairs.md @@ -1,6 +1,8 @@ --- title: objectToPairs tags: object,array,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Creates an array of key-value pair arrays from an object. diff --git a/snippets/objectToQueryString.md b/snippets/objectToQueryString.md index 5c7758936..4b1f14480 100644 --- a/snippets/objectToQueryString.md +++ b/snippets/objectToQueryString.md @@ -1,6 +1,8 @@ --- title: objectToQueryString tags: object,advanced +firstSeen: 2019-10-11T23:16:05+03:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Generates a query string from the key-value pairs of the given object. diff --git a/snippets/observeMutations.md b/snippets/observeMutations.md index 6220376a4..83477623b 100644 --- a/snippets/observeMutations.md +++ b/snippets/observeMutations.md @@ -1,6 +1,8 @@ --- title: observeMutations tags: browser,event,advanced +firstSeen: 2018-01-13T14:58:52+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Creates a new `MutationObserver` and runs the provided callback for each mutation on the specified element. diff --git a/snippets/off.md b/snippets/off.md index 987cd6660..edeb1fa37 100644 --- a/snippets/off.md +++ b/snippets/off.md @@ -1,6 +1,8 @@ --- title: off tags: browser,event,intermediate +firstSeen: 2018-01-05T14:33:48+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Removes an event listener from an element. diff --git a/snippets/offset.md b/snippets/offset.md index ac4d14ea3..e4592689d 100644 --- a/snippets/offset.md +++ b/snippets/offset.md @@ -1,6 +1,8 @@ --- title: offset tags: array,beginner +firstSeen: 2018-04-10T19:07:50+03:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Moves the specified amount of elements to the end of the array. diff --git a/snippets/omit.md b/snippets/omit.md index 4d6af0b65..95cbe1abc 100644 --- a/snippets/omit.md +++ b/snippets/omit.md @@ -1,6 +1,8 @@ --- title: omit tags: object,intermediate +firstSeen: 2018-01-19T13:14:46+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Omits the key-value pairs corresponding to the given keys from an object. diff --git a/snippets/omitBy.md b/snippets/omitBy.md index 8cf67b829..6fb23cdf1 100644 --- a/snippets/omitBy.md +++ b/snippets/omitBy.md @@ -1,6 +1,8 @@ --- title: omitBy tags: object,intermediate +firstSeen: 2018-01-19T13:23:45+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Omits the key-value pairs corresponding to the keys of the object for which the given function returns falsy. diff --git a/snippets/on.md b/snippets/on.md index 278357ace..5ec7afe94 100644 --- a/snippets/on.md +++ b/snippets/on.md @@ -1,6 +1,8 @@ --- title: on tags: browser,event,intermediate +firstSeen: 2018-01-05T14:33:48+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Adds an event listener to an element with the ability to use event delegation. diff --git a/snippets/onClickOutside.md b/snippets/onClickOutside.md index 443e8cefc..b7b824e91 100644 --- a/snippets/onClickOutside.md +++ b/snippets/onClickOutside.md @@ -1,6 +1,8 @@ --- title: onClickOutside tags: browser,event,intermediate +firstSeen: 2021-01-06T13:57:56+02:00 +lastUpdated: 2021-01-06T13:57:56+02:00 --- Runs the callback whenever the user clicks outside of the specified element. diff --git a/snippets/onScrollStop.md b/snippets/onScrollStop.md index 39324d473..697316839 100644 --- a/snippets/onScrollStop.md +++ b/snippets/onScrollStop.md @@ -1,6 +1,8 @@ --- title: onScrollStop tags: browser,event,intermediate +firstSeen: 2021-01-07T00:31:14+02:00 +lastUpdated: 2021-01-07T00:31:14+02:00 --- Runs the callback whenever the user has stopped scrolling. diff --git a/snippets/onUserInputChange.md b/snippets/onUserInputChange.md index f03716761..ebe9e5be4 100644 --- a/snippets/onUserInputChange.md +++ b/snippets/onUserInputChange.md @@ -1,6 +1,8 @@ --- title: onUserInputChange tags: browser,event,advanced +firstSeen: 2017-12-29T17:41:53+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Runs the callback whenever the user input type changes (`mouse` or `touch`). diff --git a/snippets/once.md b/snippets/once.md index 04322e227..517e45b58 100644 --- a/snippets/once.md +++ b/snippets/once.md @@ -1,6 +1,8 @@ --- title: once tags: function,intermediate +firstSeen: 2018-01-02T00:40:46+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Ensures a function is called only once. diff --git a/snippets/or.md b/snippets/or.md index b401d9c2a..ccaeb8c34 100644 --- a/snippets/or.md +++ b/snippets/or.md @@ -2,6 +2,8 @@ title: or tags: math,logic,beginner unlisted: true +firstSeen: 2020-05-13T11:35:41+03:00 +lastUpdated: 2021-01-04T13:04:15+02:00 --- Checks if at least one of the arguments is `true`. diff --git a/snippets/orderBy.md b/snippets/orderBy.md index 0b67b0d69..b076484df 100644 --- a/snippets/orderBy.md +++ b/snippets/orderBy.md @@ -1,6 +1,8 @@ --- title: orderBy tags: object,array,advanced +firstSeen: 2017-12-20T11:33:20+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Sorts an array of objects, ordered by properties and orders. diff --git a/snippets/orderWith.md b/snippets/orderWith.md index 2e88ef989..d8788188c 100644 --- a/snippets/orderWith.md +++ b/snippets/orderWith.md @@ -1,6 +1,8 @@ --- title: orderWith tags: array,object,intermediate +firstSeen: 2020-10-04T12:11:10+03:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Sorts an array of objects, ordered by a property, based on the array of orders provided. diff --git a/snippets/over.md b/snippets/over.md index df1f34a23..8f64d89b4 100644 --- a/snippets/over.md +++ b/snippets/over.md @@ -1,6 +1,8 @@ --- title: over tags: function,intermediate +firstSeen: 2018-01-23T21:02:17+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Creates a function that invokes each provided function with the arguments it receives and returns the results. diff --git a/snippets/overArgs.md b/snippets/overArgs.md index 5ad3e6eef..5d402dbb9 100644 --- a/snippets/overArgs.md +++ b/snippets/overArgs.md @@ -1,6 +1,8 @@ --- title: overArgs tags: function,intermediate +firstSeen: 2018-01-28T14:54:16+02:00 +lastUpdated: 2020-10-21T21:54:53+03:00 --- Creates a function that invokes the provided function with its arguments transformed. diff --git a/snippets/pad.md b/snippets/pad.md index 3623f57c5..8d8cf1563 100644 --- a/snippets/pad.md +++ b/snippets/pad.md @@ -1,6 +1,8 @@ --- title: pad tags: string,beginner +firstSeen: 2018-02-24T11:51:27+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Pads a string on both sides with the specified character, if it's shorter than the specified `length`. diff --git a/snippets/padNumber.md b/snippets/padNumber.md index c2c781019..f3abf59e3 100644 --- a/snippets/padNumber.md +++ b/snippets/padNumber.md @@ -1,6 +1,8 @@ --- title: padNumber tags: string,math,beginner +firstSeen: 2020-10-03T23:31:08+03:00 +lastUpdated: 2020-10-03T23:31:08+03:00 --- Pads a given number to the specified length. diff --git a/snippets/palindrome.md b/snippets/palindrome.md index c53153d83..f5c1709f3 100644 --- a/snippets/palindrome.md +++ b/snippets/palindrome.md @@ -1,6 +1,8 @@ --- title: palindrome tags: string,intermediate +firstSeen: 2017-12-17T16:41:31+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Checks if the given string is a palindrome. diff --git a/snippets/parseCookie.md b/snippets/parseCookie.md index 3cce879b4..531058b22 100644 --- a/snippets/parseCookie.md +++ b/snippets/parseCookie.md @@ -1,6 +1,8 @@ --- title: parseCookie tags: browser,string,intermediate +firstSeen: 2018-01-13T14:19:21+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Parses an HTTP Cookie header string, returning an object of all cookie name-value pairs. diff --git a/snippets/partial.md b/snippets/partial.md index 8dead5e7d..a75945e4e 100644 --- a/snippets/partial.md +++ b/snippets/partial.md @@ -1,6 +1,8 @@ --- title: partial tags: function,intermediate +firstSeen: 2018-01-24T14:40:16+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Creates a function that invokes `fn` with `partials` prepended to the arguments it receives. diff --git a/snippets/partialRight.md b/snippets/partialRight.md index 625ad8f7c..7608d6115 100644 --- a/snippets/partialRight.md +++ b/snippets/partialRight.md @@ -1,6 +1,8 @@ --- title: partialRight tags: function,intermediate +firstSeen: 2018-01-24T14:40:16+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Creates a function that invokes `fn` with `partials` appended to the arguments it receives. diff --git a/snippets/partition.md b/snippets/partition.md index feef49186..00a499eec 100644 --- a/snippets/partition.md +++ b/snippets/partition.md @@ -1,6 +1,8 @@ --- title: partition tags: array,object,intermediate +firstSeen: 2018-01-08T16:58:23+02:00 +lastUpdated: 2020-11-03T21:46:13+02:00 --- Groups the elements into two arrays, depending on the provided function's truthiness for each element. diff --git a/snippets/partitionBy.md b/snippets/partitionBy.md index 70fd5d746..294147dd2 100644 --- a/snippets/partitionBy.md +++ b/snippets/partitionBy.md @@ -1,6 +1,8 @@ --- title: partitionBy tags: array,object,advanced +firstSeen: 2020-05-20T17:48:13+03:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Applies `fn` to each value in `arr`, splitting it each time the provided function returns a new value. diff --git a/snippets/percentile.md b/snippets/percentile.md index 99c5df2bb..da261b821 100644 --- a/snippets/percentile.md +++ b/snippets/percentile.md @@ -1,6 +1,8 @@ --- title: percentile tags: math,intermediate +firstSeen: 2017-12-13T12:50:16+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Calculates the percentage of numbers in the given array that are less or equal to the given value. diff --git a/snippets/permutations.md b/snippets/permutations.md index 8e94d7b5b..30e55e022 100644 --- a/snippets/permutations.md +++ b/snippets/permutations.md @@ -1,6 +1,8 @@ --- title: permutations tags: array,algorithm,recursion,advanced +firstSeen: 2018-02-19T15:47:47+02:00 +lastUpdated: 2020-12-28T13:49:24+02:00 --- Generates all permutations of an array's elements (contains duplicates). diff --git a/snippets/pick.md b/snippets/pick.md index a6a26ca1c..18b8f18ae 100644 --- a/snippets/pick.md +++ b/snippets/pick.md @@ -1,6 +1,8 @@ --- title: pick tags: object,intermediate +firstSeen: 2017-12-13T23:51:34+02:00 +lastUpdated: 2020-10-18T14:58:09+03:00 --- Picks the key-value pairs corresponding to the given keys from an object. diff --git a/snippets/pickBy.md b/snippets/pickBy.md index 96feab053..a4200315d 100644 --- a/snippets/pickBy.md +++ b/snippets/pickBy.md @@ -1,6 +1,8 @@ --- title: pickBy tags: object,intermediate +firstSeen: 2018-01-19T13:23:45+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Creates an object composed of the properties the given function returns truthy for. diff --git a/snippets/pipeAsyncFunctions.md b/snippets/pipeAsyncFunctions.md index b3a4d6b76..820ec78d8 100644 --- a/snippets/pipeAsyncFunctions.md +++ b/snippets/pipeAsyncFunctions.md @@ -1,6 +1,8 @@ --- title: pipeAsyncFunctions tags: function,promise,intermediate +firstSeen: 2018-01-27T18:17:44+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Performs left-to-right function composition for asynchronous functions. diff --git a/snippets/pipeFunctions.md b/snippets/pipeFunctions.md index d1612dbfe..1ec652723 100644 --- a/snippets/pipeFunctions.md +++ b/snippets/pipeFunctions.md @@ -1,6 +1,8 @@ --- title: pipeFunctions tags: function,intermediate +firstSeen: 2017-12-26T19:02:27+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Performs left-to-right function composition. diff --git a/snippets/pluck.md b/snippets/pluck.md index d84235a6a..91d054f7c 100644 --- a/snippets/pluck.md +++ b/snippets/pluck.md @@ -1,6 +1,8 @@ --- title: pluck tags: array,object,beginner +firstSeen: 2020-10-18T01:19:37+03:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Converts an array of objects into an array of values corresponding to the specified `key`. diff --git a/snippets/pluralize.md b/snippets/pluralize.md index 173be1119..59f1f7b59 100644 --- a/snippets/pluralize.md +++ b/snippets/pluralize.md @@ -1,6 +1,8 @@ --- title: pluralize tags: string,advanced +firstSeen: 2018-01-03T13:17:19+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Returns the singular or plural form of the word based on the input number, using an optional dictionary if supplied. diff --git a/snippets/powerset.md b/snippets/powerset.md index 973f4dadb..e05b57578 100644 --- a/snippets/powerset.md +++ b/snippets/powerset.md @@ -1,6 +1,8 @@ --- title: powerset tags: math,algorithm,beginner +firstSeen: 2017-12-07T14:41:33+02:00 +lastUpdated: 2020-12-28T13:49:24+02:00 --- Returns the powerset of a given array of numbers. diff --git a/snippets/prefersDarkColorScheme.md b/snippets/prefersDarkColorScheme.md index c35085da0..a5c0729e8 100644 --- a/snippets/prefersDarkColorScheme.md +++ b/snippets/prefersDarkColorScheme.md @@ -1,6 +1,8 @@ --- title: prefersDarkColorScheme tags: browser,intermediate +firstSeen: 2020-05-04T12:50:35+03:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Checks if the user color scheme preference is `dark`. diff --git a/snippets/prefersLightColorScheme.md b/snippets/prefersLightColorScheme.md index e6127b15e..fb50cce8f 100644 --- a/snippets/prefersLightColorScheme.md +++ b/snippets/prefersLightColorScheme.md @@ -1,6 +1,8 @@ --- title: prefersLightColorScheme tags: browser,intermediate +firstSeen: 2020-05-04T12:50:35+03:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Checks if the user color scheme preference is `light`. diff --git a/snippets/prefix.md b/snippets/prefix.md index af88e76ba..b9d3de2a5 100644 --- a/snippets/prefix.md +++ b/snippets/prefix.md @@ -1,6 +1,8 @@ --- title: prefix tags: browser,intermediate +firstSeen: 2018-03-08T15:22:54+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Prefixes a CSS property based on the current browser. diff --git a/snippets/prettyBytes.md b/snippets/prettyBytes.md index 334634e5b..e843e262d 100644 --- a/snippets/prettyBytes.md +++ b/snippets/prettyBytes.md @@ -1,6 +1,8 @@ --- title: prettyBytes tags: string,math,advanced +firstSeen: 2018-01-01T18:20:09+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Converts a number in bytes to a human-readable string. diff --git a/snippets/primeFactors.md b/snippets/primeFactors.md index 959db4d85..1112be461 100644 --- a/snippets/primeFactors.md +++ b/snippets/primeFactors.md @@ -1,6 +1,8 @@ --- title: primeFactors tags: math,algorithm,beginner +firstSeen: 2020-12-28T13:11:01+02:00 +lastUpdated: 2020-12-28T13:11:01+02:00 --- Finds the prime factors of a given number using the trial division algorithm. diff --git a/snippets/primes.md b/snippets/primes.md index 303ffeaab..a050d7a67 100644 --- a/snippets/primes.md +++ b/snippets/primes.md @@ -1,6 +1,8 @@ --- title: primes tags: math,algorithm,intermediate +firstSeen: 2017-12-21T12:20:22+02:00 +lastUpdated: 2020-12-28T13:49:24+02:00 --- Generates primes up to a given number, using the Sieve of Eratosthenes. diff --git a/snippets/prod.md b/snippets/prod.md index 49eb3d95b..846c2de37 100644 --- a/snippets/prod.md +++ b/snippets/prod.md @@ -1,6 +1,8 @@ --- title: prod tags: math,array,intermediate +firstSeen: 2020-10-15T21:56:51+03:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Calculates the product of two or more numbers/arrays. diff --git a/snippets/promisify.md b/snippets/promisify.md index b67267e66..d6fefa731 100644 --- a/snippets/promisify.md +++ b/snippets/promisify.md @@ -1,6 +1,8 @@ --- title: promisify tags: function,promise,intermediate +firstSeen: 2017-12-13T12:27:43+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Converts an asynchronous function to return a promise. diff --git a/snippets/pull.md b/snippets/pull.md index 86b7ffa6c..3f5268aae 100644 --- a/snippets/pull.md +++ b/snippets/pull.md @@ -1,6 +1,8 @@ --- title: pull tags: array,intermediate +firstSeen: 2017-12-17T16:41:31+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Mutates the original array to filter out the values specified. diff --git a/snippets/pullAtIndex.md b/snippets/pullAtIndex.md index e01feb82d..3df503aa7 100644 --- a/snippets/pullAtIndex.md +++ b/snippets/pullAtIndex.md @@ -1,6 +1,8 @@ --- title: pullAtIndex tags: array,advanced +firstSeen: 2017-12-19T00:42:47+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Mutates the original array to filter out the values at the specified indexes. diff --git a/snippets/pullAtValue.md b/snippets/pullAtValue.md index bc470f561..8cabba220 100644 --- a/snippets/pullAtValue.md +++ b/snippets/pullAtValue.md @@ -1,6 +1,8 @@ --- title: pullAtValue tags: array,advanced +firstSeen: 2017-12-19T08:06:29+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Mutates the original array to filter out the values specified. diff --git a/snippets/pullBy.md b/snippets/pullBy.md index bfe0da135..3fca463c4 100644 --- a/snippets/pullBy.md +++ b/snippets/pullBy.md @@ -1,6 +1,8 @@ --- title: pullBy tags: array,advanced +firstSeen: 2018-01-26T13:48:50+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Mutates the original array to filter out the values specified, based on a given iterator function. diff --git a/snippets/quarterOfYear.md b/snippets/quarterOfYear.md index b53d5e0b1..ec60c37ac 100644 --- a/snippets/quarterOfYear.md +++ b/snippets/quarterOfYear.md @@ -1,6 +1,8 @@ --- title: quarterOfYear tags: date,beginner +firstSeen: 2020-10-09T10:23:55+03:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Returns the quarter and year to which the supplied date belongs to. diff --git a/snippets/queryStringToObject.md b/snippets/queryStringToObject.md index 64a284918..202d78720 100644 --- a/snippets/queryStringToObject.md +++ b/snippets/queryStringToObject.md @@ -1,6 +1,8 @@ --- title: queryStringToObject tags: object,intermediate +firstSeen: 2020-10-20T20:25:32+03:00 +lastUpdated: 2020-11-03T22:11:18+02:00 --- Generates an object from the given query string or URL. diff --git a/snippets/quickSort.md b/snippets/quickSort.md index fe419e5a9..5b418e240 100644 --- a/snippets/quickSort.md +++ b/snippets/quickSort.md @@ -1,6 +1,8 @@ --- title: quickSort tags: algorithm,array,recursion,advanced +firstSeen: 2017-12-28T13:42:41+02:00 +lastUpdated: 2020-12-29T13:03:18+02:00 --- Sorts an array of numbers, using the quicksort algorithm. diff --git a/snippets/radsToDegrees.md b/snippets/radsToDegrees.md index 7fa683bc4..1e1bcbfcd 100644 --- a/snippets/radsToDegrees.md +++ b/snippets/radsToDegrees.md @@ -1,6 +1,8 @@ --- title: radsToDegrees tags: math,beginner +firstSeen: 2018-02-14T12:24:50+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Converts an angle from radians to degrees. diff --git a/snippets/randomAlphaNumeric.md b/snippets/randomAlphaNumeric.md index 241ca08be..2ed0cfb5b 100644 --- a/snippets/randomAlphaNumeric.md +++ b/snippets/randomAlphaNumeric.md @@ -1,6 +1,8 @@ --- title: randomAlphaNumeric tags: string,random,advanced +firstSeen: 2020-10-06T18:33:29+03:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Generates a random string with the specified length. diff --git a/snippets/randomBoolean.md b/snippets/randomBoolean.md index f382f9a09..008ffb20d 100644 --- a/snippets/randomBoolean.md +++ b/snippets/randomBoolean.md @@ -1,6 +1,8 @@ --- title: randomBoolean tags: math,random,beginner +firstSeen: 2021-01-20T16:20:08+02:00 +lastUpdated: 2021-01-20T16:20:08+02:00 --- Generates a random boolean value. diff --git a/snippets/randomHexColorCode.md b/snippets/randomHexColorCode.md index 139b57912..ceb81fadd 100644 --- a/snippets/randomHexColorCode.md +++ b/snippets/randomHexColorCode.md @@ -1,6 +1,8 @@ --- title: randomHexColorCode tags: math,random,beginner +firstSeen: 2017-12-24T14:39:21+02:00 +lastUpdated: 2021-01-08T00:23:44+02:00 --- Generates a random hexadecimal color code. diff --git a/snippets/randomIntArrayInRange.md b/snippets/randomIntArrayInRange.md index 19571c193..b3d785641 100644 --- a/snippets/randomIntArrayInRange.md +++ b/snippets/randomIntArrayInRange.md @@ -1,6 +1,8 @@ --- title: randomIntArrayInRange tags: math,random,intermediate +firstSeen: 2018-01-15T13:25:18+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Generates an array of `n` random integers in the specified range. diff --git a/snippets/randomIntegerInRange.md b/snippets/randomIntegerInRange.md index 8b63fe64e..4cf77920a 100644 --- a/snippets/randomIntegerInRange.md +++ b/snippets/randomIntegerInRange.md @@ -1,6 +1,8 @@ --- title: randomIntegerInRange tags: math,random,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Generates a random integer in the specified range. diff --git a/snippets/randomNumberInRange.md b/snippets/randomNumberInRange.md index ba177258f..83ea11b80 100644 --- a/snippets/randomNumberInRange.md +++ b/snippets/randomNumberInRange.md @@ -1,6 +1,8 @@ --- title: randomNumberInRange tags: math,random,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Generates a random number in the specified range. diff --git a/snippets/rangeGenerator.md b/snippets/rangeGenerator.md index 46d3d7924..97aee0e4f 100644 --- a/snippets/rangeGenerator.md +++ b/snippets/rangeGenerator.md @@ -1,6 +1,8 @@ --- title: rangeGenerator tags: function,generator,advanced +firstSeen: 2020-10-11T17:05:55+03:00 +lastUpdated: 2020-10-11T17:05:55+03:00 --- Creates a generator, that generates all values in the given range using the given step. diff --git a/snippets/readFileLines.md b/snippets/readFileLines.md index b1d7004eb..3515f7d9e 100644 --- a/snippets/readFileLines.md +++ b/snippets/readFileLines.md @@ -1,6 +1,8 @@ --- title: readFileLines tags: node,array,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Returns an array of lines from the specified file. diff --git a/snippets/rearg.md b/snippets/rearg.md index 2c9ea483b..4db42e3f5 100644 --- a/snippets/rearg.md +++ b/snippets/rearg.md @@ -1,6 +1,8 @@ --- title: rearg tags: function,intermediate +firstSeen: 2018-01-28T15:04:21+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Creates a function that invokes the provided function with its arguments arranged according to the specified indexes. diff --git a/snippets/recordAnimationFrames.md b/snippets/recordAnimationFrames.md index 231333dc5..d6a6d50d4 100644 --- a/snippets/recordAnimationFrames.md +++ b/snippets/recordAnimationFrames.md @@ -1,6 +1,8 @@ --- title: recordAnimationFrames tags: browser,recursion,intermediate +firstSeen: 2018-02-28T08:19:07+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Invokes the provided callback on each animation frame. diff --git a/snippets/redirect.md b/snippets/redirect.md index 493cc5c08..b075770a7 100644 --- a/snippets/redirect.md +++ b/snippets/redirect.md @@ -1,6 +1,8 @@ --- title: redirect tags: browser,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-20T11:46:23+03:00 --- Redirects to a specified URL. diff --git a/snippets/reduceSuccessive.md b/snippets/reduceSuccessive.md index d5c794705..5241b40d5 100644 --- a/snippets/reduceSuccessive.md +++ b/snippets/reduceSuccessive.md @@ -1,6 +1,8 @@ --- title: reduceSuccessive tags: array,intermediate +firstSeen: 2018-01-24T16:38:08+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Applies a function against an accumulator and each element in the array (from left to right), returning an array of successively reduced values. diff --git a/snippets/reduceWhich.md b/snippets/reduceWhich.md index 4ec4f7632..5eb045d78 100644 --- a/snippets/reduceWhich.md +++ b/snippets/reduceWhich.md @@ -1,6 +1,8 @@ --- title: reduceWhich tags: array,intermediate +firstSeen: 2018-01-24T12:41:03+02:00 +lastUpdated: 2020-11-03T22:11:18+02:00 --- Returns the minimum/maximum value of an array, after applying the provided function to set the comparing rule. diff --git a/snippets/reducedFilter.md b/snippets/reducedFilter.md index bc7fc8fd2..4dda01eab 100644 --- a/snippets/reducedFilter.md +++ b/snippets/reducedFilter.md @@ -1,6 +1,8 @@ --- title: reducedFilter tags: array,intermediate +firstSeen: 2017-12-22T09:37:36+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Filters an array of objects based on a condition while also filtering out unspecified keys. diff --git a/snippets/reject.md b/snippets/reject.md index 5425db7de..bf23b97f8 100644 --- a/snippets/reject.md +++ b/snippets/reject.md @@ -1,6 +1,8 @@ --- title: reject tags: array,beginner +firstSeen: 2018-04-27T03:17:15+03:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Filters an array's values based on a predicate function, returning only values for which the predicate function returns `false`. diff --git a/snippets/remove.md b/snippets/remove.md index cc7bb4827..4c2a5d03a 100644 --- a/snippets/remove.md +++ b/snippets/remove.md @@ -1,6 +1,8 @@ --- title: remove tags: array,intermediate +firstSeen: 2017-12-17T16:41:31+02:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Mutates an array by removing elements for which the given function returns `false`. diff --git a/snippets/removeAccents.md b/snippets/removeAccents.md index b6eb6626e..84d2e4fcc 100644 --- a/snippets/removeAccents.md +++ b/snippets/removeAccents.md @@ -1,6 +1,8 @@ --- title: removeAccents tags: string,beginner +firstSeen: 2020-10-04T02:23:40+03:00 +lastUpdated: 2020-10-22T20:24:04+03:00 --- Removes accents from strings. diff --git a/snippets/removeClass.md b/snippets/removeClass.md index b6b3b7b9b..f06aec984 100644 --- a/snippets/removeClass.md +++ b/snippets/removeClass.md @@ -1,6 +1,8 @@ --- title: removeClass tags: browser,beginner +firstSeen: 2020-12-30T19:21:15+02:00 +lastUpdated: 2020-12-30T19:21:15+02:00 --- Removes a class from an HTML element. diff --git a/snippets/removeElement.md b/snippets/removeElement.md index d140c5532..b5a03130f 100644 --- a/snippets/removeElement.md +++ b/snippets/removeElement.md @@ -1,6 +1,8 @@ --- title: removeElement tags: browser,beginner +firstSeen: 2021-01-07T00:20:34+02:00 +lastUpdated: 2021-01-07T00:20:34+02:00 --- Removes an element from the DOM. diff --git a/snippets/removeEventListenerAll.md b/snippets/removeEventListenerAll.md index 3f7033640..3a05f9fbf 100644 --- a/snippets/removeEventListenerAll.md +++ b/snippets/removeEventListenerAll.md @@ -1,6 +1,8 @@ --- title: removeEventListenerAll tags: browser,event,intermediate +firstSeen: 2021-04-22T08:53:29+03:00 +lastUpdated: 2021-04-22T08:53:29+03:00 --- Detaches an event listener from all the provided targets. diff --git a/snippets/removeNonASCII.md b/snippets/removeNonASCII.md index ff046a3a4..021e0dbee 100644 --- a/snippets/removeNonASCII.md +++ b/snippets/removeNonASCII.md @@ -1,6 +1,8 @@ --- title: removeNonASCII tags: string,regexp,intermediate +firstSeen: 2018-01-26T14:00:54+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Removes non-printable ASCII characters. diff --git a/snippets/removeWhitespace.md b/snippets/removeWhitespace.md index 17e2090a0..5d19cf7d4 100644 --- a/snippets/removeWhitespace.md +++ b/snippets/removeWhitespace.md @@ -1,6 +1,8 @@ --- title: removeWhitespace tags: string,regexp,beginner +firstSeen: 2020-10-13T09:37:17+03:00 +lastUpdated: 2020-11-03T21:46:13+02:00 --- Returns a string with whitespaces removed. diff --git a/snippets/renameKeys.md b/snippets/renameKeys.md index 93c919181..b5dd4d6e4 100644 --- a/snippets/renameKeys.md +++ b/snippets/renameKeys.md @@ -1,6 +1,8 @@ --- title: renameKeys tags: object,intermediate +firstSeen: 2018-04-10T20:22:39+03:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Replaces the names of multiple object keys with the values provided. diff --git a/snippets/renderElement.md b/snippets/renderElement.md index a32bdc4ed..ad32cccb5 100644 --- a/snippets/renderElement.md +++ b/snippets/renderElement.md @@ -1,6 +1,8 @@ --- title: renderElement tags: browser,recursion,advanced +firstSeen: 2020-05-03T11:55:42+03:00 +lastUpdated: 2020-11-03T22:11:18+02:00 --- Renders the given DOM tree in the specified DOM element. diff --git a/snippets/repeatGenerator.md b/snippets/repeatGenerator.md index 45b93a295..628da49ec 100644 --- a/snippets/repeatGenerator.md +++ b/snippets/repeatGenerator.md @@ -1,6 +1,8 @@ --- title: repeatGenerator tags: function,generator,advanced +firstSeen: 2020-10-11T17:05:48+03:00 +lastUpdated: 2020-10-11T17:05:48+03:00 --- Creates a generator, repeating the given value indefinitely. diff --git a/snippets/replaceLast.md b/snippets/replaceLast.md index 3c4bfcf9b..e387a2fa0 100644 --- a/snippets/replaceLast.md +++ b/snippets/replaceLast.md @@ -1,6 +1,8 @@ --- title: replaceLast tags: string,regexp,advanced +firstSeen: 2021-04-22T09:01:22+03:00 +lastUpdated: 2021-04-22T09:01:22+03:00 --- Replaces the last occurence of a pattern in a string. diff --git a/snippets/requireUncached.md b/snippets/requireUncached.md index c26d3fd6c..ac4a425fd 100644 --- a/snippets/requireUncached.md +++ b/snippets/requireUncached.md @@ -1,6 +1,8 @@ --- title: requireUncached tags: node,advanced +firstSeen: 2020-08-07T15:49:39+03:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Loads a module after removing it from the cache (if exists). diff --git a/snippets/reverseNumber.md b/snippets/reverseNumber.md index 1c05a5909..77fbd4646 100644 --- a/snippets/reverseNumber.md +++ b/snippets/reverseNumber.md @@ -1,6 +1,8 @@ --- title: reverseNumber tags: math,string,beginner +firstSeen: 2020-07-17T16:41:28+03:00 +lastUpdated: 2020-09-18T21:19:23+03:00 --- Reverses a number. diff --git a/snippets/reverseString.md b/snippets/reverseString.md index 79fe59c9c..9bcad298e 100644 --- a/snippets/reverseString.md +++ b/snippets/reverseString.md @@ -1,6 +1,8 @@ --- title: reverseString tags: string,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-18T14:58:09+03:00 --- Reverses a string. diff --git a/snippets/round.md b/snippets/round.md index 589a55b92..d024b1d60 100644 --- a/snippets/round.md +++ b/snippets/round.md @@ -1,6 +1,8 @@ --- title: round tags: math,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Rounds a number to a specified amount of digits. diff --git a/snippets/runAsync.md b/snippets/runAsync.md index 3dcc2a079..2a918e39b 100644 --- a/snippets/runAsync.md +++ b/snippets/runAsync.md @@ -1,6 +1,8 @@ --- title: runAsync tags: browser,function,promise,advanced +firstSeen: 2018-01-02T02:17:52+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Runs a function in a separate thread by using a [Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers), allowing long running functions to not block the UI. diff --git a/snippets/runPromisesInSeries.md b/snippets/runPromisesInSeries.md index 4c5ec56d0..c64fea3e6 100644 --- a/snippets/runPromisesInSeries.md +++ b/snippets/runPromisesInSeries.md @@ -1,6 +1,8 @@ --- title: runPromisesInSeries tags: function,promise,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Runs an array of promises in series. diff --git a/snippets/sample.md b/snippets/sample.md index 53280485b..35f50ff83 100644 --- a/snippets/sample.md +++ b/snippets/sample.md @@ -1,6 +1,8 @@ --- title: sample tags: array,string,random,beginner +firstSeen: 2017-12-17T16:41:31+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Gets a random element from an array. diff --git a/snippets/sampleSize.md b/snippets/sampleSize.md index 0d407a41f..a3c351438 100644 --- a/snippets/sampleSize.md +++ b/snippets/sampleSize.md @@ -1,6 +1,8 @@ --- title: sampleSize tags: array,random,intermediate +firstSeen: 2017-12-31T13:56:28+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Gets `n` random elements at unique keys from an array up to the size of the array. diff --git a/snippets/scrollToTop.md b/snippets/scrollToTop.md index a08611ede..81fcaf632 100644 --- a/snippets/scrollToTop.md +++ b/snippets/scrollToTop.md @@ -1,6 +1,8 @@ --- title: scrollToTop tags: browser,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Smooth-scrolls to the top of the page. diff --git a/snippets/sdbm.md b/snippets/sdbm.md index 0aad04dc4..ddddb872e 100644 --- a/snippets/sdbm.md +++ b/snippets/sdbm.md @@ -1,6 +1,8 @@ --- title: sdbm tags: math,intermediate +firstSeen: 2017-12-27T17:12:34+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Hashes the input string into a whole number. diff --git a/snippets/selectionSort.md b/snippets/selectionSort.md index 3fcd2d0ce..b8fc8b13c 100644 --- a/snippets/selectionSort.md +++ b/snippets/selectionSort.md @@ -1,6 +1,8 @@ --- title: selectionSort tags: algorithm,array,intermediate +firstSeen: 2020-12-27T22:22:44+02:00 +lastUpdated: 2020-12-29T13:04:24+02:00 --- Sorts an array of numbers, using the selection sort algorithm. diff --git a/snippets/serializeCookie.md b/snippets/serializeCookie.md index 436f256a6..e5fdfc7e0 100644 --- a/snippets/serializeCookie.md +++ b/snippets/serializeCookie.md @@ -1,6 +1,8 @@ --- title: serializeCookie tags: browser,string,intermediate +firstSeen: 2018-01-13T14:19:21+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Serializes a cookie name-value pair into a Set-Cookie header string. diff --git a/snippets/serializeForm.md b/snippets/serializeForm.md index 4c25e37af..f7921b5e2 100644 --- a/snippets/serializeForm.md +++ b/snippets/serializeForm.md @@ -1,6 +1,8 @@ --- title: serializeForm tags: browser,string,intermediate +firstSeen: 2019-03-13T14:29:45+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Encodes a set of form elements as a query string. diff --git a/snippets/setStyle.md b/snippets/setStyle.md index 6c4c89548..13a152b08 100644 --- a/snippets/setStyle.md +++ b/snippets/setStyle.md @@ -1,6 +1,8 @@ --- title: setStyle tags: browser,beginner +firstSeen: 2017-12-29T00:08:17+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Sets the value of a CSS rule for the specified HTML element. diff --git a/snippets/shallowClone.md b/snippets/shallowClone.md index d3601bc12..532a09d94 100644 --- a/snippets/shallowClone.md +++ b/snippets/shallowClone.md @@ -1,6 +1,8 @@ --- title: shallowClone tags: object,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Creates a shallow clone of an object. diff --git a/snippets/shank.md b/snippets/shank.md index 55e58a343..4485f63fe 100644 --- a/snippets/shank.md +++ b/snippets/shank.md @@ -1,6 +1,8 @@ --- title: shank tags: array,intermediate +firstSeen: 2018-09-27T01:55:30+03:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Has the same functionality as [`Array.prototype.splice()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice), but returning a new array instead of mutating the original array. diff --git a/snippets/show.md b/snippets/show.md index f4c06308e..813c17a85 100644 --- a/snippets/show.md +++ b/snippets/show.md @@ -1,6 +1,8 @@ --- title: show tags: browser,css,beginner +firstSeen: 2017-12-28T23:33:21+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Shows all the elements specified. diff --git a/snippets/shuffle.md b/snippets/shuffle.md index 229b2b6b0..0fb0b7d51 100644 --- a/snippets/shuffle.md +++ b/snippets/shuffle.md @@ -1,6 +1,8 @@ --- title: shuffle tags: array,random,algorithm,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2021-02-20T21:17:38+02:00 --- Randomizes the order of the values of an array, returning a new array. diff --git a/snippets/similarity.md b/snippets/similarity.md index 5319ffad7..97eb8d147 100644 --- a/snippets/similarity.md +++ b/snippets/similarity.md @@ -1,6 +1,8 @@ --- title: similarity tags: array,math,beginner +firstSeen: 2017-12-17T16:41:31+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Returns an array of elements that appear in both arrays. diff --git a/snippets/size.md b/snippets/size.md index 4972a8351..4f9db344b 100644 --- a/snippets/size.md +++ b/snippets/size.md @@ -1,6 +1,8 @@ --- title: size tags: object,array,string,intermediate +firstSeen: 2017-12-30T16:46:01+02:00 +lastUpdated: 2020-10-21T21:17:45+03:00 --- Gets the size of an array, object or string. diff --git a/snippets/sleep.md b/snippets/sleep.md index 3f258dbe2..30dea957d 100644 --- a/snippets/sleep.md +++ b/snippets/sleep.md @@ -1,6 +1,8 @@ --- title: sleep tags: function,promise,intermediate +firstSeen: 2017-12-13T22:40:56+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Delays the execution of an asynchronous function. diff --git a/snippets/slugify.md b/snippets/slugify.md index 75b6962d2..3d55a0acf 100644 --- a/snippets/slugify.md +++ b/snippets/slugify.md @@ -1,6 +1,8 @@ --- title: slugify tags: string,regexp,intermediate +firstSeen: 2020-10-04T09:45:43+03:00 +lastUpdated: 2020-10-04T10:36:38+03:00 --- Converts a string to a URL-friendly slug. diff --git a/snippets/smoothScroll.md b/snippets/smoothScroll.md index 12e73cf69..d0bb1b8ba 100644 --- a/snippets/smoothScroll.md +++ b/snippets/smoothScroll.md @@ -1,6 +1,8 @@ --- title: smoothScroll tags: browser,css,intermediate +firstSeen: 2018-03-02T18:22:51+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Smoothly scrolls the element on which it's called into the visible area of the browser window. diff --git a/snippets/sortCharactersInString.md b/snippets/sortCharactersInString.md index 2cb9c7cae..47fed629c 100644 --- a/snippets/sortCharactersInString.md +++ b/snippets/sortCharactersInString.md @@ -1,6 +1,8 @@ --- title: sortCharactersInString tags: string,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Alphabetically sorts the characters in a string. diff --git a/snippets/sortedIndex.md b/snippets/sortedIndex.md index df7a53074..414f6e6cb 100644 --- a/snippets/sortedIndex.md +++ b/snippets/sortedIndex.md @@ -1,6 +1,8 @@ --- title: sortedIndex tags: array,math,intermediate +firstSeen: 2017-12-31T16:39:06+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Finds the lowest index at which a value should be inserted into an array in order to maintain its sorting order. diff --git a/snippets/sortedIndexBy.md b/snippets/sortedIndexBy.md index 69628337f..767a58150 100644 --- a/snippets/sortedIndexBy.md +++ b/snippets/sortedIndexBy.md @@ -1,6 +1,8 @@ --- title: sortedIndexBy tags: array,math,intermediate +firstSeen: 2018-01-26T13:39:09+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Finds the lowest index at which a value should be inserted into an array in order to maintain its sorting order, based on the provided iterator function. diff --git a/snippets/sortedLastIndex.md b/snippets/sortedLastIndex.md index eb430a904..fce3adc7a 100644 --- a/snippets/sortedLastIndex.md +++ b/snippets/sortedLastIndex.md @@ -1,6 +1,8 @@ --- title: sortedLastIndex tags: array,intermediate +firstSeen: 2018-01-24T13:16:47+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Finds the highest index at which a value should be inserted into an array in order to maintain its sort order. diff --git a/snippets/sortedLastIndexBy.md b/snippets/sortedLastIndexBy.md index e9eca0a47..c7642112e 100644 --- a/snippets/sortedLastIndexBy.md +++ b/snippets/sortedLastIndexBy.md @@ -1,6 +1,8 @@ --- title: sortedLastIndexBy tags: array,intermediate +firstSeen: 2018-01-26T13:39:09+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Finds the highest index at which a value should be inserted into an array in order to maintain its sort order, based on a provided iterator function. diff --git a/snippets/splitLines.md b/snippets/splitLines.md index 3d3f9dab2..6c22ae763 100644 --- a/snippets/splitLines.md +++ b/snippets/splitLines.md @@ -1,6 +1,8 @@ --- title: splitLines tags: string,regexp,beginner +firstSeen: 2017-12-29T12:58:58+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Splits a multiline string into an array of lines. diff --git a/snippets/spreadOver.md b/snippets/spreadOver.md index fec5ceb46..6a210d93f 100644 --- a/snippets/spreadOver.md +++ b/snippets/spreadOver.md @@ -1,6 +1,8 @@ --- title: spreadOver tags: function,intermediate +firstSeen: 2017-12-22T04:33:57+02:00 +lastUpdated: 2021-06-13T13:50:25+03:00 --- Takes a variadic function and returns a function that accepts an array of arguments. diff --git a/snippets/stableSort.md b/snippets/stableSort.md index 8902da850..74f5d097c 100644 --- a/snippets/stableSort.md +++ b/snippets/stableSort.md @@ -1,6 +1,8 @@ --- title: stableSort tags: array,advanced +firstSeen: 2018-02-06T18:33:49+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Performs stable sorting of an array, preserving the initial indexes of items when their values are the same. diff --git a/snippets/standardDeviation.md b/snippets/standardDeviation.md index f7520d171..383f8d2cf 100644 --- a/snippets/standardDeviation.md +++ b/snippets/standardDeviation.md @@ -1,6 +1,8 @@ --- title: standardDeviation tags: math,array,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Calculates the standard deviation of an array of numbers. diff --git a/snippets/stringPermutations.md b/snippets/stringPermutations.md index f34d40910..c0abf9ef1 100644 --- a/snippets/stringPermutations.md +++ b/snippets/stringPermutations.md @@ -1,6 +1,8 @@ --- title: stringPermutations tags: string,recursion,advanced +firstSeen: 2018-02-19T15:47:47+02:00 +lastUpdated: 2020-11-15T17:13:42+02:00 --- Generates all permutations of a string (contains duplicates). diff --git a/snippets/stringifyCircularJSON.md b/snippets/stringifyCircularJSON.md index 19bc393bc..d3406922f 100644 --- a/snippets/stringifyCircularJSON.md +++ b/snippets/stringifyCircularJSON.md @@ -1,6 +1,8 @@ --- title: stringifyCircularJSON tags: object,advanced +firstSeen: 2020-10-06T12:32:28+03:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Serializes a JSON object containing circular references into a JSON format. diff --git a/snippets/stripHTMLTags.md b/snippets/stripHTMLTags.md index 8e0e4484f..f668cf41e 100644 --- a/snippets/stripHTMLTags.md +++ b/snippets/stripHTMLTags.md @@ -1,6 +1,8 @@ --- title: stripHTMLTags tags: string,regexp,beginner +firstSeen: 2018-01-26T14:17:29+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Removes HTML/XML tags from string. diff --git a/snippets/subSet.md b/snippets/subSet.md index 6ff1d6041..59581bcb6 100644 --- a/snippets/subSet.md +++ b/snippets/subSet.md @@ -1,6 +1,8 @@ --- title: subSet tags: array,intermediate +firstSeen: 2020-10-11T11:53:08+03:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Checks if the first iterable is a subset of the second one, excluding duplicate values. diff --git a/snippets/sum.md b/snippets/sum.md index f8126150f..837300f20 100644 --- a/snippets/sum.md +++ b/snippets/sum.md @@ -1,6 +1,8 @@ --- title: sum tags: math,array,beginner +firstSeen: 2017-12-29T13:29:49+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Calculates the sum of two or more numbers/arrays. diff --git a/snippets/sumBy.md b/snippets/sumBy.md index d30447dbe..b8446b8ba 100644 --- a/snippets/sumBy.md +++ b/snippets/sumBy.md @@ -1,6 +1,8 @@ --- title: sumBy tags: math,array,intermediate +firstSeen: 2018-01-11T12:25:54+02:00 +lastUpdated: 2020-11-03T22:11:18+02:00 --- Calculates the sum of an array, after mapping each element to a value using the provided function. diff --git a/snippets/sumN.md b/snippets/sumN.md index 840ae35c7..1ebd427e9 100644 --- a/snippets/sumN.md +++ b/snippets/sumN.md @@ -1,6 +1,8 @@ --- title: sumN tags: math,beginner +firstSeen: 2020-10-08T16:52:55+03:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Sums all the numbers between `1` and `n`. diff --git a/snippets/sumPower.md b/snippets/sumPower.md index 37c991351..b6c591397 100644 --- a/snippets/sumPower.md +++ b/snippets/sumPower.md @@ -1,6 +1,8 @@ --- title: sumPower tags: math,intermediate +firstSeen: 2018-01-01T15:49:25+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Calculates the sum of the powers of all the numbers from `start` to `end` (both inclusive). diff --git a/snippets/superSet.md b/snippets/superSet.md index cc6d1a356..19ac0088f 100644 --- a/snippets/superSet.md +++ b/snippets/superSet.md @@ -1,6 +1,8 @@ --- title: superSet tags: array,intermediate +firstSeen: 2020-10-11T11:53:19+03:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Checks if the first iterable is a superset of the second one, excluding duplicate values. diff --git a/snippets/supportsTouchEvents.md b/snippets/supportsTouchEvents.md index c92f4c576..2a5b6c25c 100644 --- a/snippets/supportsTouchEvents.md +++ b/snippets/supportsTouchEvents.md @@ -1,6 +1,8 @@ --- title: supportsTouchEvents tags: browser,beginner +firstSeen: 2020-05-04T12:57:23+03:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Checks if touch events are supported. diff --git a/snippets/swapCase.md b/snippets/swapCase.md index 21985c0b9..990e8ade8 100644 --- a/snippets/swapCase.md +++ b/snippets/swapCase.md @@ -1,6 +1,8 @@ --- title: swapCase tags: string,beginner +firstSeen: 2020-11-15T13:09:03+02:00 +lastUpdated: 2020-11-15T13:09:03+02:00 --- Creates a string with uppercase characters converted to lowercase and vice versa. diff --git a/snippets/symmetricDifference.md b/snippets/symmetricDifference.md index f2b006a47..eaf39cf29 100644 --- a/snippets/symmetricDifference.md +++ b/snippets/symmetricDifference.md @@ -1,6 +1,8 @@ --- title: symmetricDifference tags: array,math,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Returns the symmetric difference between two arrays, without filtering out duplicate values. diff --git a/snippets/symmetricDifferenceBy.md b/snippets/symmetricDifferenceBy.md index 1139c65b1..f5b0c7181 100644 --- a/snippets/symmetricDifferenceBy.md +++ b/snippets/symmetricDifferenceBy.md @@ -1,6 +1,8 @@ --- title: symmetricDifferenceBy tags: array,intermediate +firstSeen: 2018-01-24T11:59:02+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Returns the symmetric difference between two arrays, after applying the provided function to each array element of both. diff --git a/snippets/symmetricDifferenceWith.md b/snippets/symmetricDifferenceWith.md index d4285b87e..5acf50477 100644 --- a/snippets/symmetricDifferenceWith.md +++ b/snippets/symmetricDifferenceWith.md @@ -1,6 +1,8 @@ --- title: symmetricDifferenceWith tags: array,intermediate +firstSeen: 2018-01-24T11:59:02+02:00 +lastUpdated: 2020-10-18T14:58:09+03:00 --- Returns the symmetric difference between two arrays, using a provided function as a comparator. diff --git a/snippets/tail.md b/snippets/tail.md index f7354dff7..18692038b 100644 --- a/snippets/tail.md +++ b/snippets/tail.md @@ -1,6 +1,8 @@ --- title: tail tags: array,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Returns all elements in an array except for the first one. diff --git a/snippets/take.md b/snippets/take.md index 7bae3f4c6..0087c3631 100644 --- a/snippets/take.md +++ b/snippets/take.md @@ -1,6 +1,8 @@ --- title: take tags: array,beginner +firstSeen: 2017-12-14T11:35:14+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Creates an array with `n` elements removed from the beginning. diff --git a/snippets/takeRight.md b/snippets/takeRight.md index 3b176b2f5..ea8fac8ba 100644 --- a/snippets/takeRight.md +++ b/snippets/takeRight.md @@ -1,6 +1,8 @@ --- title: takeRight tags: array,intermediate +firstSeen: 2017-12-15T02:00:10+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Creates an array with `n` elements removed from the end. diff --git a/snippets/takeRightUntil.md b/snippets/takeRightUntil.md index fd27a35a4..388e83af9 100644 --- a/snippets/takeRightUntil.md +++ b/snippets/takeRightUntil.md @@ -1,6 +1,8 @@ --- title: takeRightUntil tags: array,intermediate +firstSeen: 2020-11-29T12:04:53+02:00 +lastUpdated: 2020-11-29T12:04:53+02:00 --- Removes elements from the end of an array until the passed function returns `true`. diff --git a/snippets/takeRightWhile.md b/snippets/takeRightWhile.md index 03ff8c342..9539f867c 100644 --- a/snippets/takeRightWhile.md +++ b/snippets/takeRightWhile.md @@ -1,6 +1,8 @@ --- title: takeRightWhile tags: array,intermediate +firstSeen: 2018-01-26T12:55:31+02:00 +lastUpdated: 2020-11-29T12:04:53+02:00 --- Removes elements from the end of an array until the passed function returns `false`. diff --git a/snippets/takeUntil.md b/snippets/takeUntil.md index 093eda2f1..553528425 100644 --- a/snippets/takeUntil.md +++ b/snippets/takeUntil.md @@ -1,6 +1,8 @@ --- title: takeUntil tags: array,intermediate +firstSeen: 2020-11-29T12:04:53+02:00 +lastUpdated: 2020-11-29T12:04:53+02:00 --- Removes elements in an array until the passed function returns `true`. diff --git a/snippets/takeWhile.md b/snippets/takeWhile.md index 8aea24ae7..4a551f381 100644 --- a/snippets/takeWhile.md +++ b/snippets/takeWhile.md @@ -1,6 +1,8 @@ --- title: takeWhile tags: array,intermediate +firstSeen: 2018-01-26T12:55:31+02:00 +lastUpdated: 2020-11-29T12:04:53+02:00 --- Removes elements in an array until the passed function returns `false`. diff --git a/snippets/throttle.md b/snippets/throttle.md index 10744d67f..657baafe8 100644 --- a/snippets/throttle.md +++ b/snippets/throttle.md @@ -1,6 +1,8 @@ --- title: throttle tags: function,advanced +firstSeen: 2018-01-28T15:23:01+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Creates a throttled function that only invokes the provided function at most once per every `wait` milliseconds diff --git a/snippets/timeTaken.md b/snippets/timeTaken.md index 65bb70233..d6ad997d8 100644 --- a/snippets/timeTaken.md +++ b/snippets/timeTaken.md @@ -1,6 +1,8 @@ --- title: timeTaken tags: function,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Measures the time it takes for a function to execute. diff --git a/snippets/times.md b/snippets/times.md index 72d201f3b..fabb6415b 100644 --- a/snippets/times.md +++ b/snippets/times.md @@ -1,6 +1,8 @@ --- title: times tags: function,intermediate +firstSeen: 2018-01-24T13:50:49+02:00 +lastUpdated: 2020-10-20T11:21:07+03:00 --- Iterates over a callback `n` times diff --git a/snippets/toCamelCase.md b/snippets/toCamelCase.md index 31271f604..0f6714d42 100644 --- a/snippets/toCamelCase.md +++ b/snippets/toCamelCase.md @@ -1,6 +1,8 @@ --- title: toCamelCase tags: string,regexp,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Converts a string to camelcase. diff --git a/snippets/toCharArray.md b/snippets/toCharArray.md index e91956010..433a0695b 100644 --- a/snippets/toCharArray.md +++ b/snippets/toCharArray.md @@ -1,6 +1,8 @@ --- title: toCharArray tags: string,beginner +firstSeen: 2020-10-08T15:17:22+03:00 +lastUpdated: 2020-10-08T15:17:22+03:00 --- Converts a string to an array of characters. diff --git a/snippets/toCurrency.md b/snippets/toCurrency.md index dc05363bd..8c47249c4 100644 --- a/snippets/toCurrency.md +++ b/snippets/toCurrency.md @@ -1,6 +1,8 @@ --- title: toCurrency tags: math,string,intermediate +firstSeen: 2018-01-27T17:15:48+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Takes a number and returns it in the specified currency formatting. diff --git a/snippets/toDecimalMark.md b/snippets/toDecimalMark.md index 7eff8d385..2a5e82c81 100644 --- a/snippets/toDecimalMark.md +++ b/snippets/toDecimalMark.md @@ -1,6 +1,8 @@ --- title: toDecimalMark tags: math,beginner +firstSeen: 2017-12-21T16:29:51+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Converts a number to a decimal mark formatted string. diff --git a/snippets/toHSLArray.md b/snippets/toHSLArray.md index a4e34d3d0..035d23872 100644 --- a/snippets/toHSLArray.md +++ b/snippets/toHSLArray.md @@ -1,6 +1,8 @@ --- title: toHSLArray tags: string,browser,regexp,beginner +firstSeen: 2020-10-16T21:46:29+03:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Converts an `hsl()` color string to an array of values. diff --git a/snippets/toHSLObject.md b/snippets/toHSLObject.md index b018e4112..d267b766e 100644 --- a/snippets/toHSLObject.md +++ b/snippets/toHSLObject.md @@ -1,6 +1,8 @@ --- title: toHSLObject tags: string,browser,regexp,intermediate +firstSeen: 2020-10-16T21:48:31+03:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Converts an `hsl()` color string to an object with the values of each color. diff --git a/snippets/toHash.md b/snippets/toHash.md index a4aa7e953..18c2e7b4a 100644 --- a/snippets/toHash.md +++ b/snippets/toHash.md @@ -1,6 +1,8 @@ --- title: toHash tags: array,intermediate +firstSeen: 2018-05-31T02:14:04+03:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Reduces a given array-like into a value hash (keyed data store). diff --git a/snippets/toISOStringWithTimezone.md b/snippets/toISOStringWithTimezone.md index 67cc1a3ff..2f221ee5a 100644 --- a/snippets/toISOStringWithTimezone.md +++ b/snippets/toISOStringWithTimezone.md @@ -1,6 +1,8 @@ --- title: toISOStringWithTimezone tags: date,intermediate +firstSeen: 2020-10-07T09:25:05+03:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Converts a date to extended ISO format (ISO 8601), including timezone offset. diff --git a/snippets/toKebabCase.md b/snippets/toKebabCase.md index d23e36831..7b7b60fb8 100644 --- a/snippets/toKebabCase.md +++ b/snippets/toKebabCase.md @@ -1,6 +1,8 @@ --- title: toKebabCase tags: string,regexp,intermediate +firstSeen: 2017-12-22T19:14:51+02:00 +lastUpdated: 2020-12-16T13:42:27+02:00 --- Converts a string to kebab case. diff --git a/snippets/toOrdinalSuffix.md b/snippets/toOrdinalSuffix.md index 553b74f51..a443c0e06 100644 --- a/snippets/toOrdinalSuffix.md +++ b/snippets/toOrdinalSuffix.md @@ -1,6 +1,8 @@ --- title: toOrdinalSuffix tags: math,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-11-13T19:49:57+02:00 --- Takes a number and returns it as a string with the correct ordinal indicator suffix. diff --git a/snippets/toPairs.md b/snippets/toPairs.md index eabd08a60..2b7266b93 100644 --- a/snippets/toPairs.md +++ b/snippets/toPairs.md @@ -1,6 +1,8 @@ --- title: toPairs tags: object,array,intermediate +firstSeen: 2020-03-23T15:07:23+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Creates an array of key-value pair arrays from an object or other iterable. diff --git a/snippets/toRGBArray.md b/snippets/toRGBArray.md index e55bb0e81..e4bfaa341 100644 --- a/snippets/toRGBArray.md +++ b/snippets/toRGBArray.md @@ -1,6 +1,8 @@ --- title: toRGBArray tags: string,browser,regexp,beginner +firstSeen: 2020-10-14T20:36:18+03:00 +lastUpdated: 2021-06-13T13:50:25+03:00 --- Converts an `rgb()` color string to an array of values. diff --git a/snippets/toRGBObject.md b/snippets/toRGBObject.md index 7d7c6e9a2..785dd4859 100644 --- a/snippets/toRGBObject.md +++ b/snippets/toRGBObject.md @@ -1,6 +1,8 @@ --- title: toRGBObject tags: string,browser,regexp,intermediate +firstSeen: 2020-10-14T21:58:14+03:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Converts an `rgb()` color string to an object with the values of each color. diff --git a/snippets/toRomanNumeral.md b/snippets/toRomanNumeral.md index 7dd652b89..f14837036 100644 --- a/snippets/toRomanNumeral.md +++ b/snippets/toRomanNumeral.md @@ -1,6 +1,8 @@ --- title: toRomanNumeral tags: math,string,intermediate +firstSeen: 2020-10-06T19:56:22+03:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Converts an integer to its roman numeral representation. diff --git a/snippets/toSafeInteger.md b/snippets/toSafeInteger.md index 58a6c58a2..50462dbab 100644 --- a/snippets/toSafeInteger.md +++ b/snippets/toSafeInteger.md @@ -1,6 +1,8 @@ --- title: toSafeInteger tags: math,beginner +firstSeen: 2018-01-08T17:12:46+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Converts a value to a safe integer. diff --git a/snippets/toSnakeCase.md b/snippets/toSnakeCase.md index 3873c543c..2c700c97f 100644 --- a/snippets/toSnakeCase.md +++ b/snippets/toSnakeCase.md @@ -1,6 +1,8 @@ --- title: toSnakeCase tags: string,regexp,intermediate +firstSeen: 2017-12-22T18:13:22+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Converts a string to snake case. diff --git a/snippets/toTitleCase.md b/snippets/toTitleCase.md index 10b14992e..2147c34c5 100644 --- a/snippets/toTitleCase.md +++ b/snippets/toTitleCase.md @@ -1,6 +1,8 @@ --- title: toTitleCase tags: string,regexp,intermediate +firstSeen: 2018-10-19T04:49:34+03:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Converts a string to title case. diff --git a/snippets/toggleClass.md b/snippets/toggleClass.md index 495501945..2eb4f5c07 100644 --- a/snippets/toggleClass.md +++ b/snippets/toggleClass.md @@ -1,6 +1,8 @@ --- title: toggleClass tags: browser,beginner +firstSeen: 2017-12-28T23:46:33+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Toggles a class for an HTML element. diff --git a/snippets/tomorrow.md b/snippets/tomorrow.md index adac45b7a..8ceed206e 100644 --- a/snippets/tomorrow.md +++ b/snippets/tomorrow.md @@ -1,6 +1,8 @@ --- title: tomorrow tags: date,intermediate +firstSeen: 2017-12-26T18:56:24+02:00 +lastUpdated: 2020-10-22T20:24:30+03:00 --- Results in a string representation of tomorrow's date. diff --git a/snippets/transform.md b/snippets/transform.md index e3f0285c5..38fcd3ed5 100644 --- a/snippets/transform.md +++ b/snippets/transform.md @@ -1,6 +1,8 @@ --- title: transform tags: object,intermediate +firstSeen: 2018-01-12T13:55:49+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Applies a function against an accumulator and each key in the object (from left to right). diff --git a/snippets/triggerEvent.md b/snippets/triggerEvent.md index c94c33c78..4f6a92d8a 100644 --- a/snippets/triggerEvent.md +++ b/snippets/triggerEvent.md @@ -1,6 +1,8 @@ --- title: triggerEvent tags: browser,event,intermediate +firstSeen: 2018-06-19T20:57:58+03:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Triggers a specific event on a given element, optionally passing custom data. diff --git a/snippets/truncateString.md b/snippets/truncateString.md index d1f4692af..a91051c72 100644 --- a/snippets/truncateString.md +++ b/snippets/truncateString.md @@ -1,6 +1,8 @@ --- title: truncateString tags: string,beginner +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-21T21:17:45+03:00 --- Truncates a string up to a specified length. diff --git a/snippets/truncateStringAtWhitespace.md b/snippets/truncateStringAtWhitespace.md index e7a59bbbf..46865a6b7 100644 --- a/snippets/truncateStringAtWhitespace.md +++ b/snippets/truncateStringAtWhitespace.md @@ -1,6 +1,8 @@ --- title: truncateStringAtWhitespace tags: string,intermediate +firstSeen: 2020-10-19T11:11:16+03:00 +lastUpdated: 2020-10-21T21:17:45+03:00 --- Truncates a string up to specified length, respecting whitespace when possible. diff --git a/snippets/truthCheckCollection.md b/snippets/truthCheckCollection.md index 4b313f0ef..43a84b540 100644 --- a/snippets/truthCheckCollection.md +++ b/snippets/truthCheckCollection.md @@ -1,6 +1,8 @@ --- title: truthCheckCollection tags: object,logic,array,intermediate +firstSeen: 2017-12-18T13:05:21+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Checks if the predicate function is truthy for all elements of a collection. diff --git a/snippets/unary.md b/snippets/unary.md index 5dc1496b7..012d2106c 100644 --- a/snippets/unary.md +++ b/snippets/unary.md @@ -1,6 +1,8 @@ --- title: unary tags: function,beginner +firstSeen: 2018-01-24T13:22:32+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Creates a function that accepts up to one argument, ignoring any additional arguments. diff --git a/snippets/uncurry.md b/snippets/uncurry.md index f32c00c0b..c61660bdc 100644 --- a/snippets/uncurry.md +++ b/snippets/uncurry.md @@ -1,6 +1,8 @@ --- title: uncurry tags: function,advanced +firstSeen: 2018-02-14T11:56:44+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Uncurries a function up to depth `n`. diff --git a/snippets/unescapeHTML.md b/snippets/unescapeHTML.md index 780f4585a..873b84e71 100644 --- a/snippets/unescapeHTML.md +++ b/snippets/unescapeHTML.md @@ -1,6 +1,8 @@ --- title: unescapeHTML tags: string,browser,regexp,beginner +firstSeen: 2017-12-29T15:09:10+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Unescapes escaped HTML characters. diff --git a/snippets/unflattenObject.md b/snippets/unflattenObject.md index 9a9cb7078..f7efa6d04 100644 --- a/snippets/unflattenObject.md +++ b/snippets/unflattenObject.md @@ -1,6 +1,8 @@ --- title: unflattenObject tags: object,advanced +firstSeen: 2018-02-07T11:30:18+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Unflatten an object with the paths for keys. diff --git a/snippets/unfold.md b/snippets/unfold.md index ad3c1a4ed..0c6a513a7 100644 --- a/snippets/unfold.md +++ b/snippets/unfold.md @@ -1,6 +1,8 @@ --- title: unfold tags: function,array,intermediate +firstSeen: 2018-01-24T16:22:14+02:00 +lastUpdated: 2020-09-15T16:28:04+03:00 --- Builds an array, using an iterator function and an initial seed value. diff --git a/snippets/union.md b/snippets/union.md index d99f298d3..315cb2221 100644 --- a/snippets/union.md +++ b/snippets/union.md @@ -1,6 +1,8 @@ --- title: union tags: array,beginner +firstSeen: 2017-12-17T16:41:31+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Returns every element that exists in any of the two arrays at least once. diff --git a/snippets/unionBy.md b/snippets/unionBy.md index 510e8cc86..9d10bca36 100644 --- a/snippets/unionBy.md +++ b/snippets/unionBy.md @@ -1,6 +1,8 @@ --- title: unionBy tags: array,intermediate +firstSeen: 2018-01-24T12:19:41+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Returns every element that exists in any of the two arrays at least once, after applying the provided function to each array element of both. diff --git a/snippets/unionWith.md b/snippets/unionWith.md index bcc2ee1e4..8d1ffd011 100644 --- a/snippets/unionWith.md +++ b/snippets/unionWith.md @@ -1,6 +1,8 @@ --- title: unionWith tags: array,intermediate +firstSeen: 2018-01-24T12:19:41+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Returns every element that exists in any of the two arrays at least once, using a provided comparator function. diff --git a/snippets/uniqueElements.md b/snippets/uniqueElements.md index 4a1e99494..227d3adfc 100644 --- a/snippets/uniqueElements.md +++ b/snippets/uniqueElements.md @@ -1,6 +1,8 @@ --- title: uniqueElements tags: array,beginner +firstSeen: 2018-01-17T19:02:49+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Finds all unique values in an array. diff --git a/snippets/uniqueElementsBy.md b/snippets/uniqueElementsBy.md index bb4bcef61..85861735a 100644 --- a/snippets/uniqueElementsBy.md +++ b/snippets/uniqueElementsBy.md @@ -1,6 +1,8 @@ --- title: uniqueElementsBy tags: array,intermediate +firstSeen: 2018-07-18T20:49:07+03:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Finds all unique values of an array, based on a provided comparator function. diff --git a/snippets/uniqueElementsByRight.md b/snippets/uniqueElementsByRight.md index 6066e0c27..53299479b 100644 --- a/snippets/uniqueElementsByRight.md +++ b/snippets/uniqueElementsByRight.md @@ -1,6 +1,8 @@ --- title: uniqueElementsByRight tags: array,intermediate +firstSeen: 2018-07-18T20:49:07+03:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Finds all unique values of an array, based on a provided comparator function, starting from the right. diff --git a/snippets/uniqueSymmetricDifference.md b/snippets/uniqueSymmetricDifference.md index 8226e7ec9..abdad44bf 100644 --- a/snippets/uniqueSymmetricDifference.md +++ b/snippets/uniqueSymmetricDifference.md @@ -1,6 +1,8 @@ --- title: uniqueSymmetricDifference tags: array,math,intermediate +firstSeen: 2018-08-17T08:37:08+03:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Returns the unique symmetric difference between two arrays, not containing duplicate values from either array. diff --git a/snippets/untildify.md b/snippets/untildify.md index 394e2cf48..86879d038 100644 --- a/snippets/untildify.md +++ b/snippets/untildify.md @@ -1,6 +1,8 @@ --- title: untildify tags: node,string,beginner +firstSeen: 2018-01-01T17:43:18+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Converts a tilde path to an absolute path. diff --git a/snippets/unzip.md b/snippets/unzip.md index eafef6e1b..db7e93819 100644 --- a/snippets/unzip.md +++ b/snippets/unzip.md @@ -1,6 +1,8 @@ --- title: unzip tags: array,intermediate +firstSeen: 2018-01-24T12:35:25+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Creates an array of arrays, ungrouping the elements in an array produced by [zip](/js/s/zip). diff --git a/snippets/unzipWith.md b/snippets/unzipWith.md index 06e0c922e..677c5b8da 100644 --- a/snippets/unzipWith.md +++ b/snippets/unzipWith.md @@ -1,6 +1,8 @@ --- title: unzipWith tags: array,advanced +firstSeen: 2018-01-24T12:44:16+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Creates an array of elements, ungrouping the elements in an array produced by [zip](/js/s/zip) and applying the provided function. diff --git a/snippets/validateNumber.md b/snippets/validateNumber.md index fd5b42d1b..bbeb6201d 100644 --- a/snippets/validateNumber.md +++ b/snippets/validateNumber.md @@ -1,6 +1,8 @@ --- title: validateNumber tags: math,intermediate +firstSeen: 2017-12-17T17:55:51+02:00 +lastUpdated: 2020-10-22T20:23:26+03:00 --- Checks if the given value is a number. diff --git a/snippets/vectorAngle.md b/snippets/vectorAngle.md index 727b597ae..9136f0127 100644 --- a/snippets/vectorAngle.md +++ b/snippets/vectorAngle.md @@ -1,6 +1,8 @@ --- title: vectorAngle tags: math,beginner +firstSeen: 2019-12-16T16:43:13+02:00 +lastUpdated: 2021-01-08T00:23:44+02:00 --- Calculates the angle (theta) between two vectors. diff --git a/snippets/vectorDistance.md b/snippets/vectorDistance.md index 8daf94d6f..8d237cb3b 100644 --- a/snippets/vectorDistance.md +++ b/snippets/vectorDistance.md @@ -1,6 +1,8 @@ --- title: vectorDistance tags: math,algorithm,beginner +firstSeen: 2019-02-23T19:13:48+02:00 +lastUpdated: 2020-12-28T13:49:24+02:00 --- Calculates the distance between two vectors. diff --git a/snippets/walkThrough.md b/snippets/walkThrough.md index 9e2d13347..a2ac53975 100644 --- a/snippets/walkThrough.md +++ b/snippets/walkThrough.md @@ -1,6 +1,8 @@ --- title: walkThrough tags: object,recursion,generator,advanced +firstSeen: 2020-12-31T13:03:15+02:00 +lastUpdated: 2020-12-31T13:03:15+02:00 --- Creates a generator, that walks through all the keys of a given object. diff --git a/snippets/weightedAverage.md b/snippets/weightedAverage.md index 1a5e1c22d..92e384626 100644 --- a/snippets/weightedAverage.md +++ b/snippets/weightedAverage.md @@ -1,6 +1,8 @@ --- title: weightedAverage tags: math,intermediate +firstSeen: 2020-10-04T00:38:33+03:00 +lastUpdated: 2020-11-03T21:46:13+02:00 --- Calculates the weighted average of two or more numbers. diff --git a/snippets/weightedSample.md b/snippets/weightedSample.md index 1c2f2436e..d4e9fabd6 100644 --- a/snippets/weightedSample.md +++ b/snippets/weightedSample.md @@ -1,6 +1,8 @@ --- title: weightedSample tags: array,random,advanced +firstSeen: 2019-12-31T11:34:26+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Gets a random element from an array, using the provided `weights` as the probabilities for each element. diff --git a/snippets/when.md b/snippets/when.md index 9f4b5e60b..25f0e4bfe 100644 --- a/snippets/when.md +++ b/snippets/when.md @@ -1,6 +1,8 @@ --- title: when tags: function,logic,beginner +firstSeen: 2018-04-19T03:45:32+03:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Returns a function that takes one argument and runs a callback if it's truthy or returns it if falsy. diff --git a/snippets/without.md b/snippets/without.md index 3894f4c5f..de2b62761 100644 --- a/snippets/without.md +++ b/snippets/without.md @@ -1,6 +1,8 @@ --- title: without tags: array,beginner +firstSeen: 2017-12-15T09:35:30+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Filters out the elements of an array that have one of the specified values. diff --git a/snippets/wordWrap.md b/snippets/wordWrap.md index 93b23f946..d9126c26c 100644 --- a/snippets/wordWrap.md +++ b/snippets/wordWrap.md @@ -1,6 +1,8 @@ --- title: wordWrap tags: string,regexp,intermediate +firstSeen: 2020-10-06T11:48:41+03:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Wraps a string to a given number of characters using a string break character. diff --git a/snippets/words.md b/snippets/words.md index bec8e94c6..044ef760b 100644 --- a/snippets/words.md +++ b/snippets/words.md @@ -1,6 +1,8 @@ --- title: words tags: string,regexp,intermediate +firstSeen: 2017-12-21T14:50:57+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Converts a given string into an array of words. diff --git a/snippets/xProd.md b/snippets/xProd.md index 437a03696..6ff1cf7a2 100644 --- a/snippets/xProd.md +++ b/snippets/xProd.md @@ -1,6 +1,8 @@ --- title: xProd tags: array,math,intermediate +firstSeen: 2018-01-24T15:55:03+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Creates a new array out of the two supplied by creating each possible pair from the arrays. diff --git a/snippets/xor.md b/snippets/xor.md index 4e26925bb..736731015 100644 --- a/snippets/xor.md +++ b/snippets/xor.md @@ -2,6 +2,8 @@ title: xor tags: math,logic,beginner unlisted: true +firstSeen: 2020-10-05T21:19:21+03:00 +lastUpdated: 2021-01-04T13:04:15+02:00 --- Checks if only one of the arguments is `true`. diff --git a/snippets/yesNo.md b/snippets/yesNo.md index 83b71ecb9..be45dab6b 100644 --- a/snippets/yesNo.md +++ b/snippets/yesNo.md @@ -2,6 +2,8 @@ title: yesNo tags: string,regexp,intermediate unlisted: true +firstSeen: 2017-12-30T18:35:54+02:00 +lastUpdated: 2021-01-04T13:04:15+02:00 --- Returns `true` if the string is `y`/`yes` or `false` if the string is `n`/`no`. diff --git a/snippets/yesterday.md b/snippets/yesterday.md index df91649e8..63df1041e 100644 --- a/snippets/yesterday.md +++ b/snippets/yesterday.md @@ -1,6 +1,8 @@ --- title: yesterday tags: date,intermediate +firstSeen: 2019-07-19T10:57:21+03:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Results in a string representation of yesterday's date. diff --git a/snippets/zip.md b/snippets/zip.md index 549dccf6d..c7f138be6 100644 --- a/snippets/zip.md +++ b/snippets/zip.md @@ -1,6 +1,8 @@ --- title: zip tags: array,intermediate +firstSeen: 2017-12-17T16:41:31+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Creates an array of elements, grouped based on their position in the original arrays. diff --git a/snippets/zipObject.md b/snippets/zipObject.md index ecd231169..780e6a0ad 100644 --- a/snippets/zipObject.md +++ b/snippets/zipObject.md @@ -1,6 +1,8 @@ --- title: zipObject tags: array,object,intermediate +firstSeen: 2017-12-21T00:55:18+02:00 +lastUpdated: 2020-10-22T20:24:44+03:00 --- Associates properties to values, given array of valid property identifiers and an array of values. diff --git a/snippets/zipWith.md b/snippets/zipWith.md index a93168dc6..094fc4944 100644 --- a/snippets/zipWith.md +++ b/snippets/zipWith.md @@ -1,6 +1,8 @@ --- title: zipWith tags: array,advanced +firstSeen: 2018-01-20T17:21:34+02:00 +lastUpdated: 2020-11-03T21:46:13+02:00 --- Creates an array of elements, grouped based on the position in the original arrays and using a function to specify how grouped values should be combined.