diff --git a/snippets/accumulate.md b/snippets/accumulate.md index 6cf46968c..35035db9b 100644 --- a/snippets/accumulate.md +++ b/snippets/accumulate.md @@ -1,10 +1,10 @@ --- title: Partial sum array -tags: math +type: snippet +tags: [math] author: chalarangelo cover: river-house-lights -firstSeen: 2020-05-04T12:20:46+03:00 -lastUpdated: 2022-01-30T13:10:13+02:00 +dateModified: 2022-01-30T13:10:13+02:00 --- Creates an array of partial sums. diff --git a/snippets/add-class.md b/snippets/add-class.md index 6b0ec1234..b96d07caa 100644 --- a/snippets/add-class.md +++ b/snippets/add-class.md @@ -1,10 +1,10 @@ --- title: Add class to HTML element -tags: browser +type: snippet +tags: [browser] author: chalarangelo cover: budapest-palace -firstSeen: 2020-12-30T19:21:15+02:00 -lastUpdated: 2020-12-30T19:21:15+02:00 +dateModified: 2020-12-30T19:21:15+02:00 --- Adds a class to an HTML element. diff --git a/snippets/add-days-to-date.md b/snippets/add-days-to-date.md index 0f5a655d7..156036690 100644 --- a/snippets/add-days-to-date.md +++ b/snippets/add-days-to-date.md @@ -1,9 +1,9 @@ --- title: Add days to date -tags: date +type: snippet +tags: [date] cover: digital-nomad-12 -firstSeen: 2020-10-12T03:03:18+03:00 -lastUpdated: 2020-11-28T19:18:29+02:00 +dateModified: 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/add-event-listener-all.md b/snippets/add-event-listener-all.md index ab85f52fe..26d714a62 100644 --- a/snippets/add-event-listener-all.md +++ b/snippets/add-event-listener-all.md @@ -1,10 +1,10 @@ --- title: Add event listener to all targets -tags: browser,event +type: snippet +tags: [browser,event] author: chalarangelo cover: red-mountain -firstSeen: 2021-04-22T08:53:29+03:00 -lastUpdated: 2021-04-22T08:53:29+03:00 +dateModified: 2021-04-22T08:53:29+03:00 --- Attaches an event listener to all the provided targets. diff --git a/snippets/add-minutes-to-date.md b/snippets/add-minutes-to-date.md index 7189cc8bb..fd323cd94 100644 --- a/snippets/add-minutes-to-date.md +++ b/snippets/add-minutes-to-date.md @@ -1,9 +1,9 @@ --- title: Add minutes to date -tags: date +type: snippet +tags: [date] cover: lake-trees -firstSeen: 2020-11-28T19:27:46+02:00 -lastUpdated: 2020-11-28T19:27:46+02:00 +dateModified: 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/add-multiple-events.md b/snippets/add-multiple-events.md index c60e6d893..5de00a0d4 100644 --- a/snippets/add-multiple-events.md +++ b/snippets/add-multiple-events.md @@ -1,9 +1,9 @@ --- title: Add multiple listeners -tags: browser,event +type: snippet +tags: [browser,event] cover: balloons -firstSeen: 2020-10-08T00:40:30+03:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Adds multiple event listeners with the same handler to an element. diff --git a/snippets/add-styles.md b/snippets/add-styles.md index 560b51355..c6940203e 100644 --- a/snippets/add-styles.md +++ b/snippets/add-styles.md @@ -1,10 +1,10 @@ --- title: Add styles to HTML element -tags: browser +type: snippet +tags: [browser] author: chalarangelo cover: digital-nomad-14 -firstSeen: 2021-01-07T00:37:43+02:00 -lastUpdated: 2021-01-07T00:37:43+02:00 +dateModified: 2021-01-07T00:37:43+02:00 --- Adds the provided styles to the given HTML element. diff --git a/snippets/add-week-days.md b/snippets/add-week-days.md index a6a881923..18f0e02e3 100644 --- a/snippets/add-week-days.md +++ b/snippets/add-week-days.md @@ -1,9 +1,9 @@ --- title: Add weekdays to date -tags: date +type: snippet +tags: [date] cover: digital-nomad-9 -firstSeen: 2020-10-11T16:51:39+03:00 -lastUpdated: 2021-01-08T00:23:44+02:00 +dateModified: 2021-01-08T00:23:44+02:00 --- Calculates the date after adding the given number of business days. diff --git a/snippets/all-equal-by.md b/snippets/all-equal-by.md index 1166afdd7..092c25d23 100644 --- a/snippets/all-equal-by.md +++ b/snippets/all-equal-by.md @@ -1,9 +1,9 @@ --- title: Check if array elements are equal based on function -tags: array +type: snippet +tags: [array] cover: orange-coffee-2 -firstSeen: 2020-10-19T22:14:49+03:00 -lastUpdated: 2020-10-19T22:14:49+03:00 +dateModified: 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/all-equal.md b/snippets/all-equal.md index 8ec8011f8..9867d0455 100644 --- a/snippets/all-equal.md +++ b/snippets/all-equal.md @@ -1,9 +1,9 @@ --- title: Check if array elements are equal -tags: array +type: snippet +tags: [array] cover: shelf-plant -firstSeen: 2018-08-03T00:03:08+03:00 -lastUpdated: 2020-10-18T20:24:28+03:00 +dateModified: 2020-10-18T20:24:28+03:00 --- Checks if all elements in an array are equal. diff --git a/snippets/all-unique-by.md b/snippets/all-unique-by.md index 3e63cdbc1..8de787ebd 100644 --- a/snippets/all-unique-by.md +++ b/snippets/all-unique-by.md @@ -1,9 +1,9 @@ --- title: Check if all array elements are unique based on function -tags: array +type: snippet +tags: [array] cover: digital-nomad-10 -firstSeen: 2020-10-19T22:15:05+03:00 -lastUpdated: 2021-01-08T00:23:44+02:00 +dateModified: 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/all-unique.md b/snippets/all-unique.md index 70c1af1cc..311a96535 100644 --- a/snippets/all-unique.md +++ b/snippets/all-unique.md @@ -1,9 +1,9 @@ --- title: Check if all array elements are unique -tags: array +type: snippet +tags: [array] cover: jars-on-shelf -firstSeen: 2020-10-19T19:47:26+03:00 -lastUpdated: 2021-01-08T00:23:44+02:00 +dateModified: 2021-01-08T00:23:44+02:00 --- Checks if all elements in an array are unique. diff --git a/snippets/all.md b/snippets/all.md index e4f76162b..c51985517 100644 --- a/snippets/all.md +++ b/snippets/all.md @@ -1,9 +1,9 @@ --- title: Test if all array elements are truthy -tags: array +type: snippet +tags: [array] cover: touch-flower -firstSeen: 2018-02-14T11:46:15+02:00 -lastUpdated: 2020-10-18T20:24:28+03:00 +dateModified: 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/alphabetical.md b/snippets/alphabetical.md index 6932d6e66..ec219c550 100644 --- a/snippets/alphabetical.md +++ b/snippets/alphabetical.md @@ -1,9 +1,10 @@ --- title: Sort array alphabetically -tags: array +type: snippet +tags: [array] author: chalarangelo cover: boutique-home-office-1 -firstSeen: 2023-02-15T05:00:00-04:00 +dateModified: 2023-02-15T05:00:00-04:00 --- Sorts an array of objects alphabetically based on a given property. diff --git a/snippets/and.md b/snippets/and.md index 353b9e41b..ccbb8c46b 100644 --- a/snippets/and.md +++ b/snippets/and.md @@ -1,10 +1,10 @@ --- title: Logical and -tags: math,logic +type: snippet +tags: [math,logic] unlisted: true cover: succulent-1 -firstSeen: 2020-05-13T11:35:31+03:00 -lastUpdated: 2021-01-04T13:04:15+02:00 +dateModified: 2021-01-04T13:04:15+02:00 --- Checks if both arguments are `true`. diff --git a/snippets/any.md b/snippets/any.md index c42c5fdd9..10eed8c19 100644 --- a/snippets/any.md +++ b/snippets/any.md @@ -1,9 +1,9 @@ --- title: Test if any array element is truthy -tags: array +type: snippet +tags: [array] cover: basket-paper -firstSeen: 2018-02-14T11:46:15+02:00 -lastUpdated: 2020-10-18T20:24:28+03:00 +dateModified: 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 2f30fa1d8..203f10f4a 100644 --- a/snippets/aperture.md +++ b/snippets/aperture.md @@ -1,10 +1,10 @@ --- title: Consecutive element subarrays -tags: array +type: snippet +tags: [array] author: chalarangelo cover: camera-zoom -firstSeen: 2020-05-13T13:25:33+03:00 -lastUpdated: 2020-10-18T20:24:28+03:00 +dateModified: 2020-10-18T20:24:28+03:00 --- Creates an array of `n`-tuples of consecutive elements. diff --git a/snippets/approximately-equal.md b/snippets/approximately-equal.md index 8349f7d56..bf7f4f9a3 100644 --- a/snippets/approximately-equal.md +++ b/snippets/approximately-equal.md @@ -1,9 +1,9 @@ --- title: Approximate number equality -tags: math +type: snippet +tags: [math] cover: engine -firstSeen: 2018-02-14T12:47:13+02:00 -lastUpdated: 2020-11-01T20:50:57+02:00 +dateModified: 2020-11-01T20:50:57+02:00 --- Checks if two numbers are approximately equal to each other. diff --git a/snippets/arithmetic-progression.md b/snippets/arithmetic-progression.md index 130464556..f11e83c96 100644 --- a/snippets/arithmetic-progression.md +++ b/snippets/arithmetic-progression.md @@ -1,9 +1,9 @@ --- title: Arithmetic progression -tags: math,algorithm +type: snippet +tags: [math,algorithm] cover: u-got-this -firstSeen: 2020-10-04T11:37:07+03:00 -lastUpdated: 2021-10-13T19:29:39+02:00 +dateModified: 2021-10-13T19:29:39+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/array-to-csv.md b/snippets/array-to-csv.md index 8899055e2..10212691d 100644 --- a/snippets/array-to-csv.md +++ b/snippets/array-to-csv.md @@ -1,9 +1,9 @@ --- title: Array to CSV -tags: array,string +type: snippet +tags: [array,string] cover: sunrise-over-city -firstSeen: 2018-06-27T20:26:43+03:00 -lastUpdated: 2020-11-03T21:55:08+02:00 +dateModified: 2020-11-03T21:55:08+02:00 --- Converts a 2D array to a comma-separated values (CSV) string. diff --git a/snippets/array-to-html-list.md b/snippets/array-to-html-list.md index 13c1a0c92..0c22d006f 100644 --- a/snippets/array-to-html-list.md +++ b/snippets/array-to-html-list.md @@ -1,9 +1,9 @@ --- title: Array to HTML list -tags: browser,array +type: snippet +tags: [browser,array] cover: red-succulent -firstSeen: 2020-10-08T00:02:45+03:00 -lastUpdated: 2020-10-20T11:46:23+03:00 +dateModified: 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 22b1d2d71..8dc3671cc 100644 --- a/snippets/ary.md +++ b/snippets/ary.md @@ -1,9 +1,9 @@ --- title: Function arity -tags: function +type: snippet +tags: [function] cover: trippy-chemicals -firstSeen: 2018-01-24T13:59:54+02:00 -lastUpdated: 2020-10-18T20:24:28+03:00 +dateModified: 2020-10-18T20:24:28+03:00 --- Creates a function that accepts up to `n` arguments, ignoring any additional arguments. diff --git a/snippets/assert-valid-keys.md b/snippets/assert-valid-keys.md index 9cba0d91f..197c3b664 100644 --- a/snippets/assert-valid-keys.md +++ b/snippets/assert-valid-keys.md @@ -1,9 +1,10 @@ --- title: Assert object keys are valid -tags: object +type: snippet +tags: [object] author: chalarangelo cover: river-flow -firstSeen: 2021-07-18T05:00:00-04:00 +dateModified: 2021-07-18T05:00:00-04:00 --- Validates all keys in an object match the given `keys`. diff --git a/snippets/atob.md b/snippets/atob.md index 36a5b9b18..97255ebf2 100644 --- a/snippets/atob.md +++ b/snippets/atob.md @@ -1,9 +1,9 @@ --- title: Decode Base64 encoded string -tags: node,string +type: snippet +tags: [node,string] cover: thread -firstSeen: 2018-01-17T21:43:21+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 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 a0490705f..aad227256 100644 --- a/snippets/attempt.md +++ b/snippets/attempt.md @@ -1,9 +1,9 @@ --- title: Attempt invoking a function -tags: function +type: snippet +tags: [function] cover: spanish-resort -firstSeen: 2018-01-28T14:44:40+02:00 -lastUpdated: 2020-10-18T20:24:28+03:00 +dateModified: 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-by.md b/snippets/average-by.md index 174d7098b..cfdd899d6 100644 --- a/snippets/average-by.md +++ b/snippets/average-by.md @@ -1,9 +1,9 @@ --- title: Mapped array average -tags: math +type: snippet +tags: [math] cover: rock-climbing -firstSeen: 2018-01-11T12:25:54+02:00 -lastUpdated: 2020-10-21T21:17:45+03:00 +dateModified: 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/average.md b/snippets/average.md index 3834e0840..c3f353ebd 100644 --- a/snippets/average.md +++ b/snippets/average.md @@ -1,9 +1,9 @@ --- title: Average of numbers -tags: math +type: snippet +tags: [math] cover: interior-8 -firstSeen: 2017-12-29T13:29:49+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Calculates the average of two or more numbers. diff --git a/snippets/bifurcate-by.md b/snippets/bifurcate-by.md index edeca5ffe..8d64976c5 100644 --- a/snippets/bifurcate-by.md +++ b/snippets/bifurcate-by.md @@ -1,9 +1,9 @@ --- title: Bifurcate array based on function -tags: array +type: snippet +tags: [array] cover: canoe -firstSeen: 2018-02-14T12:13:07+02:00 -lastUpdated: 2020-11-01T20:50:57+02:00 +dateModified: 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/bifurcate.md b/snippets/bifurcate.md index d9f25d387..92d9c951f 100644 --- a/snippets/bifurcate.md +++ b/snippets/bifurcate.md @@ -1,9 +1,9 @@ --- title: Bifurcate array based on values -tags: array +type: snippet +tags: [array] cover: two-cities -firstSeen: 2018-02-14T12:13:07+02:00 -lastUpdated: 2020-11-01T20:50:57+02:00 +dateModified: 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/binary-search.md b/snippets/binary-search.md index ea0210cc4..9e7b3ad9c 100644 --- a/snippets/binary-search.md +++ b/snippets/binary-search.md @@ -1,10 +1,10 @@ --- title: Binary search -tags: algorithm,array +type: snippet +tags: [algorithm,array] author: chalarangelo cover: zen-indoors -firstSeen: 2020-12-28T12:35:44+02:00 -lastUpdated: 2020-12-29T13:06:47+02:00 +dateModified: 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/binary.md b/snippets/binary.md index 92b61eab2..40e4ac409 100644 --- a/snippets/binary.md +++ b/snippets/binary.md @@ -1,10 +1,10 @@ --- title: Binary function arity -tags: function +type: snippet +tags: [function] author: chalarangelo cover: blue-bird -firstSeen: 2020-05-13T13:36:36+03:00 -lastUpdated: 2020-10-18T23:04:45+03:00 +dateModified: 2020-10-18T23:04:45+03:00 --- Creates a function that accepts up to two arguments, ignoring any additional arguments. diff --git a/snippets/bind-all.md b/snippets/bind-all.md index 7127cb114..2c8cc4a32 100644 --- a/snippets/bind-all.md +++ b/snippets/bind-all.md @@ -1,9 +1,9 @@ --- title: Bind all object methods -tags: object,function +type: snippet +tags: [object,function] cover: laptop-with-code -firstSeen: 2018-01-26T14:14:53+02:00 -lastUpdated: 2020-11-03T22:11:18+02:00 +dateModified: 2020-11-03T22:11:18+02:00 --- Binds methods of an object to the object itself, overwriting the existing method. diff --git a/snippets/bind-key.md b/snippets/bind-key.md index 150a574d4..327e9d262 100644 --- a/snippets/bind-key.md +++ b/snippets/bind-key.md @@ -1,9 +1,9 @@ --- title: Bind object method -tags: function,object +type: snippet +tags: [function,object] cover: oven-paddle -firstSeen: 2018-01-24T14:22:43+02:00 -lastUpdated: 2020-10-18T23:04:45+03:00 +dateModified: 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/bind.md b/snippets/bind.md index 39949c0a9..9efc73f0e 100644 --- a/snippets/bind.md +++ b/snippets/bind.md @@ -1,9 +1,9 @@ --- title: Bind function context -tags: function,object +type: snippet +tags: [function,object] cover: tranquility -firstSeen: 2018-01-24T14:14:49+02:00 -lastUpdated: 2020-10-18T23:04:45+03:00 +dateModified: 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/binomial-coefficient.md b/snippets/binomial-coefficient.md index 4b206e28c..c3a50ddfd 100644 --- a/snippets/binomial-coefficient.md +++ b/snippets/binomial-coefficient.md @@ -1,9 +1,9 @@ --- title: Binomial coefficient -tags: math,algorithm +type: snippet +tags: [math,algorithm] cover: blue-red-mountain -firstSeen: 2018-02-14T12:34:02+02:00 -lastUpdated: 2020-12-28T13:49:24+02:00 +dateModified: 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 a28103efc..ea5f06b63 100644 --- a/snippets/both.md +++ b/snippets/both.md @@ -1,10 +1,10 @@ --- title: Logical and for functions -tags: function,logic +type: snippet +tags: [function,logic] unlisted: true cover: succulent-2 -firstSeen: 2020-05-13T11:35:36+03:00 -lastUpdated: 2021-01-04T13:04:15+02:00 +dateModified: 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/bottom-visible.md b/snippets/bottom-visible.md index 215e7d84e..62de530ba 100644 --- a/snippets/bottom-visible.md +++ b/snippets/bottom-visible.md @@ -1,9 +1,9 @@ --- title: Check if bottom of page is visible -tags: browser +type: snippet +tags: [browser] cover: red-mountain -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 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 3a9ff6015..0216078f4 100644 --- a/snippets/btoa.md +++ b/snippets/btoa.md @@ -1,9 +1,9 @@ --- title: Encode string to Base64 -tags: node,string +type: snippet +tags: [node,string] cover: laptop-journey -firstSeen: 2018-01-17T21:43:21+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 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/bubble-sort.md b/snippets/bubble-sort.md index f0b9f843a..df3e57966 100644 --- a/snippets/bubble-sort.md +++ b/snippets/bubble-sort.md @@ -1,9 +1,9 @@ --- title: Bubble sort -tags: algorithm,array +type: snippet +tags: [algorithm,array] cover: budapest-palace -firstSeen: 2020-12-27T21:20:31+02:00 -lastUpdated: 2020-12-29T12:18:58+02:00 +dateModified: 2020-12-29T12:18:58+02:00 --- Sorts an array of numbers, using the bubble sort algorithm. diff --git a/snippets/bucket-sort.md b/snippets/bucket-sort.md index 79b80317f..5bdef533d 100644 --- a/snippets/bucket-sort.md +++ b/snippets/bucket-sort.md @@ -1,9 +1,9 @@ --- title: Bucket sort -tags: algorithm,array +type: snippet +tags: [algorithm,array] cover: canoe -firstSeen: 2020-12-28T22:11:56+02:00 -lastUpdated: 2020-12-29T12:22:44+02:00 +dateModified: 2020-12-29T12:22:44+02:00 --- Sorts an array of numbers, using the bucket sort algorithm. diff --git a/snippets/byte-size.md b/snippets/byte-size.md index 017f19a66..c5fde8e98 100644 --- a/snippets/byte-size.md +++ b/snippets/byte-size.md @@ -1,9 +1,9 @@ --- title: Byte size of string -tags: string +type: snippet +tags: [string] cover: mountain-lake-cottage-2 -firstSeen: 2017-12-29T14:30:34+02:00 -lastUpdated: 2020-10-18T23:04:45+03:00 +dateModified: 2020-10-18T23:04:45+03:00 --- Returns the length of a string in bytes. diff --git a/snippets/caesar-cipher.md b/snippets/caesar-cipher.md index d249fbd83..825e51236 100644 --- a/snippets/caesar-cipher.md +++ b/snippets/caesar-cipher.md @@ -1,9 +1,9 @@ --- title: Caesar cipher -tags: algorithm,string +type: snippet +tags: [algorithm,string] cover: ancient-greek-building -firstSeen: 2020-12-28T20:10:18+02:00 -lastUpdated: 2020-12-29T12:29:21+02:00 +dateModified: 2020-12-29T12:29:21+02:00 --- Encrypts or decrypts a given string using the Caesar cipher. diff --git a/snippets/call-or-return.md b/snippets/call-or-return.md index a4761f0f2..319a9e716 100644 --- a/snippets/call-or-return.md +++ b/snippets/call-or-return.md @@ -1,9 +1,10 @@ --- title: Call or return -tags: function +type: snippet +tags: [function] author: chalarangelo cover: cows -firstSeen: 2022-04-04T05:00:00-04:00 +dateModified: 2022-04-04T05:00:00-04:00 --- Calls the argument if it's a function, otherwise returns it. diff --git a/snippets/call.md b/snippets/call.md index 8b04dbc18..195ceecf0 100644 --- a/snippets/call.md +++ b/snippets/call.md @@ -1,9 +1,9 @@ --- title: Call functions with context -tags: function +type: snippet +tags: [function] cover: rabbit-call -firstSeen: 2017-12-22T21:54:30+02:00 -lastUpdated: 2021-06-13T13:50:25+03:00 +dateModified: 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-every-word.md b/snippets/capitalize-every-word.md index fb7922e76..4a7b5ae80 100644 --- a/snippets/capitalize-every-word.md +++ b/snippets/capitalize-every-word.md @@ -1,9 +1,9 @@ --- title: Capitalize every word -tags: string,regexp +type: snippet +tags: [string,regexp] cover: laptop-plants -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Capitalizes the first letter of every word in a string. diff --git a/snippets/capitalize.md b/snippets/capitalize.md index 72432042d..d0942a200 100644 --- a/snippets/capitalize.md +++ b/snippets/capitalize.md @@ -1,9 +1,9 @@ --- title: Capitalize string -tags: string +type: snippet +tags: [string] cover: digital-nomad-3 -firstSeen: 2017-12-17T16:41:31+02:00 -lastUpdated: 2020-11-01T20:50:57+02:00 +dateModified: 2020-11-01T20:50:57+02:00 --- Capitalizes the first letter of a string. diff --git a/snippets/cartesian-product.md b/snippets/cartesian-product.md index b2f3e23eb..532455035 100644 --- a/snippets/cartesian-product.md +++ b/snippets/cartesian-product.md @@ -1,9 +1,9 @@ --- title: Cartesian product -tags: math +type: snippet +tags: [math] cover: sail-away -firstSeen: 2020-12-28T20:23:47+02:00 -lastUpdated: 2020-12-29T12:31:43+02:00 +dateModified: 2020-12-29T12:31:43+02:00 --- Calculates the cartesian product of two arrays. diff --git a/snippets/cast-array.md b/snippets/cast-array.md index f93f760c4..aff0e997c 100644 --- a/snippets/cast-array.md +++ b/snippets/cast-array.md @@ -1,9 +1,9 @@ --- title: Cast to array -tags: type,array +type: snippet +tags: [type,array] cover: man-red-sunset -firstSeen: 2018-01-23T20:54:12+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Casts the provided value as an array if it's not one. diff --git a/snippets/celsius-to-fahrenheit.md b/snippets/celsius-to-fahrenheit.md index d7391a53d..49e9711c7 100644 --- a/snippets/celsius-to-fahrenheit.md +++ b/snippets/celsius-to-fahrenheit.md @@ -1,10 +1,10 @@ --- title: Celsius to Fahrenheit -tags: math +type: snippet +tags: [math] unlisted: true cover: last-light -firstSeen: 2020-04-16T11:00:06+03:00 -lastUpdated: 2021-01-04T13:04:15+02:00 +dateModified: 2021-01-04T13:04:15+02:00 --- Converts Celsius to Fahrenheit. diff --git a/snippets/chain-async.md b/snippets/chain-async.md index 9be96230d..0ad8b8a4e 100644 --- a/snippets/chain-async.md +++ b/snippets/chain-async.md @@ -1,9 +1,9 @@ --- title: Chain async functions -tags: function +type: snippet +tags: [function] cover: tram-car -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Chains asynchronous functions. diff --git a/snippets/change-lightness.md b/snippets/change-lightness.md index 122617e27..64f6ceb59 100644 --- a/snippets/change-lightness.md +++ b/snippets/change-lightness.md @@ -1,9 +1,9 @@ --- title: Change color lightness -tags: string,browser,regexp +type: snippet +tags: [string,browser,regexp] cover: aerial-view-port -firstSeen: 2020-10-30T17:38:31+02:00 -lastUpdated: 2020-10-31T16:37:54+02:00 +dateModified: 2020-10-31T16:37:54+02:00 --- Changes the lightness value of an `hsl()` color string. diff --git a/snippets/check-prop.md b/snippets/check-prop.md index 70ae28b98..bb512ffdb 100644 --- a/snippets/check-prop.md +++ b/snippets/check-prop.md @@ -1,9 +1,9 @@ --- title: Check property -tags: function,object +type: snippet +tags: [function,object] cover: white-tablet-2 -firstSeen: 2019-03-17T03:53:00+02:00 -lastUpdated: 2020-11-01T20:50:57+02:00 +dateModified: 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-into-n.md b/snippets/chunk-into-n.md index 51a27887a..1a48caa23 100644 --- a/snippets/chunk-into-n.md +++ b/snippets/chunk-into-n.md @@ -1,10 +1,10 @@ --- title: Split array into n chunks -tags: array +type: snippet +tags: [array] author: chalarangelo cover: dark-leaves-2 -firstSeen: 2020-05-04T13:00:46+03:00 -lastUpdated: 2020-11-03T21:46:13+02:00 +dateModified: 2020-11-03T21:46:13+02:00 --- Chunks an array into `n` smaller arrays. diff --git a/snippets/chunk.md b/snippets/chunk.md index 5a55507c5..f136e5a56 100644 --- a/snippets/chunk.md +++ b/snippets/chunk.md @@ -1,9 +1,9 @@ --- title: Split into chunks -tags: array +type: snippet +tags: [array] cover: filter-coffee-pot -firstSeen: 2017-12-17T16:41:31+02:00 -lastUpdated: 2020-11-03T21:35:12+02:00 +dateModified: 2020-11-03T21:35:12+02:00 --- Chunks an array into smaller arrays of a specified size. diff --git a/snippets/chunkify.md b/snippets/chunkify.md index 93a30257c..9a86cdcf4 100644 --- a/snippets/chunkify.md +++ b/snippets/chunkify.md @@ -1,10 +1,10 @@ --- title: Chunk iterable -tags: function,generator,array +type: snippet +tags: [function,generator,array] author: chalarangelo cover: cave-view -firstSeen: 2021-03-16T22:50:40+02:00 -lastUpdated: 2021-03-16T22:50:40+02:00 +dateModified: 2021-03-16T22:50:40+02:00 --- Chunks an iterable into smaller arrays of a specified size. diff --git a/snippets/clamp-number.md b/snippets/clamp-number.md index 1c2557e88..b014ce777 100644 --- a/snippets/clamp-number.md +++ b/snippets/clamp-number.md @@ -1,9 +1,9 @@ --- title: Clamp number -tags: math +type: snippet +tags: [math] cover: clay-pot-horizon -firstSeen: 2017-12-20T19:19:18+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 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/clone-reg-exp.md b/snippets/clone-reg-exp.md index fe0df0641..3802f2ab5 100644 --- a/snippets/clone-reg-exp.md +++ b/snippets/clone-reg-exp.md @@ -1,9 +1,9 @@ --- title: Clone RegExp -tags: type +type: snippet +tags: [type] cover: tomatoes -firstSeen: 2018-01-01T19:45:47+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Clones a regular expression. diff --git a/snippets/closest.md b/snippets/closest.md index f850ef8cf..c6877ab71 100644 --- a/snippets/closest.md +++ b/snippets/closest.md @@ -1,9 +1,10 @@ --- title: Closest numeric match -tags: math +type: snippet +tags: [math] author: chalarangelo cover: sparkles -firstSeen: 2022-03-30T05:00:00-04:00 +dateModified: 2022-03-30T05:00:00-04:00 --- Finds the closest number from an array. diff --git a/snippets/coalesce-factory.md b/snippets/coalesce-factory.md index 00753ba47..a26e03c7a 100644 --- a/snippets/coalesce-factory.md +++ b/snippets/coalesce-factory.md @@ -1,9 +1,9 @@ --- title: Argument coalescing factory -tags: function,type +type: snippet +tags: [function,type] cover: coffee-phone-tray -firstSeen: 2017-12-18T12:15:36+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 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/coalesce.md b/snippets/coalesce.md index 0975491dc..3d3acfd74 100644 --- a/snippets/coalesce.md +++ b/snippets/coalesce.md @@ -1,9 +1,9 @@ --- title: Argument coalescing -tags: type +type: snippet +tags: [type] cover: flower-portrait-1 -firstSeen: 2017-12-17T10:08:55+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Returns the first defined, non-null argument. diff --git a/snippets/collect-into.md b/snippets/collect-into.md index faefc28a1..d99253406 100644 --- a/snippets/collect-into.md +++ b/snippets/collect-into.md @@ -1,9 +1,9 @@ --- title: Convert function to variadic -tags: function,array +type: snippet +tags: [function,array] cover: polar-bear -firstSeen: 2017-12-22T05:08:36+02:00 -lastUpdated: 2021-06-13T13:50:25+03:00 +dateModified: 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 ff9d9cc23..79dd69577 100644 --- a/snippets/colorize.md +++ b/snippets/colorize.md @@ -1,9 +1,9 @@ --- title: Colorize text -tags: node,string +type: snippet +tags: [node,string] cover: sea-view -firstSeen: 2018-01-13T13:36:59+02:00 -lastUpdated: 2020-11-03T22:11:18+02:00 +dateModified: 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 755474f45..ef6e912a9 100644 --- a/snippets/combine.md +++ b/snippets/combine.md @@ -1,10 +1,10 @@ --- title: Combine object arrays -tags: array,object +type: snippet +tags: [array,object] author: chalarangelo cover: digital-nomad-6 -firstSeen: 2020-10-04T00:26:51+03:00 -lastUpdated: 2020-10-08T02:22:39+03:00 +dateModified: 2020-10-08T02:22:39+03:00 --- Combines two arrays of objects, using the specified key to match objects. diff --git a/snippets/common-keys.md b/snippets/common-keys.md index d277eece5..31921d714 100644 --- a/snippets/common-keys.md +++ b/snippets/common-keys.md @@ -1,9 +1,10 @@ --- title: Common keys -tags: object +type: snippet +tags: [object] author: chalarangelo cover: symmetry-cloudy-mountain -firstSeen: 2022-04-23T05:00:00-04:00 +dateModified: 2022-04-23T05:00:00-04:00 --- Finds the common keys between two objects. diff --git a/snippets/compact-join.md b/snippets/compact-join.md index e2a589c8e..91d0ff298 100644 --- a/snippets/compact-join.md +++ b/snippets/compact-join.md @@ -1,9 +1,10 @@ --- title: Compact and join array -tags: array +type: snippet +tags: [array] author: chalarangelo cover: racoon -firstSeen: 2022-04-08T05:00:00-04:00 +dateModified: 2022-04-08T05:00:00-04:00 --- Removes falsy values from an array and combines the remaining values into a string. diff --git a/snippets/compact-object.md b/snippets/compact-object.md index d0091fa45..81e5522b2 100644 --- a/snippets/compact-object.md +++ b/snippets/compact-object.md @@ -1,9 +1,9 @@ --- title: Compact object -tags: object,array,recursion +type: snippet +tags: [object,array,recursion] cover: shapes -firstSeen: 2020-11-27T13:57:41+02:00 -lastUpdated: 2020-11-27T13:57:41+02:00 +dateModified: 2020-11-27T13:57:41+02:00 --- Deeply removes all falsy values from an object or array. diff --git a/snippets/compact-whitespace.md b/snippets/compact-whitespace.md index 7a78361ff..395060a09 100644 --- a/snippets/compact-whitespace.md +++ b/snippets/compact-whitespace.md @@ -1,9 +1,9 @@ --- title: Compact whitespaces -tags: string,regexp +type: snippet +tags: [string,regexp] cover: travel-mug-1 -firstSeen: 2018-12-12T19:11:33+02:00 -lastUpdated: 2020-10-18T23:04:45+03:00 +dateModified: 2020-10-18T23:04:45+03:00 --- Compacts whitespaces in a string. diff --git a/snippets/compact.md b/snippets/compact.md index b1be1474f..fdb1a619f 100644 --- a/snippets/compact.md +++ b/snippets/compact.md @@ -1,9 +1,9 @@ --- title: Compact array -tags: array +type: snippet +tags: [array] cover: basket-paper -firstSeen: 2017-12-14T08:19:15+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Removes falsy values from an array. diff --git a/snippets/complement.md b/snippets/complement.md index c2080cd51..47e34dea4 100644 --- a/snippets/complement.md +++ b/snippets/complement.md @@ -1,9 +1,9 @@ --- title: Logical complement -tags: function,logic +type: snippet +tags: [function,logic] cover: flower-portrait-10 -firstSeen: 2020-05-13T11:28:33+03:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 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-right.md b/snippets/compose-right.md index 9aea65ef1..39d529615 100644 --- a/snippets/compose-right.md +++ b/snippets/compose-right.md @@ -1,9 +1,9 @@ --- title: Reverse compose functions -tags: function +type: snippet +tags: [function] cover: rocky-beach -firstSeen: 2018-01-23T22:12:56+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Performs left-to-right function composition. diff --git a/snippets/compose.md b/snippets/compose.md index ed2b6ea67..d7377d453 100644 --- a/snippets/compose.md +++ b/snippets/compose.md @@ -1,9 +1,9 @@ --- title: Compose functions -tags: function +type: snippet +tags: [function] cover: digital-nomad-16 -firstSeen: 2017-12-17T16:41:31+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Performs right-to-left function composition. diff --git a/snippets/contains-whitespace.md b/snippets/contains-whitespace.md index a047f66c9..de5eb7c86 100644 --- a/snippets/contains-whitespace.md +++ b/snippets/contains-whitespace.md @@ -1,10 +1,10 @@ --- title: Check if string contains whitespace -tags: string,regexp +type: snippet +tags: [string,regexp] author: chalarangelo cover: bag-waiting -firstSeen: 2020-03-25T12:37:13+02:00 -lastUpdated: 2020-10-18T23:04:45+03:00 +dateModified: 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 cfb4701e5..af7b71c54 100644 --- a/snippets/converge.md +++ b/snippets/converge.md @@ -1,10 +1,10 @@ --- title: Converge branching functions -tags: function +type: snippet +tags: [function] excerpt: Converges a list of branching functions into a single function and returns the result. cover: cherry-trees -firstSeen: 2018-02-07T12:23:04+02:00 -lastUpdated: 2021-01-08T00:23:44+02:00 +dateModified: 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/copy-sign.md b/snippets/copy-sign.md index 3d4d132ff..40d5be1bd 100644 --- a/snippets/copy-sign.md +++ b/snippets/copy-sign.md @@ -1,9 +1,9 @@ --- title: Copy sign to number -tags: math +type: snippet +tags: [math] cover: keyboard-tea -firstSeen: 2020-10-07T23:52:57+03:00 -lastUpdated: 2020-10-07T23:52:57+03:00 +dateModified: 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/copy-to-clipboard-async.md b/snippets/copy-to-clipboard-async.md index fb7acf8a2..a2bcc6700 100644 --- a/snippets/copy-to-clipboard-async.md +++ b/snippets/copy-to-clipboard-async.md @@ -1,8 +1,9 @@ --- title: Copy to clipboard async -tags: browser,string,promise +type: snippet +tags: [browser,string,promise] cover: typing -firstSeen: 2022-01-11T05:00:00-04:00 +dateModified: 2022-01-11T05:00:00-04:00 --- Copies a string to the clipboard, returning a promise that resolves when the clipboard's contents have been updated. diff --git a/snippets/copy-to-clipboard.md b/snippets/copy-to-clipboard.md index 74a4f9055..df79ff504 100644 --- a/snippets/copy-to-clipboard.md +++ b/snippets/copy-to-clipboard.md @@ -1,9 +1,9 @@ --- title: Copy to clipboard -tags: browser,string,event +type: snippet +tags: [browser,string,event] cover: typing -firstSeen: 2017-12-31T11:40:33+02:00 -lastUpdated: 2022-01-11T09:32:04+02:00 +dateModified: 2022-01-11T09:32:04+02:00 --- Copies a string to the clipboard. diff --git a/snippets/count-by.md b/snippets/count-by.md index c18f05a02..9d877d3b8 100644 --- a/snippets/count-by.md +++ b/snippets/count-by.md @@ -1,9 +1,9 @@ --- title: Count grouped elements -tags: array,object +type: snippet +tags: [array,object] cover: tools -firstSeen: 2018-01-11T13:45:53+02:00 -lastUpdated: 2020-11-03T22:11:18+02:00 +dateModified: 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/count-occurrences.md b/snippets/count-occurrences.md index 6bd3665ee..7f89cef8e 100644 --- a/snippets/count-occurrences.md +++ b/snippets/count-occurrences.md @@ -1,9 +1,9 @@ --- title: Count occurrences -tags: array +type: snippet +tags: [array] cover: dark-leaves-4 -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-18T23:04:45+03:00 +dateModified: 2020-10-18T23:04:45+03:00 --- Counts the occurrences of a value in an array. diff --git a/snippets/count-substrings.md b/snippets/count-substrings.md index 6f9011d8c..09f5ffac4 100644 --- a/snippets/count-substrings.md +++ b/snippets/count-substrings.md @@ -1,10 +1,10 @@ --- title: Count substrings of string -tags: string,algorithm +type: snippet +tags: [string,algorithm] author: chalarangelo cover: obelisk -firstSeen: 2020-12-31T13:58:51+02:00 -lastUpdated: 2021-01-08T00:23:44+02:00 +dateModified: 2021-01-08T00:23:44+02:00 --- Counts the occurrences of a substring in a given string. diff --git a/snippets/count-week-days-between.md b/snippets/count-week-days-between.md index a4e9bca17..57f3edafa 100644 --- a/snippets/count-week-days-between.md +++ b/snippets/count-week-days-between.md @@ -1,9 +1,9 @@ --- title: Count weekdays between two dates -tags: date +type: snippet +tags: [date] cover: organizer -firstSeen: 2020-10-11T11:44:44+03:00 -lastUpdated: 2020-10-20T11:21:07+03:00 +dateModified: 2020-10-20T11:21:07+03:00 --- Counts the weekdays between two dates. diff --git a/snippets/counter.md b/snippets/counter.md index 5c18a9ef9..d8e6be75a 100644 --- a/snippets/counter.md +++ b/snippets/counter.md @@ -1,9 +1,9 @@ --- title: Counter -tags: browser +type: snippet +tags: [browser] cover: touch-flower -firstSeen: 2018-05-06T17:55:46+03:00 -lastUpdated: 2020-11-01T20:50:57+02:00 +dateModified: 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/create-dir-if-not-exists.md b/snippets/create-dir-if-not-exists.md index 59606415e..b581c9fab 100644 --- a/snippets/create-dir-if-not-exists.md +++ b/snippets/create-dir-if-not-exists.md @@ -1,9 +1,9 @@ --- title: Create directory if not exists -tags: node +type: snippet +tags: [node] cover: sunrise-over-city -firstSeen: 2018-12-12T19:25:16+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Creates a directory, if it does not exist. diff --git a/snippets/create-element.md b/snippets/create-element.md index 8a2409e88..def646f54 100644 --- a/snippets/create-element.md +++ b/snippets/create-element.md @@ -1,9 +1,9 @@ --- title: Create HTML element -tags: browser +type: snippet +tags: [browser] cover: flower-portrait-4 -firstSeen: 2018-01-05T18:21:44+02:00 -lastUpdated: 2020-10-19T18:51:03+03:00 +dateModified: 2020-10-19T18:51:03+03:00 --- Creates an element from a string (without appending it to the document). diff --git a/snippets/create-event-hub.md b/snippets/create-event-hub.md index fa13d7646..0ffd8080b 100644 --- a/snippets/create-event-hub.md +++ b/snippets/create-event-hub.md @@ -1,9 +1,9 @@ --- title: Create event hub -tags: browser,event +type: snippet +tags: [browser,event] cover: city-view -firstSeen: 2018-01-05T15:07:26+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 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/csv-to-array.md b/snippets/csv-to-array.md index a82facd15..c505d1fdc 100644 --- a/snippets/csv-to-array.md +++ b/snippets/csv-to-array.md @@ -1,9 +1,9 @@ --- title: CSV to array -tags: string,array +type: snippet +tags: [string,array] cover: keyboard-tea -firstSeen: 2018-06-27T20:57:54+03:00 -lastUpdated: 2022-01-30T12:14:39+02:00 +dateModified: 2022-01-30T12:14:39+02:00 --- Converts a comma-separated values (CSV) string to a 2D array. diff --git a/snippets/csv-to-json.md b/snippets/csv-to-json.md index 7c39838b8..71b6114af 100644 --- a/snippets/csv-to-json.md +++ b/snippets/csv-to-json.md @@ -1,9 +1,9 @@ --- title: CSV to JSON -tags: string,object +type: snippet +tags: [string,object] cover: kettle-laptop -firstSeen: 2018-06-27T21:14:24+03:00 -lastUpdated: 2022-01-30T12:14:39+02:00 +dateModified: 2022-01-30T12:14:39+02:00 --- Converts a comma-separated values (CSV) string to a 2D array of objects. diff --git a/snippets/current-url.md b/snippets/current-url.md index 3973a5c92..4dbcc5153 100644 --- a/snippets/current-url.md +++ b/snippets/current-url.md @@ -1,9 +1,9 @@ --- title: Current URL -tags: browser +type: snippet +tags: [browser] cover: tropical-bike -firstSeen: 2017-12-18T11:05:03+02:00 -lastUpdated: 2020-10-20T11:46:23+03:00 +dateModified: 2020-10-20T11:46:23+03:00 --- Returns the current URL. diff --git a/snippets/curry.md b/snippets/curry.md index 628d4d22a..135f6da6d 100644 --- a/snippets/curry.md +++ b/snippets/curry.md @@ -1,9 +1,9 @@ --- title: Curry function -tags: function,recursion +type: snippet +tags: [function,recursion] cover: rocky-beach-2 -firstSeen: 2017-12-10T15:21:35+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Curries a function. diff --git a/snippets/cycle-generator.md b/snippets/cycle-generator.md index b3345855c..7e5bbc722 100644 --- a/snippets/cycle-generator.md +++ b/snippets/cycle-generator.md @@ -1,10 +1,10 @@ --- title: Cycle generator -tags: function,generator +type: snippet +tags: [function,generator] author: chalarangelo cover: secret-tree -firstSeen: 2020-10-11T17:05:38+03:00 -lastUpdated: 2020-10-11T17:05:38+03:00 +dateModified: 2020-10-11T17:05:38+03:00 --- Creates a generator, looping over the given array indefinitely. diff --git a/snippets/date-range-generator.md b/snippets/date-range-generator.md index 6311c4e46..76f11f76e 100644 --- a/snippets/date-range-generator.md +++ b/snippets/date-range-generator.md @@ -1,8 +1,9 @@ --- title: Date range generator -tags: date,function,generator +type: snippet +tags: [date,function,generator] cover: portal-timelapse -firstSeen: 2021-06-21T05:00:00-04:00 +dateModified: 2021-06-21T05:00:00-04:00 --- Creates a generator, that generates all dates in the given range using the given step. diff --git a/snippets/day-name.md b/snippets/day-name.md index 9678a6faa..10b762831 100644 --- a/snippets/day-name.md +++ b/snippets/day-name.md @@ -1,9 +1,9 @@ --- title: Day name -tags: date +type: snippet +tags: [date] cover: interior -firstSeen: 2020-10-04T00:31:08+03:00 -lastUpdated: 2020-11-01T20:50:57+02:00 +dateModified: 2020-11-01T20:50:57+02:00 --- Gets the name of the weekday from a `Date` object. diff --git a/snippets/day-of-year.md b/snippets/day-of-year.md index e0d32fcf8..f227cb616 100644 --- a/snippets/day-of-year.md +++ b/snippets/day-of-year.md @@ -1,9 +1,9 @@ --- title: Day of year -tags: date +type: snippet +tags: [date] cover: interior-3 -firstSeen: 2018-09-29T13:22:20+03:00 -lastUpdated: 2020-10-19T18:51:03+03:00 +dateModified: 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/days-ago.md b/snippets/days-ago.md index 9f67c91cc..a744174f5 100644 --- a/snippets/days-ago.md +++ b/snippets/days-ago.md @@ -1,9 +1,9 @@ --- title: Days ago -tags: date +type: snippet +tags: [date] cover: sunrise-over-city -firstSeen: 2020-10-06T05:35:23+03:00 -lastUpdated: 2022-01-30T11:48:07+03:00 +dateModified: 2022-01-30T11:48:07+03:00 --- Calculates the date of `n` days ago from today as a string representation. diff --git a/snippets/days-from-now.md b/snippets/days-from-now.md index 0af451edf..a9c9ccb06 100644 --- a/snippets/days-from-now.md +++ b/snippets/days-from-now.md @@ -1,9 +1,9 @@ --- title: Days from now -tags: date +type: snippet +tags: [date] cover: tent-stars -firstSeen: 2020-10-09T02:49:17+03:00 -lastUpdated: 2022-01-30T11:48:07+03:00 +dateModified: 2022-01-30T11:48:07+03:00 --- Calculates the date of `n` days from today as a string representation. diff --git a/snippets/days-in-month.md b/snippets/days-in-month.md index 7c63600f8..a5ef02d5c 100644 --- a/snippets/days-in-month.md +++ b/snippets/days-in-month.md @@ -1,8 +1,9 @@ --- title: Number of days in month -tags: date +type: snippet +tags: [date] cover: laptop-plants-2 -firstSeen: 2021-06-13T05:00:00-04:00 +dateModified: 2021-06-13T05:00:00-04:00 --- Gets the number of days in the given `month` of the specified `year`. diff --git a/snippets/debounce-promise.md b/snippets/debounce-promise.md index bb39ba91f..fdf22665a 100644 --- a/snippets/debounce-promise.md +++ b/snippets/debounce-promise.md @@ -1,10 +1,10 @@ --- title: Debounce promise -tags: function,promise +type: snippet +tags: [function,promise] excerpt: Creates a debounced function that returns a promise. cover: ice -firstSeen: 2020-10-10T21:09:04+03:00 -lastUpdated: 2020-10-19T18:51:03+03:00 +dateModified: 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/debounce.md b/snippets/debounce.md index 73210f268..6d5fcdbf3 100644 --- a/snippets/debounce.md +++ b/snippets/debounce.md @@ -1,9 +1,9 @@ --- title: Debounce function -tags: function +type: snippet +tags: [function] cover: solitude-beach -firstSeen: 2018-01-28T15:18:26+02:00 -lastUpdated: 2021-10-13T19:29:39+02:00 +dateModified: 2021-10-13T19:29:39+02:00 --- Creates a debounced function that delays invoking the provided function until at least `ms` milliseconds have elapsed since its last invocation. diff --git a/snippets/decapitalize.md b/snippets/decapitalize.md index 96e5184f5..430b94690 100644 --- a/snippets/decapitalize.md +++ b/snippets/decapitalize.md @@ -1,9 +1,9 @@ --- title: Decapitalize string -tags: string +type: snippet +tags: [string] cover: forest-balcony -firstSeen: 2018-01-11T11:58:40+02:00 -lastUpdated: 2020-11-01T20:50:57+02:00 +dateModified: 2020-11-01T20:50:57+02:00 --- Decapitalizes the first letter of a string. diff --git a/snippets/deep-clone.md b/snippets/deep-clone.md index 6ba60fbcb..f6960ae53 100644 --- a/snippets/deep-clone.md +++ b/snippets/deep-clone.md @@ -1,9 +1,9 @@ --- title: Deep clone object -tags: object,recursion +type: snippet +tags: [object,recursion] cover: neon-desk-2 -firstSeen: 2018-01-23T20:48:46+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Creates a deep clone of an object. diff --git a/snippets/deep-flatten.md b/snippets/deep-flatten.md index 5949842c5..6b4508acc 100644 --- a/snippets/deep-flatten.md +++ b/snippets/deep-flatten.md @@ -1,9 +1,9 @@ --- title: Deep flatten array -tags: array,recursion +type: snippet +tags: [array,recursion] cover: digital-nomad-4 -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Deep flattens an array. diff --git a/snippets/deep-freeze.md b/snippets/deep-freeze.md index b80ea6100..c41429e42 100644 --- a/snippets/deep-freeze.md +++ b/snippets/deep-freeze.md @@ -1,9 +1,9 @@ --- title: Deep freeze object -tags: object,recursion +type: snippet +tags: [object,recursion] cover: frozen-globe -firstSeen: 2018-08-25T18:54:16+03:00 -lastUpdated: 2020-10-19T18:51:03+03:00 +dateModified: 2020-10-19T18:51:03+03:00 --- Deep freezes an object. diff --git a/snippets/deep-get.md b/snippets/deep-get.md index f9712a993..4d2452b75 100644 --- a/snippets/deep-get.md +++ b/snippets/deep-get.md @@ -1,9 +1,9 @@ --- title: Get nested value in object based on array of keys -tags: object +type: snippet +tags: [object] cover: mask-quiet -firstSeen: 2019-05-09T13:30:52+03:00 -lastUpdated: 2020-10-19T18:51:03+03:00 +dateModified: 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/deep-map-keys.md b/snippets/deep-map-keys.md index 01b04a69e..45c4df1f4 100644 --- a/snippets/deep-map-keys.md +++ b/snippets/deep-map-keys.md @@ -1,9 +1,9 @@ --- title: Deep map object keys -tags: object,recursion +type: snippet +tags: [object,recursion] cover: duck-plants -firstSeen: 2018-11-29T15:22:53+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Deep maps an object's keys. diff --git a/snippets/deep-merge.md b/snippets/deep-merge.md index 270252444..cc9e9193b 100644 --- a/snippets/deep-merge.md +++ b/snippets/deep-merge.md @@ -1,9 +1,10 @@ --- title: Deep merge objects -tags: object,function +type: snippet +tags: [object,function] author: chalarangelo cover: coffee-drip -firstSeen: 2021-07-25T05:00:00-04:00 +dateModified: 2021-07-25T05:00:00-04:00 --- Deeply merges two objects, using a function to handle keys present in both. diff --git a/snippets/defaults.md b/snippets/defaults.md index 70126ad83..950ea274f 100644 --- a/snippets/defaults.md +++ b/snippets/defaults.md @@ -1,9 +1,9 @@ --- title: Assign default values for object properties -tags: object +type: snippet +tags: [object] cover: boats -firstSeen: 2018-01-19T13:51:05+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 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 cc920601a..0b1741e3b 100644 --- a/snippets/defer.md +++ b/snippets/defer.md @@ -1,9 +1,9 @@ --- title: Defer function invocation -tags: function +type: snippet +tags: [function] cover: cave-view -firstSeen: 2018-01-01T23:40:31+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Defers invoking a function until the current call stack has cleared. diff --git a/snippets/degrees-to-rads.md b/snippets/degrees-to-rads.md index 8a6dadff3..3ab237f46 100644 --- a/snippets/degrees-to-rads.md +++ b/snippets/degrees-to-rads.md @@ -1,9 +1,9 @@ --- title: Degrees to radians -tags: math +type: snippet +tags: [math] cover: blue-flower -firstSeen: 2018-02-14T12:24:50+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 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 fe4e3793f..f43ce6205 100644 --- a/snippets/delay.md +++ b/snippets/delay.md @@ -1,9 +1,9 @@ --- title: Delay function execution -tags: function +type: snippet +tags: [function] cover: interior-13 -firstSeen: 2018-01-24T14:32:20+02:00 -lastUpdated: 2020-10-19T18:51:03+03:00 +dateModified: 2020-10-19T18:51:03+03:00 --- Invokes the provided function after `ms` milliseconds. diff --git a/snippets/detect-device-type.md b/snippets/detect-device-type.md index 9e835344c..825b024fd 100644 --- a/snippets/detect-device-type.md +++ b/snippets/detect-device-type.md @@ -1,9 +1,9 @@ --- title: Detect device type -tags: browser,regexp +type: snippet +tags: [browser,regexp] cover: clutter-2 -firstSeen: 2017-12-24T09:39:23+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 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/detect-language.md b/snippets/detect-language.md index 07df7438c..931cd6b9f 100644 --- a/snippets/detect-language.md +++ b/snippets/detect-language.md @@ -1,9 +1,9 @@ --- title: Detect language -tags: browser +type: snippet +tags: [browser] cover: accessibility -firstSeen: 2020-10-05T18:03:26+03:00 -lastUpdated: 2020-10-06T18:47:16+03:00 +dateModified: 2020-10-06T18:47:16+03:00 --- Detects the preferred language of the current user. diff --git a/snippets/difference-by.md b/snippets/difference-by.md index a4d61523d..5146a0d1e 100644 --- a/snippets/difference-by.md +++ b/snippets/difference-by.md @@ -1,9 +1,9 @@ --- title: Mapped array difference -tags: array +type: snippet +tags: [array] cover: keyboard -firstSeen: 2018-01-24T11:49:03+02:00 -lastUpdated: 2020-10-19T18:52:00+03:00 +dateModified: 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/difference-with.md b/snippets/difference-with.md index df39ea833..5f2ff83ac 100644 --- a/snippets/difference-with.md +++ b/snippets/difference-with.md @@ -1,9 +1,9 @@ --- title: Array difference based on function -tags: array +type: snippet +tags: [array] cover: folded-map -firstSeen: 2017-12-19T12:32:24+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 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/difference.md b/snippets/difference.md index 0b67c29a1..13c26b0e0 100644 --- a/snippets/difference.md +++ b/snippets/difference.md @@ -1,9 +1,9 @@ --- title: Array difference -tags: array +type: snippet +tags: [array] cover: interior-3 -firstSeen: 2017-12-17T16:41:31+02:00 -lastUpdated: 2020-10-19T18:51:03+03:00 +dateModified: 2020-10-19T18:51:03+03:00 --- Calculates the difference between two arrays, without filtering duplicate values. diff --git a/snippets/dig.md b/snippets/dig.md index 3b306c7c5..7a3594acb 100644 --- a/snippets/dig.md +++ b/snippets/dig.md @@ -1,9 +1,9 @@ --- title: Get nested value in object -tags: object,recursion +type: snippet +tags: [object,recursion] cover: brown-bird -firstSeen: 2018-07-08T23:06:24+03:00 -lastUpdated: 2020-10-19T18:51:03+03:00 +dateModified: 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 75a5dc7f2..14919c471 100644 --- a/snippets/digitize.md +++ b/snippets/digitize.md @@ -1,9 +1,9 @@ --- title: Digitize number -tags: math +type: snippet +tags: [math] cover: industrial-tokyo -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-18T14:58:09+03:00 +dateModified: 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 2daaf9971..7ea09f7b0 100644 --- a/snippets/distance.md +++ b/snippets/distance.md @@ -1,9 +1,9 @@ --- title: Distance between two points -tags: math,algorithm +type: snippet +tags: [math,algorithm] cover: measuring -firstSeen: 2017-12-17T16:41:31+02:00 -lastUpdated: 2020-12-28T13:49:24+02:00 +dateModified: 2020-12-28T13:49:24+02:00 --- Calculates the distance between two points. diff --git a/snippets/divmod.md b/snippets/divmod.md index 979e6429c..141d4a025 100644 --- a/snippets/divmod.md +++ b/snippets/divmod.md @@ -1,9 +1,9 @@ --- title: Quotient and module of division -tags: math +type: snippet +tags: [math] cover: italian-horizon -firstSeen: 2020-10-07T23:59:13+03:00 -lastUpdated: 2020-10-07T23:59:13+03:00 +dateModified: 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-right-while.md b/snippets/drop-right-while.md index c73bddd6f..e3be1a373 100644 --- a/snippets/drop-right-while.md +++ b/snippets/drop-right-while.md @@ -1,9 +1,9 @@ --- title: Drop list elements from the right based on function -tags: array +type: snippet +tags: [array] cover: bridge-drop -firstSeen: 2018-01-26T12:23:18+02:00 -lastUpdated: 2020-10-19T18:51:03+03:00 +dateModified: 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/drop-right.md b/snippets/drop-right.md index 9614c7c92..5fe7f0f36 100644 --- a/snippets/drop-right.md +++ b/snippets/drop-right.md @@ -1,9 +1,9 @@ --- title: Drop list elements from the right -tags: array +type: snippet +tags: [array] cover: messy-papers -firstSeen: 2017-12-19T12:06:47+02:00 -lastUpdated: 2020-11-01T20:50:57+02:00 +dateModified: 2020-11-01T20:50:57+02:00 --- Creates a new array with `n` elements removed from the right. diff --git a/snippets/drop-while.md b/snippets/drop-while.md index 3e865231f..e0dc69dbd 100644 --- a/snippets/drop-while.md +++ b/snippets/drop-while.md @@ -1,9 +1,9 @@ --- title: Drop list elements from the left based on function -tags: array +type: snippet +tags: [array] cover: colorful-lounge -firstSeen: 2018-01-26T12:23:18+02:00 -lastUpdated: 2020-10-19T18:51:03+03:00 +dateModified: 2020-10-19T18:51:03+03:00 --- Removes elements in an array until the passed function returns `true`. diff --git a/snippets/drop.md b/snippets/drop.md index 371e1924a..9f851a5b8 100644 --- a/snippets/drop.md +++ b/snippets/drop.md @@ -1,9 +1,9 @@ --- title: Drop list elements from the left -tags: array +type: snippet +tags: [array] cover: bridge-drop -firstSeen: 2018-01-26T12:23:18+02:00 -lastUpdated: 2020-11-01T20:50:57+02:00 +dateModified: 2020-11-01T20:50:57+02:00 --- Creates a new array with `n` elements removed from the left. diff --git a/snippets/either.md b/snippets/either.md index a11754a80..1685f49cf 100644 --- a/snippets/either.md +++ b/snippets/either.md @@ -1,9 +1,9 @@ --- title: Logical or for functions -tags: function,logic +type: snippet +tags: [function,logic] cover: man-red-sunset -firstSeen: 2020-05-13T11:35:46+03:00 -lastUpdated: 2020-10-19T18:51:03+03:00 +dateModified: 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/element-contains.md b/snippets/element-contains.md index 281181778..4a2d4eb06 100644 --- a/snippets/element-contains.md +++ b/snippets/element-contains.md @@ -1,9 +1,9 @@ --- title: Element contains another element -tags: browser +type: snippet +tags: [browser] cover: red-petals -firstSeen: 2018-06-19T20:57:58+03:00 -lastUpdated: 2020-11-03T22:11:18+02:00 +dateModified: 2020-11-03T22:11:18+02:00 --- Checks if the `parent` element contains the `child` element. diff --git a/snippets/element-is-focused.md b/snippets/element-is-focused.md index bd86ea9f1..1e058df4b 100644 --- a/snippets/element-is-focused.md +++ b/snippets/element-is-focused.md @@ -1,10 +1,10 @@ --- title: Element is focused -tags: browser +type: snippet +tags: [browser] author: chalarangelo cover: ice -firstSeen: 2020-08-07T15:21:27+03:00 -lastUpdated: 2020-10-19T18:51:03+03:00 +dateModified: 2020-10-19T18:51:03+03:00 --- Checks if the given element is focused. diff --git a/snippets/element-is-visible-in-viewport.md b/snippets/element-is-visible-in-viewport.md index 2d28bae6f..52fa6afc4 100644 --- a/snippets/element-is-visible-in-viewport.md +++ b/snippets/element-is-visible-in-viewport.md @@ -1,9 +1,9 @@ --- title: Element is visible in viewport -tags: browser +type: snippet +tags: [browser] cover: flower-portrait-1 -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Checks if the element specified is visible in the viewport. diff --git a/snippets/ends-with-substring.md b/snippets/ends-with-substring.md index 84138934f..a018d26b2 100644 --- a/snippets/ends-with-substring.md +++ b/snippets/ends-with-substring.md @@ -1,10 +1,11 @@ --- title: String ends with substring +type: snippet shortTitle: Ends with substring -tags: string +tags: [string] cover: boutique-home-office-4 author: chalarangelo -firstSeen: 2022-08-01T05:00:00-04:00 +dateModified: 2022-08-01T05:00:00-04:00 --- Checks if a given string ends with a substring of another string. diff --git a/snippets/equals.md b/snippets/equals.md index f8340451e..c138112dd 100644 --- a/snippets/equals.md +++ b/snippets/equals.md @@ -1,9 +1,9 @@ --- title: Check object equality -tags: object,array,type,recursion +type: snippet +tags: [object,array,type,recursion] cover: beach-pineapple -firstSeen: 2018-01-15T18:34:11+02:00 -lastUpdated: 2021-10-13T19:29:39+02:00 +dateModified: 2021-10-13T19:29:39+02:00 --- Performs a deep comparison between two values to determine if they are equivalent. diff --git a/snippets/escape-html.md b/snippets/escape-html.md index 9856fd65f..a9015eeb3 100644 --- a/snippets/escape-html.md +++ b/snippets/escape-html.md @@ -1,9 +1,9 @@ --- title: Escape HTML -tags: string,regexp +type: snippet +tags: [string,regexp] cover: periscope -firstSeen: 2017-12-29T15:09:21+02:00 -lastUpdated: 2021-10-13T19:29:39+02:00 +dateModified: 2021-10-13T19:29:39+02:00 --- Escapes a string for use in HTML. diff --git a/snippets/escape-reg-exp.md b/snippets/escape-reg-exp.md index 72fd48228..e27d556a9 100644 --- a/snippets/escape-reg-exp.md +++ b/snippets/escape-reg-exp.md @@ -1,9 +1,9 @@ --- title: Escape RegExp -tags: string,regexp +type: snippet +tags: [string,regexp] cover: frog-blue-flower -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Escapes a string to use in a regular expression. diff --git a/snippets/euclidean-distance.md b/snippets/euclidean-distance.md index 610812927..6bc808375 100644 --- a/snippets/euclidean-distance.md +++ b/snippets/euclidean-distance.md @@ -1,10 +1,10 @@ --- title: Euclidean distance -tags: math,algorithm +type: snippet +tags: [math,algorithm] author: chalarangelo cover: ancient-greek-building -firstSeen: 2020-12-28T13:41:19+02:00 -lastUpdated: 2020-12-28T13:41:19+02:00 +dateModified: 2020-12-28T13:41:19+02:00 --- Calculates the distance between two points in any number of dimensions. diff --git a/snippets/every-nth.md b/snippets/every-nth.md index b028c5f20..d0a62e9e1 100644 --- a/snippets/every-nth.md +++ b/snippets/every-nth.md @@ -1,9 +1,9 @@ --- title: Every nth element -tags: array +type: snippet +tags: [array] cover: dark-leaves-6 -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-19T18:51:03+03:00 +dateModified: 2020-10-19T18:51:03+03:00 --- Returns every `nth` element in an array. diff --git a/snippets/expand-tabs.md b/snippets/expand-tabs.md index f8aa37144..4da215b19 100644 --- a/snippets/expand-tabs.md +++ b/snippets/expand-tabs.md @@ -1,10 +1,10 @@ --- title: Expand tabs into spaces -tags: string,regexp +type: snippet +tags: [string,regexp] author: chalarangelo cover: houses-rock-sea -firstSeen: 2020-06-01T17:05:39+03:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Convert tabs to spaces, where each tab corresponds to `count` spaces. diff --git a/snippets/extend-hex.md b/snippets/extend-hex.md index d63148a26..e3cac9ac6 100644 --- a/snippets/extend-hex.md +++ b/snippets/extend-hex.md @@ -1,9 +1,9 @@ --- title: Extend hex value -tags: string +type: snippet +tags: [string] cover: red-mountain -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 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 8b7e90076..420a28f87 100644 --- a/snippets/factorial.md +++ b/snippets/factorial.md @@ -1,9 +1,9 @@ --- title: Factorial of number -tags: math,algorithm,recursion +type: snippet +tags: [math,algorithm,recursion] cover: flower-vase -firstSeen: 2017-12-07T14:41:33+02:00 -lastUpdated: 2020-12-28T13:49:24+02:00 +dateModified: 2020-12-28T13:49:24+02:00 --- Calculates the factorial of a number. diff --git a/snippets/fahrenheit-to-celsius.md b/snippets/fahrenheit-to-celsius.md index b3f5690ed..51b5fa7b0 100644 --- a/snippets/fahrenheit-to-celsius.md +++ b/snippets/fahrenheit-to-celsius.md @@ -1,10 +1,10 @@ --- title: Fahrenheit to Celsius -tags: math +type: snippet +tags: [math] unlisted: true cover: last-light -firstSeen: 2020-04-16T11:00:06+03:00 -lastUpdated: 2021-01-04T13:04:15+02:00 +dateModified: 2021-01-04T13:04:15+02:00 --- Converts Fahrenheit to Celsius. diff --git a/snippets/fibonacci.md b/snippets/fibonacci.md index 2aaaf88b6..cfbb1f219 100644 --- a/snippets/fibonacci.md +++ b/snippets/fibonacci.md @@ -1,9 +1,9 @@ --- title: Fibonacci -tags: math,algorithm +type: snippet +tags: [math,algorithm] cover: highlands -firstSeen: 2017-12-17T16:41:31+02:00 -lastUpdated: 2020-12-28T13:49:24+02:00 +dateModified: 2020-12-28T13:49:24+02:00 --- Generates an array, containing the Fibonacci sequence, up until the nth term. diff --git a/snippets/filter-non-unique-by.md b/snippets/filter-non-unique-by.md index 7e1b179ce..1d9171219 100644 --- a/snippets/filter-non-unique-by.md +++ b/snippets/filter-non-unique-by.md @@ -1,9 +1,9 @@ --- title: Filter non-unique array values based on function -tags: array +type: snippet +tags: [array] cover: digital-nomad-16 -firstSeen: 2018-07-18T20:40:53+03:00 -lastUpdated: 2020-11-02T19:40:27+02:00 +dateModified: 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/filter-non-unique.md b/snippets/filter-non-unique.md index 17521d169..2cbe4f09d 100644 --- a/snippets/filter-non-unique.md +++ b/snippets/filter-non-unique.md @@ -1,9 +1,9 @@ --- title: Filter non-unique array values -tags: array +type: snippet +tags: [array] cover: digital-nomad-10 -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-11-02T19:40:45+02:00 +dateModified: 2020-11-02T19:40:45+02:00 --- Creates an array with the non-unique values filtered out. diff --git a/snippets/filter-unique-by.md b/snippets/filter-unique-by.md index 59ed43a8e..61a73ad42 100644 --- a/snippets/filter-unique-by.md +++ b/snippets/filter-unique-by.md @@ -1,9 +1,9 @@ --- title: Filter unique array values based on function -tags: array +type: snippet +tags: [array] cover: washed-ashore -firstSeen: 2020-11-02T19:41:07+02:00 -lastUpdated: 2020-11-02T19:41:07+02:00 +dateModified: 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/filter-unique.md b/snippets/filter-unique.md index 93c5b4a7e..7820661c1 100644 --- a/snippets/filter-unique.md +++ b/snippets/filter-unique.md @@ -1,9 +1,9 @@ --- title: Filter unique array values -tags: array +type: snippet +tags: [array] cover: tulips-and-reeds -firstSeen: 2020-11-02T19:41:00+02:00 -lastUpdated: 2020-11-02T19:41:00+02:00 +dateModified: 2020-11-02T19:41:00+02:00 --- Creates an array with the unique values filtered out. diff --git a/snippets/find-closest-anchor.md b/snippets/find-closest-anchor.md index 088a6e5e8..eca1ab156 100644 --- a/snippets/find-closest-anchor.md +++ b/snippets/find-closest-anchor.md @@ -1,10 +1,10 @@ --- title: Find closest anchor -tags: browser +type: snippet +tags: [browser] author: chalarangelo cover: colorful-lounge -firstSeen: 2021-04-22T08:45:39+03:00 -lastUpdated: 2021-04-22T08:45:39+03:00 +dateModified: 2021-04-22T08:45:39+03:00 --- Finds the anchor node closest to the given `node`, if any. diff --git a/snippets/find-closest-matching-node.md b/snippets/find-closest-matching-node.md index df9fcede4..c834edf55 100644 --- a/snippets/find-closest-matching-node.md +++ b/snippets/find-closest-matching-node.md @@ -1,10 +1,10 @@ --- title: Find closest matching node -tags: browser +type: snippet +tags: [browser] author: chalarangelo cover: flowering-hills -firstSeen: 2021-04-22T08:45:39+03:00 -lastUpdated: 2021-04-22T08:45:39+03:00 +dateModified: 2021-04-22T08:45:39+03:00 --- Finds the closest matching node starting at the given `node`. diff --git a/snippets/find-consecutive.md b/snippets/find-consecutive.md index de786eb57..bd5ed646b 100644 --- a/snippets/find-consecutive.md +++ b/snippets/find-consecutive.md @@ -1,9 +1,10 @@ --- title: Arrays of consecutive elements -tags: array +type: snippet +tags: [array] author: chalarangelo cover: colorful-pots -firstSeen: 2022-04-06T05:00:00-04:00 +dateModified: 2022-04-06T05:00:00-04:00 --- Finds all arrays of consecutive elements. diff --git a/snippets/find-first-n.md b/snippets/find-first-n.md index 6c29617aa..bf5bc3c78 100644 --- a/snippets/find-first-n.md +++ b/snippets/find-first-n.md @@ -1,9 +1,9 @@ --- title: Find first n matches -tags: array +type: snippet +tags: [array] cover: digital-nomad-5 -firstSeen: 2021-05-09T13:31:36+03:00 -lastUpdated: 2021-05-09T13:31:36+03:00 +dateModified: 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/find-key.md b/snippets/find-key.md index 35857428d..b51edd076 100644 --- a/snippets/find-key.md +++ b/snippets/find-key.md @@ -1,9 +1,9 @@ --- title: Find first matching key -tags: object +type: snippet +tags: [object] cover: succulent-crowd -firstSeen: 2018-01-23T18:23:20+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Finds the first key that satisfies the provided testing function. diff --git a/snippets/find-keys.md b/snippets/find-keys.md index bc7c79910..28f2481c1 100644 --- a/snippets/find-keys.md +++ b/snippets/find-keys.md @@ -1,9 +1,9 @@ --- title: Find matching keys -tags: object +type: snippet +tags: [object] cover: beach-riders -firstSeen: 2020-10-25T09:59:13+02:00 -lastUpdated: 2020-11-15T14:43:44+02:00 +dateModified: 2020-11-15T14:43:44+02:00 --- Finds all the keys in the provided object that match the given value. diff --git a/snippets/find-last-index.md b/snippets/find-last-index.md index d1ae4895e..04513bc49 100644 --- a/snippets/find-last-index.md +++ b/snippets/find-last-index.md @@ -1,9 +1,9 @@ --- title: Find last matching index -tags: array +type: snippet +tags: [array] cover: taking-photos -firstSeen: 2018-01-24T13:01:51+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 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/find-last-key.md b/snippets/find-last-key.md index 2d788d95c..46db2cf00 100644 --- a/snippets/find-last-key.md +++ b/snippets/find-last-key.md @@ -1,9 +1,9 @@ --- title: Find last matching key -tags: object +type: snippet +tags: [object] cover: sparkles -firstSeen: 2018-01-23T18:23:20+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Finds the last key that satisfies the provided testing function. diff --git a/snippets/find-last-n.md b/snippets/find-last-n.md index 0a6548aec..09ec364ed 100644 --- a/snippets/find-last-n.md +++ b/snippets/find-last-n.md @@ -1,9 +1,9 @@ --- title: Find last n matches -tags: array +type: snippet +tags: [array] cover: interior-16 -firstSeen: 2021-05-09T13:31:36+03:00 -lastUpdated: 2021-05-09T13:31:36+03:00 +dateModified: 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/find-last.md b/snippets/find-last.md index 258724656..c47489a9c 100644 --- a/snippets/find-last.md +++ b/snippets/find-last.md @@ -1,9 +1,9 @@ --- title: Find last matching value -tags: array +type: snippet +tags: [array] cover: misty-mountains -firstSeen: 2018-01-11T13:51:58+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Finds the last element for which the provided function returns a truthy value. diff --git a/snippets/first-n.md b/snippets/first-n.md index 5098af7b5..b6426cffb 100644 --- a/snippets/first-n.md +++ b/snippets/first-n.md @@ -1,9 +1,10 @@ --- title: First n elements -tags: array +type: snippet +tags: [array] author: chalarangelo cover: digital-nomad-16 -firstSeen: 2022-07-22T05:00:00-04:00 +dateModified: 2022-07-22T05:00:00-04:00 --- Gets the first `n` elements of an array. diff --git a/snippets/flags.md b/snippets/flags.md index abaaa760a..731c7234d 100644 --- a/snippets/flags.md +++ b/snippets/flags.md @@ -1,9 +1,10 @@ --- title: Array to flags object -tags: array,object +type: snippet +tags: [array,object] author: chalarangelo cover: glass-blowing -firstSeen: 2022-04-12T05:00:00-04:00 +dateModified: 2022-04-12T05:00:00-04:00 --- Converts an array of strings into an object mapping to true. diff --git a/snippets/flat-iterator.md b/snippets/flat-iterator.md index ae16e854d..97e4288f6 100644 --- a/snippets/flat-iterator.md +++ b/snippets/flat-iterator.md @@ -1,9 +1,10 @@ --- title: Flat iterator -tags: array,iterator,generator +type: snippet +tags: [array,iterator,generator] author: chalarangelo cover: balloons -firstSeen: 2022-03-09T05:00:00-04:00 +dateModified: 2022-03-09T05:00:00-04:00 --- Creates a generator that iterates over an iterable, flattening nested iterables. diff --git a/snippets/flatten-object.md b/snippets/flatten-object.md index 30b4890af..bb38946e4 100644 --- a/snippets/flatten-object.md +++ b/snippets/flatten-object.md @@ -1,9 +1,9 @@ --- title: Flatten object -tags: object,recursion +type: snippet +tags: [object,recursion] cover: lighthouse -firstSeen: 2018-02-07T11:30:18+02:00 -lastUpdated: 2020-10-19T18:51:03+03:00 +dateModified: 2020-10-19T18:51:03+03:00 --- Flattens an object with the paths for keys. diff --git a/snippets/flatten.md b/snippets/flatten.md index 9e3f5aa6f..ece9058b4 100644 --- a/snippets/flatten.md +++ b/snippets/flatten.md @@ -1,9 +1,9 @@ --- title: Flatten array -tags: array,recursion +type: snippet +tags: [array,recursion] cover: green-plant -firstSeen: 2017-12-17T16:41:31+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Flattens an array up to the specified depth. diff --git a/snippets/flip.md b/snippets/flip.md index 9ee6c5f50..1dacfbe6b 100644 --- a/snippets/flip.md +++ b/snippets/flip.md @@ -1,9 +1,9 @@ --- title: Flip function arguments -tags: function +type: snippet +tags: [function] cover: interior-11 -firstSeen: 2017-12-22T02:42:15+02:00 -lastUpdated: 2021-06-13T13:50:25+03:00 +dateModified: 2021-06-13T13:50:25+03:00 --- Takes a function as an argument, then makes the first argument the last. diff --git a/snippets/for-each-right.md b/snippets/for-each-right.md index 0051f2ca9..85bb44098 100644 --- a/snippets/for-each-right.md +++ b/snippets/for-each-right.md @@ -1,9 +1,9 @@ --- title: Execute function for each array element in reverse -tags: array +type: snippet +tags: [array] cover: interior-6 -firstSeen: 2018-01-09T01:38:50+02:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 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/for-own-right.md b/snippets/for-own-right.md index 4d681188d..4375e8a3c 100644 --- a/snippets/for-own-right.md +++ b/snippets/for-own-right.md @@ -1,9 +1,9 @@ --- title: Iterate over object's own properties in reverse -tags: object +type: snippet +tags: [object] cover: sea-view -firstSeen: 2018-01-18T16:45:56+02:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 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/for-own.md b/snippets/for-own.md index 36cb9e0fe..de72704b8 100644 --- a/snippets/for-own.md +++ b/snippets/for-own.md @@ -1,9 +1,9 @@ --- title: Iterate over object's own properties -tags: object +type: snippet +tags: [object] cover: blank-card -firstSeen: 2018-01-18T16:45:56+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 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/form-to-object.md b/snippets/form-to-object.md index 2a8774569..f20e2e05a 100644 --- a/snippets/form-to-object.md +++ b/snippets/form-to-object.md @@ -1,9 +1,9 @@ --- title: Form to object -tags: browser,object +type: snippet +tags: [browser,object] cover: sail-away-2 -firstSeen: 2019-03-13T14:50:06+02:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 2020-10-19T22:49:51+03:00 --- Encodes a set of form elements as an `object`. diff --git a/snippets/format-duration.md b/snippets/format-duration.md index 669a1c328..10005d51d 100644 --- a/snippets/format-duration.md +++ b/snippets/format-duration.md @@ -1,9 +1,9 @@ --- title: Format duration -tags: date,math,string +type: snippet +tags: [date,math,string] cover: clock -firstSeen: 2018-01-04T09:26:42+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Returns the human-readable format of the given number of milliseconds. diff --git a/snippets/format-number.md b/snippets/format-number.md index 8bebd830d..351167692 100644 --- a/snippets/format-number.md +++ b/snippets/format-number.md @@ -1,9 +1,9 @@ --- title: Format number -tags: string,math +type: snippet +tags: [string,math] cover: laptop-plants -firstSeen: 2020-07-30T11:38:51+03:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Formats a number using the local number format order. diff --git a/snippets/format-seconds.md b/snippets/format-seconds.md index 71930a0d7..a68ac6f27 100644 --- a/snippets/format-seconds.md +++ b/snippets/format-seconds.md @@ -1,9 +1,9 @@ --- title: Number of seconds to ISO format -tags: date,math,string +type: snippet +tags: [date,math,string] cover: rocky-mountains -firstSeen: 2021-05-09T12:44:55+03:00 -lastUpdated: 2021-10-13T19:29:39+02:00 +dateModified: 2021-10-13T19:29:39+02:00 --- Returns the ISO format of the given number of seconds. diff --git a/snippets/frequencies.md b/snippets/frequencies.md index 18f762248..39a3cd510 100644 --- a/snippets/frequencies.md +++ b/snippets/frequencies.md @@ -1,10 +1,10 @@ --- title: Value frequencies -tags: array,object +type: snippet +tags: [array,object] author: chalarangelo cover: tropical-waterfall -firstSeen: 2020-01-03T15:32:35+02:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 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/from-camel-case.md b/snippets/from-camel-case.md index 324357616..41e6cc6dd 100644 --- a/snippets/from-camel-case.md +++ b/snippets/from-camel-case.md @@ -1,9 +1,9 @@ --- title: String from camelcase -tags: string +type: snippet +tags: [string] cover: mountain-lake-cottage -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Converts a string from camelcase. diff --git a/snippets/from-timestamp.md b/snippets/from-timestamp.md index 5071aadfc..9d0fd1a43 100644 --- a/snippets/from-timestamp.md +++ b/snippets/from-timestamp.md @@ -1,9 +1,9 @@ --- title: Date from Unix timestamp -tags: date +type: snippet +tags: [date] cover: number-2 -firstSeen: 2020-10-15T21:57:17+03:00 -lastUpdated: 2020-10-15T21:57:17+03:00 +dateModified: 2020-10-15T21:57:17+03:00 --- Creates a `Date` object from a Unix timestamp. diff --git a/snippets/frozen-set.md b/snippets/frozen-set.md index f6748c173..be0230229 100644 --- a/snippets/frozen-set.md +++ b/snippets/frozen-set.md @@ -1,9 +1,9 @@ --- title: Freeze Set object -tags: array +type: snippet +tags: [array] cover: frozen-globe -firstSeen: 2020-10-11T11:52:48+03:00 -lastUpdated: 2020-10-11T11:52:48+03:00 +dateModified: 2020-10-11T11:52:48+03:00 --- Creates a frozen `Set` object. diff --git a/snippets/fullscreen.md b/snippets/fullscreen.md index 120a3a5f6..00cdccbdb 100644 --- a/snippets/fullscreen.md +++ b/snippets/fullscreen.md @@ -1,9 +1,9 @@ --- title: Toggle fullscreen mode -tags: browser +type: snippet +tags: [browser] cover: antelope -firstSeen: 2020-10-04T16:48:00+03:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 2020-10-19T22:49:51+03:00 --- Opens or closes an element in fullscreen mode. diff --git a/snippets/function-name.md b/snippets/function-name.md index 1ce7ac933..8c51e0749 100644 --- a/snippets/function-name.md +++ b/snippets/function-name.md @@ -1,9 +1,9 @@ --- title: Get function name -tags: function +type: snippet +tags: [function] cover: flower-portrait-5 -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 2020-10-19T22:49:51+03:00 --- Logs the name of a function. diff --git a/snippets/functions.md b/snippets/functions.md index 8d4ec7461..d9ce411f7 100644 --- a/snippets/functions.md +++ b/snippets/functions.md @@ -1,9 +1,9 @@ --- title: Function property names -tags: object,function +type: snippet +tags: [object,function] cover: palm-tree-house -firstSeen: 2018-01-11T21:18:58+02:00 -lastUpdated: 2020-10-20T11:21:07+03:00 +dateModified: 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 578fa4467..8c9edb689 100644 --- a/snippets/gcd.md +++ b/snippets/gcd.md @@ -1,9 +1,9 @@ --- title: Greatest common divisor -tags: math,algorithm,recursion +type: snippet +tags: [math,algorithm,recursion] cover: flower-pond -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-12-29T12:36:50+02:00 +dateModified: 2020-12-29T12:36:50+02:00 --- Calculates the greatest common divisor between two or more numbers/arrays. diff --git a/snippets/generate-items.md b/snippets/generate-items.md index b28301162..8e05f73d3 100644 --- a/snippets/generate-items.md +++ b/snippets/generate-items.md @@ -1,9 +1,9 @@ --- title: Generate items -tags: array,function +type: snippet +tags: [array,function] cover: generator -firstSeen: 2020-10-09T20:41:21+03:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Generates an array with the given amount of items, using the given function. diff --git a/snippets/generate-until.md b/snippets/generate-until.md index 3ccbaf93d..f8d184716 100644 --- a/snippets/generate-until.md +++ b/snippets/generate-until.md @@ -1,9 +1,10 @@ --- title: Generate until condition is met -tags: function,generator +type: snippet +tags: [function,generator] author: chalarangelo cover: type-stamps -firstSeen: 2022-01-21T05:00:00-04:00 +dateModified: 2022-01-21T05:00:00-04:00 --- Creates a generator, that keeps producing new values until the given condition is met. diff --git a/snippets/generate-while.md b/snippets/generate-while.md index 5ee5f20b9..0d7c2e0cd 100644 --- a/snippets/generate-while.md +++ b/snippets/generate-while.md @@ -1,9 +1,10 @@ --- title: Generate while condition is met -tags: function,generator +type: snippet +tags: [function,generator] author: chalarangelo cover: lake-loop -firstSeen: 2022-01-21T05:00:00-04:00 +dateModified: 2022-01-21T05:00:00-04:00 --- Creates a generator, that keeps producing new values as long as the given condition is met. diff --git a/snippets/generator-to-array.md b/snippets/generator-to-array.md index 3ebb0d048..494e390f6 100644 --- a/snippets/generator-to-array.md +++ b/snippets/generator-to-array.md @@ -1,10 +1,10 @@ --- title: Generator to array -tags: function,array,generator +type: snippet +tags: [function,array,generator] author: chalarangelo cover: messy-papers -firstSeen: 2020-12-31T13:22:18+02:00 -lastUpdated: 2020-12-31T13:22:18+02:00 +dateModified: 2020-12-31T13:22:18+02:00 --- Converts the output of a generator function to an array. diff --git a/snippets/geometric-progression.md b/snippets/geometric-progression.md index 474608676..b4c9fc1af 100644 --- a/snippets/geometric-progression.md +++ b/snippets/geometric-progression.md @@ -1,10 +1,10 @@ --- title: Geometric progression -tags: math,algorithm +type: snippet +tags: [math,algorithm] cover: book-chair excerpt: Initializes an array containing the numbers in the specified geometric progression range. -firstSeen: 2018-01-03T09:36:23+02:00 -lastUpdated: 2020-12-28T13:49:24+02:00 +dateModified: 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-ancestors.md b/snippets/get-ancestors.md index 56fa6da9a..33dbc468f 100644 --- a/snippets/get-ancestors.md +++ b/snippets/get-ancestors.md @@ -1,10 +1,10 @@ --- title: Get element ancestors -tags: browser +type: snippet +tags: [browser] author: chalarangelo cover: interior-8 -firstSeen: 2020-10-15T09:28:34+03:00 -lastUpdated: 2021-01-05T22:45:34+02:00 +dateModified: 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/get-base-url.md b/snippets/get-base-url.md index 20ea21fb2..ab93d147f 100644 --- a/snippets/get-base-url.md +++ b/snippets/get-base-url.md @@ -1,10 +1,10 @@ --- title: Get base URL -tags: string,browser,regexp +type: snippet +tags: [string,browser,regexp] author: chalarangelo cover: compass -firstSeen: 2020-05-03T12:20:54+03:00 -lastUpdated: 2021-01-03T20:32:13+02:00 +dateModified: 2021-01-03T20:32:13+02:00 --- Gets the current URL without any parameters or fragment identifiers. diff --git a/snippets/get-cmd-args.md b/snippets/get-cmd-args.md index 3da853f12..e41461f6b 100644 --- a/snippets/get-cmd-args.md +++ b/snippets/get-cmd-args.md @@ -1,9 +1,10 @@ --- title: Command-line arguments -tags: node +type: snippet +tags: [node] author: chalarangelo cover: terminal -firstSeen: 2022-04-26T05:00:00-04:00 +dateModified: 2022-04-26T05:00:00-04:00 --- Gets the command-line arguments passed to a Node.js script. diff --git a/snippets/get-colon-time-from-date.md b/snippets/get-colon-time-from-date.md index 87c6ca3d2..121a469b2 100644 --- a/snippets/get-colon-time-from-date.md +++ b/snippets/get-colon-time-from-date.md @@ -1,9 +1,9 @@ --- title: Get colon time from date -tags: date,string +type: snippet +tags: [date,string] cover: digital-nomad-5 -firstSeen: 2018-01-13T17:14:48+02:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 2020-10-19T22:49:51+03:00 --- Returns a string of the form `HH:MM:SS` from a `Date` object. diff --git a/snippets/get-days-diff-between-dates.md b/snippets/get-days-diff-between-dates.md index c7c2e9819..f7b8a8730 100644 --- a/snippets/get-days-diff-between-dates.md +++ b/snippets/get-days-diff-between-dates.md @@ -1,9 +1,9 @@ --- title: Date difference in days -tags: date +type: snippet +tags: [date] cover: spanish-resort -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2021-04-24T12:42:47+03:00 +dateModified: 2021-04-24T12:42:47+03:00 --- Calculates the difference (in days) between two dates. diff --git a/snippets/get-elements-bigger-than-viewport.md b/snippets/get-elements-bigger-than-viewport.md index 62d70fc3d..62dec054d 100644 --- a/snippets/get-elements-bigger-than-viewport.md +++ b/snippets/get-elements-bigger-than-viewport.md @@ -1,9 +1,9 @@ --- title: Get elements bigger than viewport -tags: browser +type: snippet +tags: [browser] cover: case-study -firstSeen: 2020-10-06T17:41:22+03:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 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/get-hours-diff-between-dates.md b/snippets/get-hours-diff-between-dates.md index 654a5d273..7e65b0725 100644 --- a/snippets/get-hours-diff-between-dates.md +++ b/snippets/get-hours-diff-between-dates.md @@ -1,9 +1,9 @@ --- title: Date difference in hours -tags: date +type: snippet +tags: [date] cover: tram-car-2 -firstSeen: 2021-04-24T12:56:21+03:00 -lastUpdated: 2021-04-24T12:56:21+03:00 +dateModified: 2021-04-24T12:56:21+03:00 --- Calculates the difference (in hours) between two dates. diff --git a/snippets/get-images.md b/snippets/get-images.md index 57ecd6bec..78852f7a5 100644 --- a/snippets/get-images.md +++ b/snippets/get-images.md @@ -1,9 +1,9 @@ --- title: Get all images in element -tags: browser +type: snippet +tags: [browser] cover: portal-timelapse -firstSeen: 2018-10-07T16:24:36+03:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Fetches all images from within an element and puts them into an array. diff --git a/snippets/get-meridiem-suffix-of-integer.md b/snippets/get-meridiem-suffix-of-integer.md index 680609392..315612937 100644 --- a/snippets/get-meridiem-suffix-of-integer.md +++ b/snippets/get-meridiem-suffix-of-integer.md @@ -1,9 +1,9 @@ --- title: Get meridiem suffix of integer -tags: date +type: snippet +tags: [date] cover: dark-leaves-4 -firstSeen: 2018-01-13T17:14:48+02:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 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/get-minutes-diff-between-dates.md b/snippets/get-minutes-diff-between-dates.md index 60d4651da..d8964ed1c 100644 --- a/snippets/get-minutes-diff-between-dates.md +++ b/snippets/get-minutes-diff-between-dates.md @@ -1,9 +1,9 @@ --- title: Date difference in minutes -tags: date +type: snippet +tags: [date] cover: flower-vase -firstSeen: 2021-04-24T12:48:49+03:00 -lastUpdated: 2021-04-24T12:48:49+03:00 +dateModified: 2021-04-24T12:48:49+03:00 --- Calculates the difference (in minutes) between two dates. diff --git a/snippets/get-months-diff-between-dates.md b/snippets/get-months-diff-between-dates.md index ef84d2e3e..7ca23989c 100644 --- a/snippets/get-months-diff-between-dates.md +++ b/snippets/get-months-diff-between-dates.md @@ -1,9 +1,9 @@ --- title: Date difference in months -tags: date +type: snippet +tags: [date] cover: two-flower-vases -firstSeen: 2020-08-07T15:15:26+03:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 2020-10-19T22:49:51+03:00 --- Calculates the difference (in months) between two dates. diff --git a/snippets/get-parents-until.md b/snippets/get-parents-until.md index 18327fc5b..1e6aca590 100644 --- a/snippets/get-parents-until.md +++ b/snippets/get-parents-until.md @@ -1,10 +1,10 @@ --- title: Get parents until element matches selector -tags: browser +type: snippet +tags: [browser] author: chalarangelo cover: colorful-plastic -firstSeen: 2021-01-05T22:47:21+02:00 -lastUpdated: 2021-01-06T13:04:18+02:00 +dateModified: 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/get-protocol.md b/snippets/get-protocol.md index d981714be..234596a79 100644 --- a/snippets/get-protocol.md +++ b/snippets/get-protocol.md @@ -1,9 +1,9 @@ --- title: Current page protocol -tags: browser +type: snippet +tags: [browser] cover: bamboo-lamp -firstSeen: 2020-10-07T01:40:53+03:00 -lastUpdated: 2020-10-20T11:46:23+03:00 +dateModified: 2020-10-20T11:46:23+03:00 --- Gets the protocol being used on the current page. diff --git a/snippets/get-scroll-position.md b/snippets/get-scroll-position.md index d8df97e0e..32bbca438 100644 --- a/snippets/get-scroll-position.md +++ b/snippets/get-scroll-position.md @@ -1,9 +1,9 @@ --- title: Scroll position -tags: browser +type: snippet +tags: [browser] cover: tranquil-lake -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 2020-10-19T22:49:51+03:00 --- Returns the scroll position of the current page. diff --git a/snippets/get-scrollbar-width.md b/snippets/get-scrollbar-width.md index cd773ceac..9bdd0953c 100644 --- a/snippets/get-scrollbar-width.md +++ b/snippets/get-scrollbar-width.md @@ -1,9 +1,10 @@ --- title: Scrollbar width -tags: browser +type: snippet +tags: [browser] cover: violin author: chalarangelo -firstSeen: 2022-07-16T05:00:00-04:00 +dateModified: 2022-07-16T05:00:00-04:00 --- Calculates the width of the window's vertical scrollbar. diff --git a/snippets/get-seconds-diff-between-dates.md b/snippets/get-seconds-diff-between-dates.md index 44aab33f6..d3c134ba8 100644 --- a/snippets/get-seconds-diff-between-dates.md +++ b/snippets/get-seconds-diff-between-dates.md @@ -1,9 +1,9 @@ --- title: Date difference in seconds -tags: date +type: snippet +tags: [date] cover: laptop-journey -firstSeen: 2021-04-24T12:39:48+03:00 -lastUpdated: 2021-04-24T12:39:48+03:00 +dateModified: 2021-04-24T12:39:48+03:00 --- Calculates the difference (in seconds) between two dates. diff --git a/snippets/get-selected-text.md b/snippets/get-selected-text.md index 4162817f4..2df748d94 100644 --- a/snippets/get-selected-text.md +++ b/snippets/get-selected-text.md @@ -1,10 +1,10 @@ --- title: Get selected text -tags: browser +type: snippet +tags: [browser] author: chalarangelo cover: white-tablet-2 -firstSeen: 2020-08-07T15:34:53+03:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 2020-10-19T22:49:51+03:00 --- Gets the currently selected text. diff --git a/snippets/get-siblings.md b/snippets/get-siblings.md index 72bf5ab60..5e57b6484 100644 --- a/snippets/get-siblings.md +++ b/snippets/get-siblings.md @@ -1,10 +1,10 @@ --- title: Array of element's siblings -tags: browser +type: snippet +tags: [browser] author: chalarangelo cover: little-white-flowers -firstSeen: 2020-08-07T15:31:48+03:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 2020-10-19T22:49:51+03:00 --- Returns an array containing all the siblings of the given element. diff --git a/snippets/get-style.md b/snippets/get-style.md index 0101c7042..c986d77b9 100644 --- a/snippets/get-style.md +++ b/snippets/get-style.md @@ -1,9 +1,9 @@ --- title: Get style for element -tags: browser,css +type: snippet +tags: [browser,css] cover: frog-blue-flower -firstSeen: 2017-12-29T00:08:17+02:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 2020-10-19T22:49:51+03:00 --- Retrieves the value of a CSS rule for the specified element. diff --git a/snippets/get-timestamp.md b/snippets/get-timestamp.md index 11eec096a..1df9dd19d 100644 --- a/snippets/get-timestamp.md +++ b/snippets/get-timestamp.md @@ -1,9 +1,9 @@ --- title: Unix timestamp from date -tags: date +type: snippet +tags: [date] cover: interior-14 -firstSeen: 2020-10-08T17:15:56+03:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 2020-10-19T22:49:51+03:00 --- Gets the Unix timestamp from a `Date` object. diff --git a/snippets/get-type.md b/snippets/get-type.md index b24ec5e42..516b05bc5 100644 --- a/snippets/get-type.md +++ b/snippets/get-type.md @@ -1,9 +1,9 @@ --- title: Type of value -tags: type +type: snippet +tags: [type] cover: pink-flowers -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 2020-10-19T22:49:51+03:00 --- Returns the native type of a value. diff --git a/snippets/get-url-parameters.md b/snippets/get-url-parameters.md index b44c467df..e36eb25a1 100644 --- a/snippets/get-url-parameters.md +++ b/snippets/get-url-parameters.md @@ -1,10 +1,10 @@ --- title: URL parameters as object -tags: browser,string,regexp +type: snippet +tags: [browser,string,regexp] author: chalarangelo cover: compass -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Creates an object containing the parameters of the current URL. diff --git a/snippets/get-vertical-offset.md b/snippets/get-vertical-offset.md index a1d197a1d..ffcd58cc7 100644 --- a/snippets/get-vertical-offset.md +++ b/snippets/get-vertical-offset.md @@ -1,10 +1,10 @@ --- title: Vertical offset of element -tags: browser +type: snippet +tags: [browser] author: chalarangelo cover: waves-from-above-2 -firstSeen: 2021-01-05T22:41:09+02:00 -lastUpdated: 2021-01-05T22:41:09+02:00 +dateModified: 2021-01-05T22:41:09+02:00 --- Finds the distance from a given element to the top of the document. diff --git a/snippets/get.md b/snippets/get.md index ed8dd16cb..7fef0cd65 100644 --- a/snippets/get.md +++ b/snippets/get.md @@ -1,9 +1,9 @@ --- title: Get nested object property from path string -tags: object,regexp +type: snippet +tags: [object,regexp] cover: brown-bird -firstSeen: 2018-01-18T17:40:42+02:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 2020-10-19T22:49:51+03:00 --- Retrieves a set of properties indicated by the given selectors from an object. diff --git a/snippets/group-by.md b/snippets/group-by.md index da7a6fa73..069c99356 100644 --- a/snippets/group-by.md +++ b/snippets/group-by.md @@ -1,9 +1,9 @@ --- title: Group array elements -tags: array,object +type: snippet +tags: [array,object] cover: man-cup-laptop -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Groups the elements of an array based on the given function. diff --git a/snippets/hamming-distance.md b/snippets/hamming-distance.md index 94f5ca3cf..4cd23134c 100644 --- a/snippets/hamming-distance.md +++ b/snippets/hamming-distance.md @@ -1,9 +1,9 @@ --- title: Hamming distance -tags: math,algorithm +type: snippet +tags: [math,algorithm] cover: colorful-lounge -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-12-28T13:49:24+02:00 +dateModified: 2020-12-28T13:49:24+02:00 --- Calculates the Hamming distance between two values. diff --git a/snippets/has-class.md b/snippets/has-class.md index fa72a3fc6..1c3a1df06 100644 --- a/snippets/has-class.md +++ b/snippets/has-class.md @@ -1,9 +1,9 @@ --- title: Check if HTML element has class -tags: browser,css +type: snippet +tags: [browser,css] cover: interior -firstSeen: 2017-12-28T23:46:33+02:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 2020-10-19T22:49:51+03:00 --- Checks if the given element has the specified class. diff --git a/snippets/has-decimals.md b/snippets/has-decimals.md index c3d82b95d..206952d9c 100644 --- a/snippets/has-decimals.md +++ b/snippets/has-decimals.md @@ -1,9 +1,10 @@ --- title: Number has decimal digits -tags: math +type: snippet +tags: [math] author: chalarangelo cover: man-cup-laptop -firstSeen: 2022-05-13T05:00:00-04:00 +dateModified: 2022-05-13T05:00:00-04:00 --- Checks if a number has any decimals digits diff --git a/snippets/has-duplicates.md b/snippets/has-duplicates.md index 7860190e3..7a50e5495 100644 --- a/snippets/has-duplicates.md +++ b/snippets/has-duplicates.md @@ -1,9 +1,9 @@ --- title: Check if array has duplicates -tags: array +type: snippet +tags: [array] cover: umbrellas -firstSeen: 2020-10-22T20:23:09+03:00 -lastUpdated: 2020-10-22T20:23:09+03:00 +dateModified: 2020-10-22T20:23:09+03:00 --- Checks if there are duplicate values in a flat array. diff --git a/snippets/has-flags.md b/snippets/has-flags.md index a7b346ff4..e3dede426 100644 --- a/snippets/has-flags.md +++ b/snippets/has-flags.md @@ -1,9 +1,9 @@ --- title: Check if process arguments contain flags -tags: node +type: snippet +tags: [node] cover: white-tablet -firstSeen: 2018-01-01T18:24:43+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Checks if the current process's arguments contain the specified flags. diff --git a/snippets/has-key.md b/snippets/has-key.md index 20b48bf13..bbd98b079 100644 --- a/snippets/has-key.md +++ b/snippets/has-key.md @@ -1,10 +1,10 @@ --- title: Check if object has key -tags: object +type: snippet +tags: [object] author: chalarangelo cover: cloudy-mountaintop -firstSeen: 2019-10-15T15:45:13+03:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 2020-10-19T22:49:51+03:00 --- Checks if the target value exists in a JSON object. diff --git a/snippets/has-many.md b/snippets/has-many.md index ff04275a9..47df2dcc9 100644 --- a/snippets/has-many.md +++ b/snippets/has-many.md @@ -1,9 +1,10 @@ --- title: Check if array has many matches -tags: array +type: snippet +tags: [array] author: chalarangelo cover: interior-2 -firstSeen: 2021-07-11T05:00:00-04:00 +dateModified: 2021-07-11T05:00:00-04:00 --- Checks if an array has more than one value matching the given function. diff --git a/snippets/has-one.md b/snippets/has-one.md index 7368a904a..de45be959 100644 --- a/snippets/has-one.md +++ b/snippets/has-one.md @@ -1,9 +1,10 @@ --- title: Check if array has only one match -tags: array +type: snippet +tags: [array] author: chalarangelo cover: interior-10 -firstSeen: 2021-07-04T05:00:00-04:00 +dateModified: 2021-07-04T05:00:00-04:00 --- Checks if an array has only one value matching the given function. diff --git a/snippets/has-value.md b/snippets/has-value.md index a2c6b4a19..b99816da5 100644 --- a/snippets/has-value.md +++ b/snippets/has-value.md @@ -1,9 +1,10 @@ --- title: Check if object has value -tags: object +type: snippet +tags: [object] author: chalarangelo cover: plant-corner -firstSeen: 2023-04-10T05:00:00-04:00 +dateModified: 2023-04-10T05:00:00-04:00 --- Checks if the target value exists in a JSON object. diff --git a/snippets/hash-browser.md b/snippets/hash-browser.md index 23680b8ce..f026aae30 100644 --- a/snippets/hash-browser.md +++ b/snippets/hash-browser.md @@ -1,9 +1,9 @@ --- title: Calculate SHA-256 hash (browser) -tags: browser,promise +type: snippet +tags: [browser,promise] cover: padlocks -firstSeen: 2018-01-17T14:09:01+02:00 -lastUpdated: 2021-10-13T19:29:39+02:00 +dateModified: 2021-10-13T19:29:39+02:00 --- Creates a hash for a value using the [SHA-256](https://en.wikipedia.org/wiki/SHA-2) algorithm. diff --git a/snippets/hash-node.md b/snippets/hash-node.md index bebbeb1f9..a5a5df5a0 100644 --- a/snippets/hash-node.md +++ b/snippets/hash-node.md @@ -1,9 +1,9 @@ --- title: Calculate SHA-256 hash (Node.js) -tags: node,promise +type: snippet +tags: [node,promise] cover: padlocks -firstSeen: 2018-01-17T14:09:01+02:00 -lastUpdated: 2021-10-13T19:29:39+02:00 +dateModified: 2021-10-13T19:29:39+02:00 --- Creates a hash for a value using the [SHA-256](https://en.wikipedia.org/wiki/SHA-2) algorithm. diff --git a/snippets/have-same-contents.md b/snippets/have-same-contents.md index 2fd4f93b5..3b3ef6633 100644 --- a/snippets/have-same-contents.md +++ b/snippets/have-same-contents.md @@ -1,10 +1,10 @@ --- title: Check if arrays have same contents -tags: array +type: snippet +tags: [array] author: chalarangelo cover: interior-15 -firstSeen: 2020-01-05T21:40:39+02:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 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 f5f869ddb..fcfa9903c 100644 --- a/snippets/head.md +++ b/snippets/head.md @@ -1,9 +1,9 @@ --- title: Head of array -tags: array +type: snippet +tags: [array] cover: clay-pot-horizon -firstSeen: 2017-12-17T16:41:31+02:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 2020-10-19T22:49:51+03:00 --- Returns the head of an array. diff --git a/snippets/heapsort.md b/snippets/heapsort.md index 1f7305dee..628fd1aac 100644 --- a/snippets/heapsort.md +++ b/snippets/heapsort.md @@ -1,10 +1,10 @@ --- title: Heap sort -tags: algorithm,array,recursion +type: snippet +tags: [algorithm,array,recursion] author: chalarangelo cover: building-blocks -firstSeen: 2020-12-28T22:48:09+02:00 -lastUpdated: 2020-12-28T22:48:09+02:00 +dateModified: 2020-12-28T22:48:09+02:00 --- Sorts an array of numbers, using the heapsort algorithm. diff --git a/snippets/hex-to-rgb.md b/snippets/hex-to-rgb.md index e64bc07bb..0636daf57 100644 --- a/snippets/hex-to-rgb.md +++ b/snippets/hex-to-rgb.md @@ -1,9 +1,9 @@ --- title: Hex to RGB -tags: string,math +type: snippet +tags: [string,math] cover: umbrellas -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 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 2aad8cf3e..944fa1b62 100644 --- a/snippets/hide.md +++ b/snippets/hide.md @@ -1,9 +1,9 @@ --- title: Hide elements -tags: browser,css +type: snippet +tags: [browser,css] cover: book-chair -firstSeen: 2017-12-28T23:33:21+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Hides all the elements specified. diff --git a/snippets/hsb-to-rgb.md b/snippets/hsb-to-rgb.md index b064e828c..af062dfc2 100644 --- a/snippets/hsb-to-rgb.md +++ b/snippets/hsb-to-rgb.md @@ -1,9 +1,9 @@ --- title: HSB to RGB -tags: math +type: snippet +tags: [math] cover: houses-rock-sea -firstSeen: 2020-09-18T14:25:07+03:00 -lastUpdated: 2020-09-18T14:25:07+03:00 +dateModified: 2020-09-18T14:25:07+03:00 --- Converts a HSB color tuple to RGB format. diff --git a/snippets/hsl-to-rgb.md b/snippets/hsl-to-rgb.md index e32b02112..62a742a34 100644 --- a/snippets/hsl-to-rgb.md +++ b/snippets/hsl-to-rgb.md @@ -1,9 +1,9 @@ --- title: HSL to RGB -tags: math +type: snippet +tags: [math] cover: maple-leaf-palette -firstSeen: 2020-10-01T23:15:49+03:00 -lastUpdated: 2020-10-04T11:24:27+03:00 +dateModified: 2020-10-04T11:24:27+03:00 --- Converts a HSL color tuple to RGB format. diff --git a/snippets/http-delete.md b/snippets/http-delete.md index 1fa0d725b..036f145e3 100644 --- a/snippets/http-delete.md +++ b/snippets/http-delete.md @@ -1,9 +1,9 @@ --- title: HTTP delete -tags: browser +type: snippet +tags: [browser] cover: beach-from-above -firstSeen: 2020-04-16T11:21:33+03:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 2020-10-19T22:49:51+03:00 --- Makes a `DELETE` request to the passed URL. diff --git a/snippets/http-get.md b/snippets/http-get.md index 5b5be8335..8d4c59f82 100644 --- a/snippets/http-get.md +++ b/snippets/http-get.md @@ -1,9 +1,9 @@ --- title: HTTP get -tags: browser +type: snippet +tags: [browser] cover: boat-port -firstSeen: 2018-01-08T18:21:52+02:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 2020-10-19T22:49:51+03:00 --- Makes a `GET` request to the passed URL. diff --git a/snippets/http-post.md b/snippets/http-post.md index 631965bfa..c5a77d040 100644 --- a/snippets/http-post.md +++ b/snippets/http-post.md @@ -1,9 +1,9 @@ --- title: HTTP post -tags: browser +type: snippet +tags: [browser] cover: boats -firstSeen: 2018-01-08T22:07:02+02:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 2020-10-19T22:49:51+03:00 --- Makes a `POST` request to the passed URL. diff --git a/snippets/http-put.md b/snippets/http-put.md index 7dd241742..490756eca 100644 --- a/snippets/http-put.md +++ b/snippets/http-put.md @@ -1,9 +1,9 @@ --- title: HTTP put -tags: browser +type: snippet +tags: [browser] cover: bridge -firstSeen: 2020-04-16T11:21:33+03:00 -lastUpdated: 2020-10-19T22:49:51+03:00 +dateModified: 2020-10-19T22:49:51+03:00 --- Makes a `PUT` request to the passed URL. diff --git a/snippets/https-redirect.md b/snippets/https-redirect.md index b4db67035..f57d5c27c 100644 --- a/snippets/https-redirect.md +++ b/snippets/https-redirect.md @@ -1,9 +1,9 @@ --- title: Redirect to HTTPS -tags: browser +type: snippet +tags: [browser] cover: blue-lake -firstSeen: 2017-12-21T08:33:56+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 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 97421b72e..0df4f064e 100644 --- a/snippets/hz.md +++ b/snippets/hz.md @@ -1,10 +1,10 @@ --- title: Hertz frequency of function -tags: function +type: snippet +tags: [function] unlisted: true cover: lake-runner -firstSeen: 2018-04-11T16:39:49+03:00 -lastUpdated: 2021-01-04T13:04:15+02:00 +dateModified: 2021-01-04T13:04:15+02:00 --- Measures the number of times a function is executed per second (hz/hertz). diff --git a/snippets/in-range.md b/snippets/in-range.md index 96fb895fd..3a56f9d53 100644 --- a/snippets/in-range.md +++ b/snippets/in-range.md @@ -1,9 +1,9 @@ --- title: Number in range -tags: math +type: snippet +tags: [math] cover: armchair -firstSeen: 2017-12-20T18:33:58+02:00 -lastUpdated: 2020-11-01T20:50:57+02:00 +dateModified: 2020-11-01T20:50:57+02:00 --- Checks if the given number falls within the given range. diff --git a/snippets/includes-all.md b/snippets/includes-all.md index ff74b2afb..42657ffd7 100644 --- a/snippets/includes-all.md +++ b/snippets/includes-all.md @@ -1,9 +1,9 @@ --- title: Check if array includes all values -tags: array +type: snippet +tags: [array] cover: tomatoes -firstSeen: 2019-11-04T21:37:16+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if all the elements in `values` are included in `arr`. diff --git a/snippets/includes-any.md b/snippets/includes-any.md index 4c1836d7a..6f88b3f96 100644 --- a/snippets/includes-any.md +++ b/snippets/includes-any.md @@ -1,9 +1,9 @@ --- title: Check if array includes any values -tags: array +type: snippet +tags: [array] cover: book-stopper -firstSeen: 2019-11-03T23:49:17+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if at least one element of `values` is included in `arr`. diff --git a/snippets/includes-case-insensitive.md b/snippets/includes-case-insensitive.md index 03dfa0889..02ac1c5f0 100644 --- a/snippets/includes-case-insensitive.md +++ b/snippets/includes-case-insensitive.md @@ -1,9 +1,10 @@ --- title: Case-insensitive substring search -tags: string +type: snippet +tags: [string] author: chalarangelo cover: cup-of-orange -firstSeen: 2022-07-28T05:00:00-04:00 +dateModified: 2022-07-28T05:00:00-04:00 --- Checks if a string contains a substring, case-insensitive. diff --git a/snippets/indent-string.md b/snippets/indent-string.md index 7bd83b4f6..0c698c7e9 100644 --- a/snippets/indent-string.md +++ b/snippets/indent-string.md @@ -1,9 +1,9 @@ --- title: Indent string -tags: string +type: snippet +tags: [string] cover: clutter -firstSeen: 2018-09-24T22:14:27+03:00 -lastUpdated: 2020-11-01T20:50:57+02:00 +dateModified: 2020-11-01T20:50:57+02:00 --- Indents each line in the provided string. diff --git a/snippets/index-by.md b/snippets/index-by.md index d9c2319df..a68310819 100644 --- a/snippets/index-by.md +++ b/snippets/index-by.md @@ -1,9 +1,10 @@ --- title: Index array based on function -tags: array,object +type: snippet +tags: [array,object] author: chalarangelo cover: guitar-living-room -firstSeen: 2021-06-20T05:00:00-04:00 +dateModified: 2021-06-20T05:00:00-04:00 --- Creates an object from an array, using a function to map each value to a key. diff --git a/snippets/index-of-all.md b/snippets/index-of-all.md index ab3cea00c..6c381a5d3 100644 --- a/snippets/index-of-all.md +++ b/snippets/index-of-all.md @@ -1,9 +1,9 @@ --- title: Index of all matches -tags: array +type: snippet +tags: [array] cover: jars-on-shelf-2 -firstSeen: 2018-01-06T12:07:56+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Finds all indexes of `val` in an array. diff --git a/snippets/index-of-substrings.md b/snippets/index-of-substrings.md index 9355dad94..90470a428 100644 --- a/snippets/index-of-substrings.md +++ b/snippets/index-of-substrings.md @@ -1,10 +1,10 @@ --- title: Index of substrings -tags: string,algorithm,generator +type: snippet +tags: [string,algorithm,generator] author: chalarangelo cover: violin -firstSeen: 2020-12-31T13:58:51+02:00 -lastUpdated: 2020-12-31T13:58:51+02:00 +dateModified: 2020-12-31T13:58:51+02:00 --- Finds all the indexes of a substring in a given string. diff --git a/snippets/index-on.md b/snippets/index-on.md index 12dd1a03e..49bd08203 100644 --- a/snippets/index-on.md +++ b/snippets/index-on.md @@ -1,9 +1,10 @@ --- title: Array to object based on key -tags: array,object +type: snippet +tags: [array,object] author: chalarangelo cover: lavender-shelf -firstSeen: 2021-06-27T05:00:00-04:00 +dateModified: 2021-06-27T05:00:00-04:00 --- Creates an object from an array, using the specified key and excluding it from each value. diff --git a/snippets/initial.md b/snippets/initial.md index f87f98b2c..a0933b270 100644 --- a/snippets/initial.md +++ b/snippets/initial.md @@ -1,9 +1,9 @@ --- title: Array without last element -tags: array +type: snippet +tags: [array] cover: red-light -firstSeen: 2017-12-17T16:41:31+02:00 -lastUpdated: 2020-11-03T21:46:13+02:00 +dateModified: 2020-11-03T21:46:13+02:00 --- Returns all the elements of an array except the last one. diff --git a/snippets/initialize-array-with-range-right.md b/snippets/initialize-array-with-range-right.md index 127dc8eb3..4305ad485 100644 --- a/snippets/initialize-array-with-range-right.md +++ b/snippets/initialize-array-with-range-right.md @@ -1,9 +1,9 @@ --- title: Initialize array with reversed range -tags: array +type: snippet +tags: [array] cover: interior-4 -firstSeen: 2018-01-16T17:09:39+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 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/initialize-array-with-range.md b/snippets/initialize-array-with-range.md index c53ca297f..deaa349a7 100644 --- a/snippets/initialize-array-with-range.md +++ b/snippets/initialize-array-with-range.md @@ -1,9 +1,9 @@ --- title: Initialize array with range -tags: array +type: snippet +tags: [array] cover: white-flower -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 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/initialize-array-with-values.md b/snippets/initialize-array-with-values.md index 9d9b46cab..c42f5d32c 100644 --- a/snippets/initialize-array-with-values.md +++ b/snippets/initialize-array-with-values.md @@ -1,9 +1,9 @@ --- title: Initialize array with values -tags: array +type: snippet +tags: [array] cover: flower-portrait-1 -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Initializes and fills an array with the specified values. diff --git a/snippets/initialize-nd-array.md b/snippets/initialize-nd-array.md index 786a98883..7cd3ebc5b 100644 --- a/snippets/initialize-nd-array.md +++ b/snippets/initialize-nd-array.md @@ -1,9 +1,9 @@ --- title: Initialize n-dimensional array -tags: array,recursion +type: snippet +tags: [array,recursion] cover: colorful-pots -firstSeen: 2018-04-14T10:52:39+03:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Create a n-dimensional array with given value. diff --git a/snippets/initialize2-d-array.md b/snippets/initialize2-d-array.md index d4d30b539..8f2295ec9 100644 --- a/snippets/initialize2-d-array.md +++ b/snippets/initialize2-d-array.md @@ -1,9 +1,9 @@ --- title: Initialize 2D array -tags: array +type: snippet +tags: [array] cover: cloudy-rock-formation -firstSeen: 2017-12-19T23:38:18+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Initializes a 2D array of given width and height and value. diff --git a/snippets/inject-css.md b/snippets/inject-css.md index 506f75e29..bddb272ea 100644 --- a/snippets/inject-css.md +++ b/snippets/inject-css.md @@ -1,9 +1,9 @@ --- title: Inject CSS -tags: browser,css +type: snippet +tags: [browser,css] cover: dark-leaves-5 -firstSeen: 2020-10-15T22:18:00+03:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Injects the given CSS code into the current document diff --git a/snippets/insert-after.md b/snippets/insert-after.md index 150c59470..b42bbf044 100644 --- a/snippets/insert-after.md +++ b/snippets/insert-after.md @@ -1,9 +1,9 @@ --- title: Insert HTML string after element -tags: browser +type: snippet +tags: [browser] cover: malibu -firstSeen: 2018-06-19T20:57:58+03:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Inserts an HTML string after the end of the specified element. diff --git a/snippets/insert-at.md b/snippets/insert-at.md index 99b47d30c..5bb57592d 100644 --- a/snippets/insert-at.md +++ b/snippets/insert-at.md @@ -1,10 +1,10 @@ --- title: Insert value at array index -tags: array +type: snippet +tags: [array] author: chalarangelo cover: messy-papers -firstSeen: 2020-05-22T09:07:35+03:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Mutates the original array to insert the given values after the specified index. diff --git a/snippets/insert-before.md b/snippets/insert-before.md index 81d4f131f..b377e0c77 100644 --- a/snippets/insert-before.md +++ b/snippets/insert-before.md @@ -1,9 +1,9 @@ --- title: Insert HTML string before element -tags: browser +type: snippet +tags: [browser] cover: engine -firstSeen: 2018-06-19T20:57:58+03:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Inserts an HTML string before the start of the specified element. diff --git a/snippets/insertion-sort.md b/snippets/insertion-sort.md index e63e8c50f..69cb7c500 100644 --- a/snippets/insertion-sort.md +++ b/snippets/insertion-sort.md @@ -1,10 +1,10 @@ --- title: Insertion sort -tags: algorithm,array +type: snippet +tags: [algorithm,array] author: chalarangelo cover: goat-wooden-cottage -firstSeen: 2020-12-28T21:53:53+02:00 -lastUpdated: 2020-12-28T21:53:53+02:00 +dateModified: 2020-12-28T21:53:53+02:00 --- Sorts an array of numbers, using the insertion sort algorithm. diff --git a/snippets/intersection-by.md b/snippets/intersection-by.md index 9b5807f3b..a617fd1d9 100644 --- a/snippets/intersection-by.md +++ b/snippets/intersection-by.md @@ -1,9 +1,9 @@ --- title: Mapped array intersection -tags: array +type: snippet +tags: [array] cover: cobbled-street -firstSeen: 2018-01-24T12:53:18+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 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/intersection-with.md b/snippets/intersection-with.md index 517eb0675..c5481d160 100644 --- a/snippets/intersection-with.md +++ b/snippets/intersection-with.md @@ -1,9 +1,9 @@ --- title: Array intersection based on function -tags: array +type: snippet +tags: [array] cover: digital-nomad-2 -firstSeen: 2018-01-24T12:53:18+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Returns the elements that exist in both arrays, using a provided comparator function. diff --git a/snippets/intersection.md b/snippets/intersection.md index f48a2b0af..5aaa89fba 100644 --- a/snippets/intersection.md +++ b/snippets/intersection.md @@ -1,9 +1,9 @@ --- title: Array intersection -tags: array +type: snippet +tags: [array] cover: red-berries -firstSeen: 2017-12-17T16:41:31+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Returns the elements that exist in both arrays, filtering duplicate values. diff --git a/snippets/intersects.md b/snippets/intersects.md index fe85f1f71..dfeb6b03c 100644 --- a/snippets/intersects.md +++ b/snippets/intersects.md @@ -1,9 +1,10 @@ --- title: Check if two arrays intersect -tags: array +type: snippet +tags: [array] author: chalarangelo cover: interior-5 -firstSeen: 2023-02-17T05:00:00-04:00 +dateModified: 2023-02-17T05:00:00-04:00 --- Determines if two arrays have a common item. diff --git a/snippets/invert-key-values.md b/snippets/invert-key-values.md index 359a7a1f5..7dedff56e 100644 --- a/snippets/invert-key-values.md +++ b/snippets/invert-key-values.md @@ -1,9 +1,9 @@ --- title: Invert object -tags: object +type: snippet +tags: [object] cover: pineapple-on-green -firstSeen: 2018-01-01T17:33:46+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Inverts the key-value pairs of an object, without mutating it. diff --git a/snippets/is-absolute-url.md b/snippets/is-absolute-url.md index 727bda5a7..06a6da3a2 100644 --- a/snippets/is-absolute-url.md +++ b/snippets/is-absolute-url.md @@ -1,9 +1,9 @@ --- title: Check if absolute URL -tags: string,browser,regexp +type: snippet +tags: [string,browser,regexp] cover: coffee-phone-tray-2 -firstSeen: 2017-12-31T14:42:45+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the given string is an absolute URL. diff --git a/snippets/is-after-date.md b/snippets/is-after-date.md index 69a2c9732..b19187b12 100644 --- a/snippets/is-after-date.md +++ b/snippets/is-after-date.md @@ -1,9 +1,9 @@ --- title: Check if date is after another date -tags: date +type: snippet +tags: [date] cover: flower-portrait-4 -firstSeen: 2018-09-29T13:58:38+03:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if a date is after another date. diff --git a/snippets/is-alpha-numeric.md b/snippets/is-alpha-numeric.md index 7a58a0d59..6ea340439 100644 --- a/snippets/is-alpha-numeric.md +++ b/snippets/is-alpha-numeric.md @@ -1,9 +1,9 @@ --- title: String is alphanumeric -tags: string,regexp +type: snippet +tags: [string,regexp] cover: mountain-lake-cottage-2 -firstSeen: 2020-09-06T07:59:16+03:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if a string contains only alphanumeric characters. diff --git a/snippets/is-alpha.md b/snippets/is-alpha.md index af8d9f0e3..ed7d6ab77 100644 --- a/snippets/is-alpha.md +++ b/snippets/is-alpha.md @@ -1,9 +1,9 @@ --- title: String is alpha -tags: string,regexp +type: snippet +tags: [string,regexp] cover: coffee-phone-tray-3 -firstSeen: 2020-12-31T14:01:42+02:00 -lastUpdated: 2020-12-31T14:01:42+02:00 +dateModified: 2020-12-31T14:01:42+02:00 --- Checks if a string contains only alpha characters. diff --git a/snippets/is-anagram.md b/snippets/is-anagram.md index 1947b0135..d481891c1 100644 --- a/snippets/is-anagram.md +++ b/snippets/is-anagram.md @@ -1,9 +1,9 @@ --- title: String is anagram -tags: string,regexp +type: snippet +tags: [string,regexp] cover: new-york -firstSeen: 2018-02-19T15:47:47+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 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/is-array-like.md b/snippets/is-array-like.md index 9d7fdd7bc..5c5c4b8d1 100644 --- a/snippets/is-array-like.md +++ b/snippets/is-array-like.md @@ -1,9 +1,9 @@ --- title: Value is array-like -tags: type,array +type: snippet +tags: [type,array] cover: colorful-plastic -firstSeen: 2017-12-31T14:53:01+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the provided argument is array-like (i.e. is iterable). diff --git a/snippets/is-async-function.md b/snippets/is-async-function.md index 05a3594f8..b5bc01158 100644 --- a/snippets/is-async-function.md +++ b/snippets/is-async-function.md @@ -1,10 +1,10 @@ --- title: Value is async function -tags: type,function +type: snippet +tags: [type,function] author: chalarangelo cover: interior-12 -firstSeen: 2020-08-07T15:41:55+03:00 -lastUpdated: 2020-10-20T11:21:07+03:00 +dateModified: 2020-10-20T11:21:07+03:00 --- Checks if the given argument is an `async` function. diff --git a/snippets/is-before-date.md b/snippets/is-before-date.md index 6905e436e..91d067441 100644 --- a/snippets/is-before-date.md +++ b/snippets/is-before-date.md @@ -1,9 +1,9 @@ --- title: Check if date is before another date -tags: date +type: snippet +tags: [date] cover: flower-portrait-3 -firstSeen: 2018-09-29T13:58:38+03:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if a date is before another date. diff --git a/snippets/is-between-dates.md b/snippets/is-between-dates.md index 1630b4f83..e3fd68f9a 100644 --- a/snippets/is-between-dates.md +++ b/snippets/is-between-dates.md @@ -1,9 +1,9 @@ --- title: Check if date is between two dates -tags: date +type: snippet +tags: [date] cover: flower-portrait-6 -firstSeen: 2020-10-07T20:31:52+03:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if a date is between two other dates. diff --git a/snippets/is-boolean.md b/snippets/is-boolean.md index f6957df93..36bf24d12 100644 --- a/snippets/is-boolean.md +++ b/snippets/is-boolean.md @@ -1,9 +1,9 @@ --- title: Value is boolean -tags: type +type: snippet +tags: [type] cover: book-stopper -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Checks if the given argument is a native boolean element. diff --git a/snippets/is-browser-tab-focused.md b/snippets/is-browser-tab-focused.md index 64a4c6c2b..5bfca7cb5 100644 --- a/snippets/is-browser-tab-focused.md +++ b/snippets/is-browser-tab-focused.md @@ -1,9 +1,9 @@ --- title: Check if browser tab is focused -tags: browser +type: snippet +tags: [browser] cover: overgrown -firstSeen: 2018-04-15T19:18:44+03:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the browser tab of the page is focused. diff --git a/snippets/is-browser.md b/snippets/is-browser.md index a767df85c..f9636af94 100644 --- a/snippets/is-browser.md +++ b/snippets/is-browser.md @@ -1,9 +1,9 @@ --- title: Environment is browser -tags: browser +type: snippet +tags: [browser] cover: travel-mug-3 -firstSeen: 2018-03-19T04:50:55+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 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/is-contained-in.md b/snippets/is-contained-in.md index e127ea8e9..023ed64ff 100644 --- a/snippets/is-contained-in.md +++ b/snippets/is-contained-in.md @@ -1,10 +1,10 @@ --- title: Array is contained in other array -tags: array +type: snippet +tags: [array] author: chalarangelo cover: island-corridor -firstSeen: 2020-01-05T21:40:51+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 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/is-date-valid.md b/snippets/is-date-valid.md index 202f1f444..14a180687 100644 --- a/snippets/is-date-valid.md +++ b/snippets/is-date-valid.md @@ -1,9 +1,9 @@ --- title: Check if date is valid -tags: date +type: snippet +tags: [date] cover: two-cities -firstSeen: 2020-10-08T16:39:23+03:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if a valid date object can be created from the given values. diff --git a/snippets/is-deep-frozen.md b/snippets/is-deep-frozen.md index 8f6d97fc4..db8878941 100644 --- a/snippets/is-deep-frozen.md +++ b/snippets/is-deep-frozen.md @@ -1,9 +1,9 @@ --- title: Check if object is deep frozen -tags: object,recursion +type: snippet +tags: [object,recursion] cover: godray-computer-mug -firstSeen: 2020-09-04T20:20:11+03:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if an object is deeply frozen. diff --git a/snippets/is-disjoint.md b/snippets/is-disjoint.md index ed347e9e3..a79e98009 100644 --- a/snippets/is-disjoint.md +++ b/snippets/is-disjoint.md @@ -1,9 +1,9 @@ --- title: Disjointed iterables -tags: array +type: snippet +tags: [array] cover: interior-9 -firstSeen: 2020-10-11T11:53:01+03:00 -lastUpdated: 2020-10-11T11:53:01+03:00 +dateModified: 2020-10-11T11:53:01+03:00 --- Checks if the two iterables are disjointed (have no common values). diff --git a/snippets/is-divisible.md b/snippets/is-divisible.md index bfd648eac..747dd054b 100644 --- a/snippets/is-divisible.md +++ b/snippets/is-divisible.md @@ -1,9 +1,9 @@ --- title: Number is divisible -tags: math +type: snippet +tags: [math] cover: clutter-2 -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Checks if the first numeric argument is divisible by the second one. diff --git a/snippets/is-duplex-stream.md b/snippets/is-duplex-stream.md index 42faab17c..9ab5e43a9 100644 --- a/snippets/is-duplex-stream.md +++ b/snippets/is-duplex-stream.md @@ -1,9 +1,9 @@ --- title: Stream is duplex -tags: node,type +type: snippet +tags: [node,type] cover: digital-nomad-11 -firstSeen: 2018-10-03T22:16:10+03:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the given argument is a duplex (readable and writable) stream. diff --git a/snippets/is-empty.md b/snippets/is-empty.md index 348927366..662b26f60 100644 --- a/snippets/is-empty.md +++ b/snippets/is-empty.md @@ -1,9 +1,9 @@ --- title: Collection is empty -tags: type,array,object,string +type: snippet +tags: [type,array,object,string] cover: book-chair -firstSeen: 2018-01-23T19:25:17+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 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/is-even.md b/snippets/is-even.md index 56bf61279..6470e66ba 100644 --- a/snippets/is-even.md +++ b/snippets/is-even.md @@ -1,9 +1,9 @@ --- title: Number is even -tags: math +type: snippet +tags: [math] cover: by-the-lighthouse -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the given number is even. diff --git a/snippets/is-function.md b/snippets/is-function.md index 547a8d8b4..e47c0dbaa 100644 --- a/snippets/is-function.md +++ b/snippets/is-function.md @@ -1,9 +1,9 @@ --- title: Value is function -tags: type,function +type: snippet +tags: [type,function] cover: boulder-beach -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Checks if the given argument is a function. diff --git a/snippets/is-generator-function.md b/snippets/is-generator-function.md index e3b6e16f9..9684bf208 100644 --- a/snippets/is-generator-function.md +++ b/snippets/is-generator-function.md @@ -1,10 +1,10 @@ --- title: Value is generator function -tags: type,function +type: snippet +tags: [type,function] author: chalarangelo cover: interior-4 -firstSeen: 2020-08-07T15:40:38+03:00 -lastUpdated: 2020-10-20T11:21:07+03:00 +dateModified: 2020-10-20T11:21:07+03:00 --- Checks if the given argument is a generator function. diff --git a/snippets/is-iso-string.md b/snippets/is-iso-string.md index e5ed50c49..ad6d35519 100644 --- a/snippets/is-iso-string.md +++ b/snippets/is-iso-string.md @@ -1,10 +1,10 @@ --- title: String is ISO formatted date -tags: date +type: snippet +tags: [date] author: chalarangelo cover: perfect-timing -firstSeen: 2020-11-29T12:16:43+02:00 -lastUpdated: 2020-11-29T12:16:43+02:00 +dateModified: 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/is-leap-year.md b/snippets/is-leap-year.md index 15ead593f..d6d0b5aa6 100644 --- a/snippets/is-leap-year.md +++ b/snippets/is-leap-year.md @@ -1,9 +1,9 @@ --- title: Check for leap year -tags: date +type: snippet +tags: [date] cover: flowering-hills -firstSeen: 2020-02-05T14:00:03+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the given `year` is a leap year. diff --git a/snippets/is-local-storage-enabled.md b/snippets/is-local-storage-enabled.md index 4d430af27..53ba98eb9 100644 --- a/snippets/is-local-storage-enabled.md +++ b/snippets/is-local-storage-enabled.md @@ -1,10 +1,10 @@ --- title: Check if localStorage is enabled -tags: browser +type: snippet +tags: [browser] author: chalarangelo cover: guitar-living-room -firstSeen: 2020-12-31T13:13:47+02:00 -lastUpdated: 2020-12-31T13:13:47+02:00 +dateModified: 2020-12-31T13:13:47+02:00 --- Checks if `localStorage` is enabled. diff --git a/snippets/is-lower-case.md b/snippets/is-lower-case.md index a060a2df1..4e6a06df1 100644 --- a/snippets/is-lower-case.md +++ b/snippets/is-lower-case.md @@ -1,9 +1,9 @@ --- title: String is lowercase -tags: string +type: snippet +tags: [string] cover: flower-portrait-7 -firstSeen: 2018-01-06T11:16:05+02:00 -lastUpdated: 2020-10-20T11:21:07+03:00 +dateModified: 2020-10-20T11:21:07+03:00 --- Checks if a string is lower case. diff --git a/snippets/is-negative-zero.md b/snippets/is-negative-zero.md index 31f434445..f2c8e7a4b 100644 --- a/snippets/is-negative-zero.md +++ b/snippets/is-negative-zero.md @@ -1,9 +1,9 @@ --- title: Number is negative zero -tags: math +type: snippet +tags: [math] cover: flower-portrait-8 -firstSeen: 2018-11-12T15:45:36+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the given value is equal to negative zero (`-0`). diff --git a/snippets/is-nil.md b/snippets/is-nil.md index 02d0c6503..ee3c2d80f 100644 --- a/snippets/is-nil.md +++ b/snippets/is-nil.md @@ -1,9 +1,9 @@ --- title: Value is nil -tags: type +type: snippet +tags: [type] cover: river-houses -firstSeen: 2018-01-16T16:50:21+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the specified value is `null` or `undefined`. diff --git a/snippets/is-node.md b/snippets/is-node.md index eaccc9430..c7143167a 100644 --- a/snippets/is-node.md +++ b/snippets/is-node.md @@ -1,9 +1,9 @@ --- title: Environment is Node.js -tags: node +type: snippet +tags: [node] cover: cloudy-rock-formation -firstSeen: 2020-10-12T20:01:21+03:00 -lastUpdated: 2021-04-02T11:45:13+03:00 +dateModified: 2021-04-02T11:45:13+03:00 --- Determines if the current runtime environment is Node.js. diff --git a/snippets/is-null.md b/snippets/is-null.md index 242beb260..da8d28645 100644 --- a/snippets/is-null.md +++ b/snippets/is-null.md @@ -1,9 +1,9 @@ --- title: Value is null -tags: type +type: snippet +tags: [type] cover: broken-screen -firstSeen: 2017-12-31T12:26:19+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the specified value is `null`. diff --git a/snippets/is-number.md b/snippets/is-number.md index ba565597a..11420c6be 100644 --- a/snippets/is-number.md +++ b/snippets/is-number.md @@ -1,9 +1,9 @@ --- title: Value is number -tags: type,math +type: snippet +tags: [type,math] cover: red-petals -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Checks if the given argument is a number. diff --git a/snippets/is-object-like.md b/snippets/is-object-like.md index 5718e2ff7..4cb3d52f5 100644 --- a/snippets/is-object-like.md +++ b/snippets/is-object-like.md @@ -1,9 +1,9 @@ --- title: Value is object-like -tags: type,object +type: snippet +tags: [type,object] cover: orange-flower -firstSeen: 2018-01-23T19:30:03+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Checks if a value is object-like. diff --git a/snippets/is-object.md b/snippets/is-object.md index c6455765c..8fac2723e 100644 --- a/snippets/is-object.md +++ b/snippets/is-object.md @@ -1,9 +1,9 @@ --- title: Value is object -tags: type,object +type: snippet +tags: [type,object] cover: flower-portrait-9 -firstSeen: 2018-01-11T12:24:06+02:00 -lastUpdated: 2021-01-08T00:23:44+02:00 +dateModified: 2021-01-08T00:23:44+02:00 --- Checks if the passed value is an object or not. diff --git a/snippets/is-odd.md b/snippets/is-odd.md index f71e26925..69cd347f7 100644 --- a/snippets/is-odd.md +++ b/snippets/is-odd.md @@ -1,9 +1,9 @@ --- title: Number is odd -tags: math +type: snippet +tags: [math] cover: flower-portrait-5 -firstSeen: 2019-09-25T20:35:06+03:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the given number is odd. diff --git a/snippets/is-plain-object.md b/snippets/is-plain-object.md index 79cbe5a39..c22884c02 100644 --- a/snippets/is-plain-object.md +++ b/snippets/is-plain-object.md @@ -1,9 +1,9 @@ --- title: Value is plain object -tags: type,object +type: snippet +tags: [type,object] cover: yellow-white-mug-1 -firstSeen: 2018-01-19T13:59:12+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the provided value is an object created by the Object constructor. diff --git a/snippets/is-power-of-ten.md b/snippets/is-power-of-ten.md index 6bf2d7985..a0781dbad 100644 --- a/snippets/is-power-of-ten.md +++ b/snippets/is-power-of-ten.md @@ -1,10 +1,10 @@ --- title: Number is power of ten -tags: math +type: snippet +tags: [math] author: chalarangelo cover: boulder-beach -firstSeen: 2021-01-06T22:53:58+02:00 -lastUpdated: 2021-01-06T22:53:58+02:00 +dateModified: 2021-01-06T22:53:58+02:00 --- Checks if the given number is a power of `10`. diff --git a/snippets/is-power-of-two.md b/snippets/is-power-of-two.md index 179500c48..032fb9cf4 100644 --- a/snippets/is-power-of-two.md +++ b/snippets/is-power-of-two.md @@ -1,10 +1,10 @@ --- title: Number is power of two -tags: math +type: snippet +tags: [math] author: chalarangelo cover: flower-portrait-10 -firstSeen: 2019-12-31T13:17:12+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the given number is a power of `2`. diff --git a/snippets/is-prime.md b/snippets/is-prime.md index b187984ba..c13237943 100644 --- a/snippets/is-prime.md +++ b/snippets/is-prime.md @@ -1,9 +1,9 @@ --- title: Number is prime -tags: math,algorithm +type: snippet +tags: [math,algorithm] cover: thread -firstSeen: 2017-12-19T22:35:56+02:00 -lastUpdated: 2021-01-12T19:36:36+02:00 +dateModified: 2021-01-12T19:36:36+02:00 --- Checks if the provided integer is a prime number. diff --git a/snippets/is-primitive.md b/snippets/is-primitive.md index da647817e..33f603ed4 100644 --- a/snippets/is-primitive.md +++ b/snippets/is-primitive.md @@ -1,9 +1,9 @@ --- title: Number is primitive -tags: type +type: snippet +tags: [type] cover: flower-camera -firstSeen: 2017-12-31T12:48:13+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Checks if the passed value is primitive or not. diff --git a/snippets/is-promise-like.md b/snippets/is-promise-like.md index f6423a3fc..1afdc6cef 100644 --- a/snippets/is-promise-like.md +++ b/snippets/is-promise-like.md @@ -1,9 +1,9 @@ --- title: Value is promise-like -tags: type,function,promise +type: snippet +tags: [type,function,promise] cover: digital-nomad-13 -firstSeen: 2017-12-31T14:25:43+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 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/is-readable-stream.md b/snippets/is-readable-stream.md index 77f4fd711..a18f4a8a7 100644 --- a/snippets/is-readable-stream.md +++ b/snippets/is-readable-stream.md @@ -1,9 +1,9 @@ --- title: Stream is readable -tags: node,type +type: snippet +tags: [node,type] cover: working-bee -firstSeen: 2018-10-03T22:16:10+03:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the given argument is a readable stream. diff --git a/snippets/is-same-date.md b/snippets/is-same-date.md index 86a364d22..119bb9d48 100644 --- a/snippets/is-same-date.md +++ b/snippets/is-same-date.md @@ -1,9 +1,9 @@ --- title: Date is same as another date -tags: date +type: snippet +tags: [date] cover: pineapple-at-work -firstSeen: 2018-09-29T13:58:38+03:00 -lastUpdated: 2020-11-03T22:11:18+02:00 +dateModified: 2020-11-03T22:11:18+02:00 --- Checks if a date is the same as another date. diff --git a/snippets/is-same-origin.md b/snippets/is-same-origin.md index c669cd738..2d9862ef9 100644 --- a/snippets/is-same-origin.md +++ b/snippets/is-same-origin.md @@ -1,10 +1,10 @@ --- title: Same-origin URLs -tags: browser +type: snippet +tags: [browser] author: chalarangelo cover: keyboard-tea -firstSeen: 2021-04-22T08:27:41+03:00 -lastUpdated: 2021-04-22T08:27:41+03:00 +dateModified: 2021-04-22T08:27:41+03:00 --- Checks if two URLs are on the same origin. diff --git a/snippets/is-session-storage-enabled.md b/snippets/is-session-storage-enabled.md index 7d1ecf1e0..72a6f3de6 100644 --- a/snippets/is-session-storage-enabled.md +++ b/snippets/is-session-storage-enabled.md @@ -1,10 +1,10 @@ --- title: Check if sessionStorage is enabled -tags: browser +type: snippet +tags: [browser] author: chalarangelo cover: flower-camera -firstSeen: 2020-12-31T13:13:47+02:00 -lastUpdated: 2020-12-31T13:13:47+02:00 +dateModified: 2020-12-31T13:13:47+02:00 --- Checks if `sessionStorage` is enabled. diff --git a/snippets/is-sorted.md b/snippets/is-sorted.md index 638f22e78..6f3c99143 100644 --- a/snippets/is-sorted.md +++ b/snippets/is-sorted.md @@ -1,9 +1,9 @@ --- title: Array is sorted -tags: array +type: snippet +tags: [array] cover: italian-horizon -firstSeen: 2018-01-01T19:30:14+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if a numeric array is sorted. diff --git a/snippets/is-stream.md b/snippets/is-stream.md index 6799e41c1..acee28f4f 100644 --- a/snippets/is-stream.md +++ b/snippets/is-stream.md @@ -1,9 +1,9 @@ --- title: Value is stream -tags: node,type +type: snippet +tags: [node,type] cover: mountain-lake-cottage-2 -firstSeen: 2018-10-01T20:12:19+03:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the given argument is a stream. diff --git a/snippets/is-string.md b/snippets/is-string.md index a6a69de09..1f344db71 100644 --- a/snippets/is-string.md +++ b/snippets/is-string.md @@ -1,9 +1,9 @@ --- title: Value is string -tags: type,string +type: snippet +tags: [type,string] cover: overgrown -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the given argument is a string. diff --git a/snippets/is-symbol.md b/snippets/is-symbol.md index 5934f0871..ed9327d24 100644 --- a/snippets/is-symbol.md +++ b/snippets/is-symbol.md @@ -1,9 +1,9 @@ --- title: Value is symbol -tags: type +type: snippet +tags: [type] cover: naming-conventions -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Checks if the given argument is a symbol. diff --git a/snippets/is-travis-ci.md b/snippets/is-travis-ci.md index 0e52eefd9..cb2c72daa 100644 --- a/snippets/is-travis-ci.md +++ b/snippets/is-travis-ci.md @@ -1,10 +1,10 @@ --- title: Environment is Travis CI -tags: node +type: snippet +tags: [node] unlisted: true cover: succulent-5 -firstSeen: 2018-01-01T17:28:08+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the current environment is [Travis CI](https://travis-ci.org/). diff --git a/snippets/is-undefined.md b/snippets/is-undefined.md index 4f163407c..9d48adbc4 100644 --- a/snippets/is-undefined.md +++ b/snippets/is-undefined.md @@ -1,9 +1,9 @@ --- title: Value is undefined -tags: type +type: snippet +tags: [type] cover: peaches -firstSeen: 2018-01-16T16:50:21+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the specified value is `undefined`. diff --git a/snippets/is-upper-case.md b/snippets/is-upper-case.md index 27b0e9433..6c5420a72 100644 --- a/snippets/is-upper-case.md +++ b/snippets/is-upper-case.md @@ -1,9 +1,9 @@ --- title: String is uppercase -tags: string +type: snippet +tags: [string] cover: flower-portrait-7 -firstSeen: 2018-01-06T11:16:05+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Checks if a string is upper case. diff --git a/snippets/is-valid-json.md b/snippets/is-valid-json.md index 1fb3d260e..f766d4d5c 100644 --- a/snippets/is-valid-json.md +++ b/snippets/is-valid-json.md @@ -1,9 +1,9 @@ --- title: String is valid JSON -tags: type +type: snippet +tags: [type] cover: italian-horizon -firstSeen: 2017-12-31T14:53:01+02:00 -lastUpdated: 2020-10-18T13:49:49+03:00 +dateModified: 2020-10-18T13:49:49+03:00 --- Checks if the provided string is a valid JSON. diff --git a/snippets/is-weekday.md b/snippets/is-weekday.md index 94c4a9c58..b07cbcdb9 100644 --- a/snippets/is-weekday.md +++ b/snippets/is-weekday.md @@ -1,9 +1,9 @@ --- title: Date is weekday -tags: date +type: snippet +tags: [date] cover: typewriter -firstSeen: 2019-07-19T12:12:09+03:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the given date is a weekday. diff --git a/snippets/is-weekend.md b/snippets/is-weekend.md index 91803483d..ffa6308a5 100644 --- a/snippets/is-weekend.md +++ b/snippets/is-weekend.md @@ -1,9 +1,9 @@ --- title: Date is weekend -tags: date +type: snippet +tags: [date] cover: tropical-bike -firstSeen: 2019-07-19T17:07:02+03:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the given date is a weekend. diff --git a/snippets/is-writable-stream.md b/snippets/is-writable-stream.md index 1a1db05d6..7436885d9 100644 --- a/snippets/is-writable-stream.md +++ b/snippets/is-writable-stream.md @@ -1,9 +1,9 @@ --- title: Stream is writable -tags: node,type +type: snippet +tags: [node,type] cover: digital-nomad-3 -firstSeen: 2018-10-03T22:16:10+03:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the given argument is a writable stream. diff --git a/snippets/is.md b/snippets/is.md index a0998d20d..8323bfd3c 100644 --- a/snippets/is.md +++ b/snippets/is.md @@ -1,9 +1,9 @@ --- title: Check if value is of type -tags: type +type: snippet +tags: [type] cover: coffee-phone-tray -firstSeen: 2018-01-17T21:23:46+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Checks if the provided value is of the specified type. diff --git a/snippets/join.md b/snippets/join.md index 277deed0a..9d30a4a50 100644 --- a/snippets/join.md +++ b/snippets/join.md @@ -1,9 +1,9 @@ --- title: Join array into string -tags: array +type: snippet +tags: [array] cover: couch-laptop -firstSeen: 2018-01-01T12:18:40+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Joins all elements of an array into a string and returns this string. diff --git a/snippets/jso-nto-csv.md b/snippets/jso-nto-csv.md index 02772c77b..07a596959 100644 --- a/snippets/jso-nto-csv.md +++ b/snippets/jso-nto-csv.md @@ -1,9 +1,9 @@ --- title: JSON to CSV -tags: array,string,object +type: snippet +tags: [array,string,object] cover: horse-sunset -firstSeen: 2018-07-06T20:25:46+03:00 -lastUpdated: 2021-10-13T19:29:39+02:00 +dateModified: 2021-10-13T19:29:39+02:00 --- Converts an array of objects to a comma-separated values (CSV) string that contains only the `columns` specified. diff --git a/snippets/json-to-file.md b/snippets/json-to-file.md index b4676f6ea..3a975a236 100644 --- a/snippets/json-to-file.md +++ b/snippets/json-to-file.md @@ -1,9 +1,9 @@ --- title: JSON to file -tags: node +type: snippet +tags: [node] cover: travel-mug-3 -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Writes a JSON object to a file. diff --git a/snippets/juxt.md b/snippets/juxt.md index 742ba1aa6..f09e257b4 100644 --- a/snippets/juxt.md +++ b/snippets/juxt.md @@ -1,9 +1,9 @@ --- title: Juxtapose functions -tags: function +type: snippet +tags: [function] cover: colorful-plastic -firstSeen: 2020-05-20T19:58:39+03:00 -lastUpdated: 2020-10-20T23:29:39+03:00 +dateModified: 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/k-means.md b/snippets/k-means.md index dda9dcdd5..a11bd0c45 100644 --- a/snippets/k-means.md +++ b/snippets/k-means.md @@ -1,10 +1,10 @@ --- title: K-means clustering -tags: algorithm,array +type: snippet +tags: [algorithm,array] author: chalarangelo cover: antelope -firstSeen: 2020-12-28T15:38:40+02:00 -lastUpdated: 2020-12-29T16:32:46+02:00 +dateModified: 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/k-nearest-neighbors.md b/snippets/k-nearest-neighbors.md index bf1c92f59..c6c66d421 100644 --- a/snippets/k-nearest-neighbors.md +++ b/snippets/k-nearest-neighbors.md @@ -1,10 +1,10 @@ --- title: K-nearest neighbors -tags: algorithm,array +type: snippet +tags: [algorithm,array] author: chalarangelo cover: building-blocks -firstSeen: 2020-12-28T16:31:43+02:00 -lastUpdated: 2021-10-13T19:29:39+02:00 +dateModified: 2021-10-13T19:29:39+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/km-to-miles.md b/snippets/km-to-miles.md index 94b7d605b..de7ed1164 100644 --- a/snippets/km-to-miles.md +++ b/snippets/km-to-miles.md @@ -1,10 +1,10 @@ --- title: Km to miles -tags: math +type: snippet +tags: [math] unlisted: true cover: succulent-3 -firstSeen: 2020-10-04T00:50:13+03:00 -lastUpdated: 2021-01-04T13:04:15+02:00 +dateModified: 2021-01-04T13:04:15+02:00 --- Converts kilometers to miles. diff --git a/snippets/last-date-of-month.md b/snippets/last-date-of-month.md index 3d1e1a165..89b79881e 100644 --- a/snippets/last-date-of-month.md +++ b/snippets/last-date-of-month.md @@ -1,9 +1,9 @@ --- title: Last date of month -tags: date +type: snippet +tags: [date] cover: polar-bear -firstSeen: 2020-10-09T20:36:54+03:00 -lastUpdated: 2020-10-09T22:01:42+03:00 +dateModified: 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/last-n.md b/snippets/last-n.md index 5395f3a59..d1693ecec 100644 --- a/snippets/last-n.md +++ b/snippets/last-n.md @@ -1,9 +1,10 @@ --- title: Last n elements -tags: array +type: snippet +tags: [array] author: chalarangelo cover: interior-5 -firstSeen: 2022-07-23T05:00:00-04:00 +dateModified: 2022-07-23T05:00:00-04:00 --- Gets the last `n` elements of an array. diff --git a/snippets/last.md b/snippets/last.md index 382e62ad3..ee3a3a96d 100644 --- a/snippets/last.md +++ b/snippets/last.md @@ -1,9 +1,9 @@ --- title: Last array element -tags: array +type: snippet +tags: [array] cover: white-laptop -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-20T23:02:01+03:00 +dateModified: 2020-10-20T23:02:01+03:00 --- Returns the last element in an array. diff --git a/snippets/lcm.md b/snippets/lcm.md index 07a2ce493..c1e568dfd 100644 --- a/snippets/lcm.md +++ b/snippets/lcm.md @@ -1,9 +1,9 @@ --- title: Least common multiple -tags: math,algorithm,recursion +type: snippet +tags: [math,algorithm,recursion] cover: waving-over-lake -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-12-28T13:49:24+02:00 +dateModified: 2020-12-28T13:49:24+02:00 --- Calculates the least common multiple of two or more numbers. diff --git a/snippets/left-substr-generator.md b/snippets/left-substr-generator.md index 1012a3642..56324df5a 100644 --- a/snippets/left-substr-generator.md +++ b/snippets/left-substr-generator.md @@ -1,9 +1,10 @@ --- title: Left substring generator -tags: string,generator +type: snippet +tags: [string,generator] cover: boutique-home-office-1 author: chalarangelo -firstSeen: 2022-07-24T05:00:00-04:00 +dateModified: 2022-07-24T05:00:00-04:00 --- Generates all left substrings of a given string. diff --git a/snippets/levenshtein-distance.md b/snippets/levenshtein-distance.md index 68d80db7d..37f2b67b8 100644 --- a/snippets/levenshtein-distance.md +++ b/snippets/levenshtein-distance.md @@ -1,10 +1,10 @@ --- title: Levenshtein distance -tags: string,algorithm +type: snippet +tags: [string,algorithm] author: chalarangelo cover: armchair -firstSeen: 2020-12-27T19:49:12+02:00 -lastUpdated: 2020-12-29T16:27:50+02:00 +dateModified: 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/linear-search.md b/snippets/linear-search.md index c78274ec3..b8853ad3d 100644 --- a/snippets/linear-search.md +++ b/snippets/linear-search.md @@ -1,9 +1,9 @@ --- title: Linear search -tags: algorithm,array +type: snippet +tags: [algorithm,array] cover: coworking-space -firstSeen: 2020-12-28T12:07:53+02:00 -lastUpdated: 2020-12-28T12:07:53+02:00 +dateModified: 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/listen-once.md b/snippets/listen-once.md index c53530a70..e6c068e30 100644 --- a/snippets/listen-once.md +++ b/snippets/listen-once.md @@ -1,10 +1,10 @@ --- title: Listen for an event only once -tags: browser,event +type: snippet +tags: [browser,event] author: chalarangelo cover: dog-waiting -firstSeen: 2020-06-01T16:58:52+03:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 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/listify.md b/snippets/listify.md index 9da9ff6b7..6063dea38 100644 --- a/snippets/listify.md +++ b/snippets/listify.md @@ -1,9 +1,10 @@ --- title: Map an object to an array -tags: object,array +type: snippet +tags: [object,array] author: chalarangelo cover: metro-arrival -firstSeen: 2023-02-05T05:00:00-04:00 +dateModified: 2023-02-05T05:00:00-04:00 --- Maps an object to an object array, using the provided mapping function. diff --git a/snippets/log-base.md b/snippets/log-base.md index 556934a41..c454b372e 100644 --- a/snippets/log-base.md +++ b/snippets/log-base.md @@ -1,9 +1,9 @@ --- title: Logarithm in specific base -tags: math +type: snippet +tags: [math] cover: yellow-white-mug-2 -firstSeen: 2020-10-07T19:14:30+03:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 2020-10-22T20:23:47+03:00 --- Calculates the logarithm of the given number in the given base. diff --git a/snippets/longest-item.md b/snippets/longest-item.md index 7668fd00a..93395eadb 100644 --- a/snippets/longest-item.md +++ b/snippets/longest-item.md @@ -1,9 +1,9 @@ --- title: Longest item in array -tags: array +type: snippet +tags: [array] cover: interior-14 -firstSeen: 2018-01-08T21:33:47+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 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/lowerize.md b/snippets/lowerize.md index 58456a543..07fa49fbb 100644 --- a/snippets/lowerize.md +++ b/snippets/lowerize.md @@ -1,9 +1,10 @@ --- title: Lowercase object keys -tags: object +type: snippet +tags: [object] author: chalarangelo cover: building-facade -firstSeen: 2023-02-12T05:00:00-04:00 +dateModified: 2023-02-12T05:00:00-04:00 --- Converts all the keys of an object to lower case. diff --git a/snippets/luhn-check.md b/snippets/luhn-check.md index fe657739a..9e844754b 100644 --- a/snippets/luhn-check.md +++ b/snippets/luhn-check.md @@ -1,10 +1,10 @@ --- title: Luhn check -tags: math,algorithm +type: snippet +tags: [math,algorithm] cover: blank-card excerpt: Implements the Luhn Algorithm, used to validate a variety of identification numbers. -firstSeen: 2018-01-03T11:02:35+02:00 -lastUpdated: 2022-01-30T13:37:39+02:00 +dateModified: 2022-01-30T13:37:39+02:00 --- Implements 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/map-consecutive.md b/snippets/map-consecutive.md index ef754de91..0dd70addb 100644 --- a/snippets/map-consecutive.md +++ b/snippets/map-consecutive.md @@ -1,9 +1,10 @@ --- title: Map consecutive elements -tags: array +type: snippet +tags: [array] author: chalarangelo cover: cold-mountains -firstSeen: 2021-08-08T05:00:00-04:00 +dateModified: 2021-08-08T05:00:00-04:00 --- Maps each block of `n` consecutive elements using the given function, `fn`. diff --git a/snippets/map-keys.md b/snippets/map-keys.md index 9d13b1c16..7023a4d4c 100644 --- a/snippets/map-keys.md +++ b/snippets/map-keys.md @@ -1,9 +1,9 @@ --- title: Map object keys -tags: object +type: snippet +tags: [object] cover: rocky-mountains-2 -firstSeen: 2018-01-11T20:33:14+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 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/map-num-range.md b/snippets/map-num-range.md index 83d15df3f..090c3f827 100644 --- a/snippets/map-num-range.md +++ b/snippets/map-num-range.md @@ -1,9 +1,9 @@ --- title: Map number to range -tags: math +type: snippet +tags: [math] cover: clutter -firstSeen: 2019-02-23T12:38:16+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Maps a number from one range to another range. diff --git a/snippets/map-object.md b/snippets/map-object.md index a38c53302..712e26709 100644 --- a/snippets/map-object.md +++ b/snippets/map-object.md @@ -1,9 +1,9 @@ --- title: Map array to object -tags: array,object +type: snippet +tags: [array,object] cover: two-lighthouses -firstSeen: 2017-12-18T12:11:58+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Maps the values of an array to an object using a function. diff --git a/snippets/map-string.md b/snippets/map-string.md index f5a53e459..a50e87392 100644 --- a/snippets/map-string.md +++ b/snippets/map-string.md @@ -1,9 +1,9 @@ --- title: Map string -tags: string +type: snippet +tags: [string] cover: budapest-palace -firstSeen: 2018-07-14T10:59:56+03:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 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/map-to-object.md b/snippets/map-to-object.md index fe1acd260..a6fe96128 100644 --- a/snippets/map-to-object.md +++ b/snippets/map-to-object.md @@ -1,10 +1,11 @@ --- title: Convert Map to object +type: snippet shortTitle: Map to object -tags: object +tags: [object] author: chalarangelo cover: succulent-1 -firstSeen: 2022-06-16T05:00:00-04:00 +dateModified: 2022-06-16T05:00:00-04:00 --- Converts a `Map` to an object. diff --git a/snippets/map-values.md b/snippets/map-values.md index ca4643916..4a63cf5c0 100644 --- a/snippets/map-values.md +++ b/snippets/map-values.md @@ -1,9 +1,9 @@ --- title: Map object values -tags: object +type: snippet +tags: [object] cover: feathers -firstSeen: 2018-01-11T20:33:14+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 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 b9cc068a5..eda0707d3 100644 --- a/snippets/mask.md +++ b/snippets/mask.md @@ -1,9 +1,9 @@ --- title: Mask a value -tags: string +type: snippet +tags: [string] cover: rocky-beach-3 -firstSeen: 2018-01-01T13:02:59+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 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-with.md b/snippets/matches-with.md index e96df4986..70e1cd088 100644 --- a/snippets/matches-with.md +++ b/snippets/matches-with.md @@ -1,9 +1,9 @@ --- title: Matches object properties based on function -tags: object +type: snippet +tags: [object] cover: watermelon-bike -firstSeen: 2018-01-23T20:17:32+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 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/matches.md b/snippets/matches.md index 8c58b9d28..f6103b651 100644 --- a/snippets/matches.md +++ b/snippets/matches.md @@ -1,9 +1,9 @@ --- title: Match object properties -tags: object +type: snippet +tags: [object] cover: two-flower-vases -firstSeen: 2018-01-23T20:17:32+02:00 -lastUpdated: 2020-11-03T22:11:18+02:00 +dateModified: 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/max-by.md b/snippets/max-by.md index 630a88ff1..9b8b502f4 100644 --- a/snippets/max-by.md +++ b/snippets/max-by.md @@ -1,9 +1,9 @@ --- title: Max array value based on function -tags: math,array +type: snippet +tags: [math,array] cover: digital-nomad-4 -firstSeen: 2018-01-11T12:25:54+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 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/max-date.md b/snippets/max-date.md index d29237398..d5af95bac 100644 --- a/snippets/max-date.md +++ b/snippets/max-date.md @@ -1,9 +1,9 @@ --- title: Max date -tags: date +type: snippet +tags: [date] cover: interior-15 -firstSeen: 2018-09-29T13:38:20+03:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Returns the maximum of the given dates. diff --git a/snippets/max-n.md b/snippets/max-n.md index 71200cb85..91daca55d 100644 --- a/snippets/max-n.md +++ b/snippets/max-n.md @@ -1,9 +1,9 @@ --- title: N max elements -tags: math +type: snippet +tags: [math] cover: digital-nomad-15 -firstSeen: 2018-01-03T05:18:29+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Returns the `n` maximum elements from the provided array. diff --git a/snippets/max-subarray.md b/snippets/max-subarray.md index 3d8b5415a..8522149e6 100644 --- a/snippets/max-subarray.md +++ b/snippets/max-subarray.md @@ -1,9 +1,10 @@ --- title: Maximum subarray -tags: algorithm,math,array +type: snippet +tags: [algorithm,math,array] author: chalarangelo cover: work-hard-computer -firstSeen: 2022-09-07T05:00:00-04:00 +dateModified: 2022-09-07T05:00:00-04:00 --- Finds a contiguous subarray with the largest sum within an array of numbers. diff --git a/snippets/median.md b/snippets/median.md index f58e91226..a47999849 100644 --- a/snippets/median.md +++ b/snippets/median.md @@ -1,9 +1,9 @@ --- title: Median -tags: math +type: snippet +tags: [math] cover: old-consoles -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:23:47+03:00 +dateModified: 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 cf8d991b2..7767c1859 100644 --- a/snippets/memoize.md +++ b/snippets/memoize.md @@ -1,9 +1,9 @@ --- title: Memoize function -tags: function +type: snippet +tags: [function] cover: hard-disk -firstSeen: 2017-12-31T13:55:55+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Returns the memoized (cached) function. diff --git a/snippets/merge-sort.md b/snippets/merge-sort.md index 639336d91..c0cfc7372 100644 --- a/snippets/merge-sort.md +++ b/snippets/merge-sort.md @@ -1,9 +1,9 @@ --- title: Merge sort -tags: algorithm,array,recursion +type: snippet +tags: [algorithm,array,recursion] cover: baloons-field -firstSeen: 2020-12-27T22:44:32+02:00 -lastUpdated: 2020-12-27T22:44:32+02:00 +dateModified: 2020-12-27T22:44:32+02:00 --- Sorts an array of numbers, using the merge sort algorithm. diff --git a/snippets/merge-sorted-arrays.md b/snippets/merge-sorted-arrays.md index 53436ccd0..6f419f039 100644 --- a/snippets/merge-sorted-arrays.md +++ b/snippets/merge-sorted-arrays.md @@ -1,9 +1,9 @@ --- title: Merge sorted arrays -tags: array +type: snippet +tags: [array] cover: digital-nomad-6 -firstSeen: 2020-12-27T22:55:37+02:00 -lastUpdated: 2020-12-27T22:55:37+02:00 +dateModified: 2020-12-27T22:55:37+02:00 --- Merges two sorted arrays into one. diff --git a/snippets/merge.md b/snippets/merge.md index 95f910c45..fb378df9e 100644 --- a/snippets/merge.md +++ b/snippets/merge.md @@ -1,9 +1,9 @@ --- title: Merge objects -tags: object,array +type: snippet +tags: [object,array] cover: guitar-living-room -firstSeen: 2018-01-12T14:44:20+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Creates a new object from the combination of two or more objects. diff --git a/snippets/midpoint.md b/snippets/midpoint.md index 74327e641..789b706fe 100644 --- a/snippets/midpoint.md +++ b/snippets/midpoint.md @@ -1,9 +1,9 @@ --- title: Midpoint -tags: math +type: snippet +tags: [math] cover: curve -firstSeen: 2018-11-15T17:49:04+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Calculates the midpoint between two pairs of (x,y) points. diff --git a/snippets/miles-to-km.md b/snippets/miles-to-km.md index 860400a6e..3c3ce4ce0 100644 --- a/snippets/miles-to-km.md +++ b/snippets/miles-to-km.md @@ -1,10 +1,10 @@ --- title: Miles to km -tags: math +type: snippet +tags: [math] unlisted: true cover: succulent-2 -firstSeen: 2020-10-04T00:51:51+03:00 -lastUpdated: 2021-01-04T13:04:15+02:00 +dateModified: 2021-01-04T13:04:15+02:00 --- Converts miles to kilometers. diff --git a/snippets/min-by.md b/snippets/min-by.md index cfdca360a..7eacdd302 100644 --- a/snippets/min-by.md +++ b/snippets/min-by.md @@ -1,9 +1,9 @@ --- title: Min array value based on function -tags: math,array +type: snippet +tags: [math,array] cover: digital-nomad-9 -firstSeen: 2018-01-11T12:25:54+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 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/min-date.md b/snippets/min-date.md index f9f83461e..3b2213ebc 100644 --- a/snippets/min-date.md +++ b/snippets/min-date.md @@ -1,9 +1,9 @@ --- title: Min date -tags: date +type: snippet +tags: [date] cover: interior-2 -firstSeen: 2018-09-29T13:38:20+03:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Returns the minimum of the given dates. diff --git a/snippets/min-n.md b/snippets/min-n.md index 6382cbb73..8f74003ab 100644 --- a/snippets/min-n.md +++ b/snippets/min-n.md @@ -1,9 +1,9 @@ --- title: N min elements -tags: math +type: snippet +tags: [math] cover: digital-nomad-8 -firstSeen: 2018-01-03T05:18:29+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Returns the `n` minimum elements from the provided array. diff --git a/snippets/most-frequent.md b/snippets/most-frequent.md index 7441257b4..d892864f4 100644 --- a/snippets/most-frequent.md +++ b/snippets/most-frequent.md @@ -1,10 +1,10 @@ --- title: Most frequent element in array -tags: array +type: snippet +tags: [array] author: chalarangelo cover: clock -firstSeen: 2020-01-03T15:32:46+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Returns the most frequent element in an array. diff --git a/snippets/most-performant.md b/snippets/most-performant.md index dab83f93f..bfe9075e1 100644 --- a/snippets/most-performant.md +++ b/snippets/most-performant.md @@ -1,9 +1,9 @@ --- title: Most performant function -tags: function +type: snippet +tags: [function] cover: lake-runner -firstSeen: 2018-02-14T13:38:45+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 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 51858eeb9..1d30519a3 100644 --- a/snippets/negate.md +++ b/snippets/negate.md @@ -1,9 +1,9 @@ --- title: Negate predicate -tags: function +type: snippet +tags: [function] cover: blue-bird -firstSeen: 2017-12-24T08:28:52+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Negates a predicate function. diff --git a/snippets/nest.md b/snippets/nest.md index 8b46655ee..73929fa2d 100644 --- a/snippets/nest.md +++ b/snippets/nest.md @@ -1,9 +1,9 @@ --- title: Nest objects -tags: object,recursion +type: snippet +tags: [object,recursion] cover: birds -firstSeen: 2018-02-24T13:49:56+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Nests recursively objects linked to one another in a flat array. diff --git a/snippets/node-list-to-array.md b/snippets/node-list-to-array.md index ad83fecae..9f4b6864f 100644 --- a/snippets/node-list-to-array.md +++ b/snippets/node-list-to-array.md @@ -1,9 +1,9 @@ --- title: NodeList to array -tags: browser,array +type: snippet +tags: [browser,array] cover: colors-mural -firstSeen: 2018-05-06T18:11:21+03:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Converts a `NodeList` to an array. diff --git a/snippets/none.md b/snippets/none.md index 32e40806f..0d94fca63 100644 --- a/snippets/none.md +++ b/snippets/none.md @@ -1,9 +1,9 @@ --- title: Test if all array elements are falsy -tags: array +type: snippet +tags: [array] cover: bug -firstSeen: 2018-02-14T11:46:15+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 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 cfcd029a1..5b198494a 100644 --- a/snippets/nor.md +++ b/snippets/nor.md @@ -1,10 +1,10 @@ --- title: Logical nor -tags: math,logic +type: snippet +tags: [math,logic] unlisted: true cover: succulent-8 -firstSeen: 2021-03-29T21:20:41+03:00 -lastUpdated: 2021-04-02T16:47:15+03:00 +dateModified: 2021-04-02T16:47:15+03:00 --- Checks if none of the arguments are `true`. diff --git a/snippets/normalize-line-endings.md b/snippets/normalize-line-endings.md index bcf4b7565..0f96fe325 100644 --- a/snippets/normalize-line-endings.md +++ b/snippets/normalize-line-endings.md @@ -1,10 +1,10 @@ --- title: Normalize line endings -tags: string,regexp +type: snippet +tags: [string,regexp] author: chalarangelo cover: red-light -firstSeen: 2020-05-04T12:33:13+03:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Normalizes line endings in a string. diff --git a/snippets/not.md b/snippets/not.md index 1403e6519..8b6b84ace 100644 --- a/snippets/not.md +++ b/snippets/not.md @@ -1,10 +1,10 @@ --- title: Logical not -tags: math,logic +type: snippet +tags: [math,logic] unlisted: true cover: succulent-7 -firstSeen: 2020-05-13T11:28:26+03:00 -lastUpdated: 2021-01-04T13:04:15+02:00 +dateModified: 2021-01-04T13:04:15+02:00 --- Returns the logical inverse of the given value. diff --git a/snippets/nth-arg.md b/snippets/nth-arg.md index 40b64b6c2..e06ea5e0c 100644 --- a/snippets/nth-arg.md +++ b/snippets/nth-arg.md @@ -1,9 +1,9 @@ --- title: Nth argument -tags: function +type: snippet +tags: [function] cover: mug-flower-book -firstSeen: 2018-01-23T21:27:37+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Creates a function that gets the argument at index `n`. diff --git a/snippets/nth-element.md b/snippets/nth-element.md index 1a9199cdd..f7ecb16c2 100644 --- a/snippets/nth-element.md +++ b/snippets/nth-element.md @@ -1,9 +1,9 @@ --- title: Nth element -tags: array +type: snippet +tags: [array] cover: laptop-plants -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Returns the nth element of an array. diff --git a/snippets/nth-root.md b/snippets/nth-root.md index d24425f39..c1d523109 100644 --- a/snippets/nth-root.md +++ b/snippets/nth-root.md @@ -1,10 +1,10 @@ --- title: Nth root of number -tags: math +type: snippet +tags: [math] author: chalarangelo cover: tree-roots -firstSeen: 2021-01-06T22:47:48+02:00 -lastUpdated: 2021-01-06T22:47:48+02:00 +dateModified: 2021-01-06T22:47:48+02:00 --- Calculates the nth root of a given number. diff --git a/snippets/object-from-pairs.md b/snippets/object-from-pairs.md index 03bf8ccc4..a3aa96c1e 100644 --- a/snippets/object-from-pairs.md +++ b/snippets/object-from-pairs.md @@ -1,9 +1,9 @@ --- title: Object from pairs -tags: object,array +type: snippet +tags: [object,array] cover: silver-flat-screen -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Creates an object from the given key-value pairs. diff --git a/snippets/object-to-entries.md b/snippets/object-to-entries.md index 8f605459a..d1523cbea 100644 --- a/snippets/object-to-entries.md +++ b/snippets/object-to-entries.md @@ -1,10 +1,10 @@ --- title: Object to entries -tags: object,array +type: snippet +tags: [object,array] author: chalarangelo cover: shapes -firstSeen: 2020-04-16T11:10:13+03:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Creates an array of key-value pair arrays from an object. diff --git a/snippets/object-to-map.md b/snippets/object-to-map.md index c89936546..99a86795e 100644 --- a/snippets/object-to-map.md +++ b/snippets/object-to-map.md @@ -1,10 +1,11 @@ --- title: Convert object to Map +type: snippet shortTitle: Object to Map -tags: object +tags: [object] author: chalarangelo cover: succulent-2 -firstSeen: 2022-06-16T05:00:00-04:00 +dateModified: 2022-06-16T05:00:00-04:00 --- Converts an object to a `Map`. diff --git a/snippets/object-to-pairs.md b/snippets/object-to-pairs.md index 31da5689e..6c71eafb5 100644 --- a/snippets/object-to-pairs.md +++ b/snippets/object-to-pairs.md @@ -1,10 +1,10 @@ --- title: Object to pairs -tags: object,array +type: snippet +tags: [object,array] author: chalarangelo cover: interior-5 -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Creates an array of key-value pair arrays from an object. diff --git a/snippets/object-to-query-string.md b/snippets/object-to-query-string.md index 847ace9af..89ccac1fe 100644 --- a/snippets/object-to-query-string.md +++ b/snippets/object-to-query-string.md @@ -1,9 +1,9 @@ --- title: Object to query string -tags: object +type: snippet +tags: [object] cover: standing-stones -firstSeen: 2019-10-11T23:16:05+03:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 2020-10-22T20:24:04+03:00 --- Generates a query string from the key-value pairs of the given object. diff --git a/snippets/objectify.md b/snippets/objectify.md index 2acc6ba0c..5bae28449 100644 --- a/snippets/objectify.md +++ b/snippets/objectify.md @@ -1,9 +1,10 @@ --- title: Map an array to an object -tags: array,object +type: snippet +tags: [array,object] author: chalarangelo cover: metro-tunnel -firstSeen: 2023-02-04T05:00:00-04:00 +dateModified: 2023-02-04T05:00:00-04:00 --- Maps an object array to an object, using the provided mapping functions. diff --git a/snippets/observe-mutations.md b/snippets/observe-mutations.md index 8675e76d1..e572f4f90 100644 --- a/snippets/observe-mutations.md +++ b/snippets/observe-mutations.md @@ -1,9 +1,9 @@ --- title: Observe element mutations -tags: browser,event +type: snippet +tags: [browser,event] cover: blue-sunrise -firstSeen: 2018-01-13T14:58:52+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 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 27c68a79c..3e741f1ac 100644 --- a/snippets/off.md +++ b/snippets/off.md @@ -1,9 +1,9 @@ --- title: Remove event listener from element -tags: browser,event +type: snippet +tags: [browser,event] cover: mug-flower-book -firstSeen: 2018-01-05T14:33:48+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 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 550061f57..e33f57d7a 100644 --- a/snippets/offset.md +++ b/snippets/offset.md @@ -1,9 +1,9 @@ --- title: Offset array elements -tags: array +type: snippet +tags: [array] cover: interior-10 -firstSeen: 2018-04-10T19:07:50+03:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Moves the specified amount of elements to the end of the array. diff --git a/snippets/omit-by.md b/snippets/omit-by.md index ae9083e00..61c699590 100644 --- a/snippets/omit-by.md +++ b/snippets/omit-by.md @@ -1,9 +1,9 @@ --- title: Omit matching object keys -tags: object +type: snippet +tags: [object] cover: leafy-screens -firstSeen: 2018-01-19T13:23:45+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Creates an object composed of the properties the given function returns falsy for. diff --git a/snippets/omit.md b/snippets/omit.md index 307591448..2e5864905 100644 --- a/snippets/omit.md +++ b/snippets/omit.md @@ -1,9 +1,9 @@ --- title: Omit object keys -tags: object +type: snippet +tags: [object] cover: broken-screen -firstSeen: 2018-01-19T13:14:46+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Omits the key-value pairs corresponding to the given keys from an object. diff --git a/snippets/on-click-outside.md b/snippets/on-click-outside.md index 5365c962e..cd4dc1832 100644 --- a/snippets/on-click-outside.md +++ b/snippets/on-click-outside.md @@ -1,10 +1,10 @@ --- title: Handle click outside -tags: browser,event +type: snippet +tags: [browser,event] author: chalarangelo cover: interior-13 -firstSeen: 2021-01-06T13:57:56+02:00 -lastUpdated: 2021-01-06T13:57:56+02:00 +dateModified: 2021-01-06T13:57:56+02:00 --- Runs the callback whenever the user clicks outside of the specified element. diff --git a/snippets/on-scroll-stop.md b/snippets/on-scroll-stop.md index 0f7ac47a0..3217e5d94 100644 --- a/snippets/on-scroll-stop.md +++ b/snippets/on-scroll-stop.md @@ -1,10 +1,10 @@ --- title: Handle scroll stop -tags: browser,event +type: snippet +tags: [browser,event] author: chalarangelo cover: flower-pond -firstSeen: 2021-01-07T00:31:14+02:00 -lastUpdated: 2021-01-07T00:31:14+02:00 +dateModified: 2021-01-07T00:31:14+02:00 --- Runs the callback whenever the user has stopped scrolling. diff --git a/snippets/on-user-input-change.md b/snippets/on-user-input-change.md index 402a9f56a..b2c70c54c 100644 --- a/snippets/on-user-input-change.md +++ b/snippets/on-user-input-change.md @@ -1,9 +1,9 @@ --- title: Handle user input change -tags: browser,event +type: snippet +tags: [browser,event] cover: digital-nomad-12 -firstSeen: 2017-12-29T17:41:53+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Runs the callback whenever the user input type changes (`mouse` or `touch`). diff --git a/snippets/on.md b/snippets/on.md index f42f18215..586862d58 100644 --- a/snippets/on.md +++ b/snippets/on.md @@ -1,9 +1,9 @@ --- title: Add event listener to element -tags: browser,event +type: snippet +tags: [browser,event] cover: wooden-bowl -firstSeen: 2018-01-05T14:33:48+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 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/once.md b/snippets/once.md index 4e0ecd6f5..ef0b69e87 100644 --- a/snippets/once.md +++ b/snippets/once.md @@ -1,9 +1,9 @@ --- title: Call function once -tags: function +type: snippet +tags: [function] cover: pink-flower-tree -firstSeen: 2018-01-02T00:40:46+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 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 3403a41da..1977e4334 100644 --- a/snippets/or.md +++ b/snippets/or.md @@ -1,10 +1,10 @@ --- title: Logical or -tags: math,logic +type: snippet +tags: [math,logic] unlisted: true cover: succulent-4 -firstSeen: 2020-05-13T11:35:41+03:00 -lastUpdated: 2021-01-04T13:04:15+02:00 +dateModified: 2021-01-04T13:04:15+02:00 --- Checks if at least one of the arguments is `true`. diff --git a/snippets/order-by.md b/snippets/order-by.md index 9b8fb64c4..051dbaeda 100644 --- a/snippets/order-by.md +++ b/snippets/order-by.md @@ -1,9 +1,9 @@ --- title: Order array of objects -tags: object,array +type: snippet +tags: [object,array] cover: volcano-sunset -firstSeen: 2017-12-20T11:33:20+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Sorts an array of objects, ordered by properties and orders. diff --git a/snippets/order-with.md b/snippets/order-with.md index aaedf4234..33a759991 100644 --- a/snippets/order-with.md +++ b/snippets/order-with.md @@ -1,9 +1,9 @@ --- title: Order array of objects based on property order -tags: array,object +type: snippet +tags: [array,object] cover: san-francisco-skyline -firstSeen: 2020-10-04T12:11:10+03:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 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-args.md b/snippets/over-args.md index b438148c1..e87dd8203 100644 --- a/snippets/over-args.md +++ b/snippets/over-args.md @@ -1,9 +1,9 @@ --- title: Transform function arguments -tags: function +type: snippet +tags: [function] cover: flower-shape-sunset -firstSeen: 2018-01-28T14:54:16+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 2020-10-21T21:54:53+03:00 --- Creates a function that invokes the provided function with its arguments transformed. diff --git a/snippets/over.md b/snippets/over.md index 70746a322..4cebbf2be 100644 --- a/snippets/over.md +++ b/snippets/over.md @@ -1,9 +1,9 @@ --- title: Invoke functions on arguments -tags: function +type: snippet +tags: [function] cover: jars-on-shelf -firstSeen: 2018-01-23T21:02:17+02:00 -lastUpdated: 2020-10-21T21:54:53+03:00 +dateModified: 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/pad-number.md b/snippets/pad-number.md index d53c56053..30fa458de 100644 --- a/snippets/pad-number.md +++ b/snippets/pad-number.md @@ -1,9 +1,9 @@ --- title: Pad number -tags: string,math +type: snippet +tags: [string,math] cover: flower-portrait-2 -firstSeen: 2020-10-03T23:31:08+03:00 -lastUpdated: 2020-10-03T23:31:08+03:00 +dateModified: 2020-10-03T23:31:08+03:00 --- Pads a given number to the specified length. diff --git a/snippets/pad.md b/snippets/pad.md index f8aaf89ad..42f54b932 100644 --- a/snippets/pad.md +++ b/snippets/pad.md @@ -1,9 +1,9 @@ --- title: Pad string -tags: string +type: snippet +tags: [string] cover: blue-lake -firstSeen: 2018-02-24T11:51:27+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 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/palindrome.md b/snippets/palindrome.md index 18c0dc503..d74d4d656 100644 --- a/snippets/palindrome.md +++ b/snippets/palindrome.md @@ -1,9 +1,9 @@ --- title: Palindrome -tags: string +type: snippet +tags: [string] cover: bridge-drop -firstSeen: 2017-12-17T16:41:31+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 2020-10-22T20:24:04+03:00 --- Checks if the given string is a palindrome. diff --git a/snippets/parse-cookie.md b/snippets/parse-cookie.md index c5d6a8a2c..89619dd5b 100644 --- a/snippets/parse-cookie.md +++ b/snippets/parse-cookie.md @@ -1,9 +1,9 @@ --- title: Parse cookie -tags: browser,string +type: snippet +tags: [browser,string] cover: three-vases -firstSeen: 2018-01-13T14:19:21+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 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-right.md b/snippets/partial-right.md index 466023c96..9687bb2d1 100644 --- a/snippets/partial-right.md +++ b/snippets/partial-right.md @@ -1,9 +1,9 @@ --- title: Append function arguments -tags: function +type: snippet +tags: [function] cover: jars-on-shelf-2 -firstSeen: 2018-01-24T14:40:16+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 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/partial.md b/snippets/partial.md index 5f0a2bea3..9d4f51280 100644 --- a/snippets/partial.md +++ b/snippets/partial.md @@ -1,9 +1,9 @@ --- title: Prepend function arguments -tags: function +type: snippet +tags: [function] cover: interior-6 -firstSeen: 2018-01-24T14:40:16+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 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/partition-by.md b/snippets/partition-by.md index 01cb1f647..36810e85f 100644 --- a/snippets/partition-by.md +++ b/snippets/partition-by.md @@ -1,9 +1,9 @@ --- title: Partition array -tags: array,object +type: snippet +tags: [array,object] cover: people-on-beach -firstSeen: 2020-05-20T17:48:13+03:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 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/partition.md b/snippets/partition.md index 94a7f54ab..7673f9a00 100644 --- a/snippets/partition.md +++ b/snippets/partition.md @@ -1,9 +1,9 @@ --- title: Partition array in two -tags: array,object +type: snippet +tags: [array,object] cover: sunflowers -firstSeen: 2018-01-08T16:58:23+02:00 -lastUpdated: 2020-11-03T21:46:13+02:00 +dateModified: 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/percentile.md b/snippets/percentile.md index a8809e338..0d549c679 100644 --- a/snippets/percentile.md +++ b/snippets/percentile.md @@ -1,9 +1,9 @@ --- title: Percentile of matches -tags: math +type: snippet +tags: [math] cover: red-berries -firstSeen: 2017-12-13T12:50:16+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 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 d8dcb2b40..29008939d 100644 --- a/snippets/permutations.md +++ b/snippets/permutations.md @@ -1,9 +1,9 @@ --- title: Array permutations -tags: array,algorithm,recursion +type: snippet +tags: [array,algorithm,recursion] cover: body-of-water -firstSeen: 2018-02-19T15:47:47+02:00 -lastUpdated: 2020-12-28T13:49:24+02:00 +dateModified: 2020-12-28T13:49:24+02:00 --- Generates all permutations of an array's elements (contains duplicates). diff --git a/snippets/pick-by.md b/snippets/pick-by.md index 5f8b40c01..1a477efbc 100644 --- a/snippets/pick-by.md +++ b/snippets/pick-by.md @@ -1,9 +1,9 @@ --- title: Pick matching object keys -tags: object +type: snippet +tags: [object] cover: lake-bench -firstSeen: 2018-01-19T13:23:45+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 2020-10-22T20:24:04+03:00 --- Creates an object composed of the properties the given function returns truthy for. diff --git a/snippets/pick.md b/snippets/pick.md index 383672a26..10fb43580 100644 --- a/snippets/pick.md +++ b/snippets/pick.md @@ -1,9 +1,9 @@ --- title: Pick object keys -tags: object +type: snippet +tags: [object] cover: fruit-feast -firstSeen: 2017-12-13T23:51:34+02:00 -lastUpdated: 2020-10-18T14:58:09+03:00 +dateModified: 2020-10-18T14:58:09+03:00 --- Picks the key-value pairs corresponding to the given keys from an object. diff --git a/snippets/pipe-async-functions.md b/snippets/pipe-async-functions.md index 5315b0aa4..f96b14cd6 100644 --- a/snippets/pipe-async-functions.md +++ b/snippets/pipe-async-functions.md @@ -1,9 +1,9 @@ --- title: Pipe async functions -tags: function,promise +type: snippet +tags: [function,promise] cover: new-york-skyline -firstSeen: 2018-01-27T18:17:44+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 2020-10-22T20:24:04+03:00 --- Performs left-to-right function composition for asynchronous functions. diff --git a/snippets/pipe-functions.md b/snippets/pipe-functions.md index 3ee884b2f..3407054c9 100644 --- a/snippets/pipe-functions.md +++ b/snippets/pipe-functions.md @@ -1,9 +1,9 @@ --- title: Pipe functions -tags: function +type: snippet +tags: [function] cover: goat-wooden-cottage -firstSeen: 2017-12-26T19:02:27+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 2020-10-22T20:24:04+03:00 --- Performs left-to-right function composition. diff --git a/snippets/pluck.md b/snippets/pluck.md index 2a2d5389a..7df82f5fb 100644 --- a/snippets/pluck.md +++ b/snippets/pluck.md @@ -1,9 +1,9 @@ --- title: Pluck values from array of objects -tags: array,object +type: snippet +tags: [array,object] cover: birds -firstSeen: 2020-10-18T01:19:37+03:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 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 7d8fa62a4..1c6e3cc5c 100644 --- a/snippets/pluralize.md +++ b/snippets/pluralize.md @@ -1,9 +1,9 @@ --- title: Pluralize string -tags: string +type: snippet +tags: [string] cover: shell-focus -firstSeen: 2018-01-03T13:17:19+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 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 a9d28faf6..c82706f45 100644 --- a/snippets/powerset.md +++ b/snippets/powerset.md @@ -1,9 +1,9 @@ --- title: Powerset -tags: math,algorithm +type: snippet +tags: [math,algorithm] cover: new-plant -firstSeen: 2017-12-07T14:41:33+02:00 -lastUpdated: 2021-09-27T15:27:07+02:00 +dateModified: 2021-09-27T15:27:07+02:00 --- Returns the powerset of a given array of numbers. diff --git a/snippets/prefers-dark-color-scheme.md b/snippets/prefers-dark-color-scheme.md index d25e62a0f..67fa8a22a 100644 --- a/snippets/prefers-dark-color-scheme.md +++ b/snippets/prefers-dark-color-scheme.md @@ -1,10 +1,10 @@ --- title: User prefers dark color scheme -tags: browser +type: snippet +tags: [browser] author: chalarangelo cover: blue-lake -firstSeen: 2020-05-04T12:50:35+03:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 2020-10-22T20:24:04+03:00 --- Checks if the user color scheme preference is `dark`. diff --git a/snippets/prefers-light-color-scheme.md b/snippets/prefers-light-color-scheme.md index cb658fc4e..bce6bf273 100644 --- a/snippets/prefers-light-color-scheme.md +++ b/snippets/prefers-light-color-scheme.md @@ -1,10 +1,10 @@ --- title: User prefers light color scheme -tags: browser +type: snippet +tags: [browser] author: chalarangelo cover: dark-mode -firstSeen: 2020-05-04T12:50:35+03:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 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 739015ada..bb2d5d67b 100644 --- a/snippets/prefix.md +++ b/snippets/prefix.md @@ -1,9 +1,9 @@ --- title: Prefix CSS property -tags: browser +type: snippet +tags: [browser] cover: cancel-typographer -firstSeen: 2018-03-08T15:22:54+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 2020-10-22T20:24:04+03:00 --- Prefixes a CSS property based on the current browser. diff --git a/snippets/pretty-bytes.md b/snippets/pretty-bytes.md index 8c5d3d5ed..6b12cea2c 100644 --- a/snippets/pretty-bytes.md +++ b/snippets/pretty-bytes.md @@ -1,9 +1,9 @@ --- title: Pretty-print number of bytes -tags: string,math +type: snippet +tags: [string,math] cover: digital-nomad -firstSeen: 2018-01-01T18:20:09+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 2020-10-22T20:24:04+03:00 --- Converts a number in bytes to a human-readable string. diff --git a/snippets/prime-factors.md b/snippets/prime-factors.md index d7a12ec43..fbb29fcfd 100644 --- a/snippets/prime-factors.md +++ b/snippets/prime-factors.md @@ -1,9 +1,9 @@ --- title: Prime factors of number -tags: math,algorithm +type: snippet +tags: [math,algorithm] cover: dark-leaves-3 -firstSeen: 2020-12-28T13:11:01+02:00 -lastUpdated: 2020-12-28T13:11:01+02:00 +dateModified: 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 0fb40e927..fd3e087fe 100644 --- a/snippets/primes.md +++ b/snippets/primes.md @@ -1,9 +1,9 @@ --- title: Primes up to given number -tags: math,algorithm +type: snippet +tags: [math,algorithm] cover: apples -firstSeen: 2017-12-21T12:20:22+02:00 -lastUpdated: 2020-12-28T13:49:24+02:00 +dateModified: 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 60e58c1ef..1ccad8035 100644 --- a/snippets/prod.md +++ b/snippets/prod.md @@ -1,9 +1,9 @@ --- title: Product of numeric values -tags: math +type: snippet +tags: [math] cover: travel-mug-1 -firstSeen: 2020-10-15T21:56:51+03:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 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 8352d951b..e7ba466f8 100644 --- a/snippets/promisify.md +++ b/snippets/promisify.md @@ -1,9 +1,9 @@ --- title: Promisify function -tags: function,promise +type: snippet +tags: [function,promise] cover: duck-plants -firstSeen: 2017-12-13T12:27:43+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 2020-10-22T20:24:04+03:00 --- Converts an asynchronous function to return a promise. diff --git a/snippets/pull-at-index.md b/snippets/pull-at-index.md index 2e7d3cac1..36329c9e3 100644 --- a/snippets/pull-at-index.md +++ b/snippets/pull-at-index.md @@ -1,9 +1,9 @@ --- title: Pull values from array at index -tags: array +type: snippet +tags: [array] cover: bug -firstSeen: 2017-12-19T00:42:47+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 2020-10-22T20:24:04+03:00 --- Mutates the original array to filter out the values at the specified indexes. diff --git a/snippets/pull-at-value.md b/snippets/pull-at-value.md index addb482ac..dd9614d9c 100644 --- a/snippets/pull-at-value.md +++ b/snippets/pull-at-value.md @@ -1,9 +1,9 @@ --- title: Pull matching values from array -tags: array +type: snippet +tags: [array] cover: light-leaves -firstSeen: 2017-12-19T08:06:29+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 2020-10-22T20:24:04+03:00 --- Mutates the original array to filter out the values specified. diff --git a/snippets/pull-by.md b/snippets/pull-by.md index 0ea408f99..a03bb3e64 100644 --- a/snippets/pull-by.md +++ b/snippets/pull-by.md @@ -1,9 +1,9 @@ --- title: Pull values from array based on function -tags: array +type: snippet +tags: [array] cover: fishermen -firstSeen: 2018-01-26T13:48:50+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 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/pull.md b/snippets/pull.md index cb49dcaf9..299db56d8 100644 --- a/snippets/pull.md +++ b/snippets/pull.md @@ -1,9 +1,9 @@ --- title: Pull values from array -tags: array +type: snippet +tags: [array] cover: last-light -firstSeen: 2017-12-17T16:41:31+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 2020-10-22T20:24:04+03:00 --- Mutates the original array to filter out the values specified. diff --git a/snippets/quarter-of-year.md b/snippets/quarter-of-year.md index 9779b9ad5..4c237aff2 100644 --- a/snippets/quarter-of-year.md +++ b/snippets/quarter-of-year.md @@ -1,9 +1,9 @@ --- title: Quarter of year -tags: date +type: snippet +tags: [date] cover: fallen-leaves -firstSeen: 2020-10-09T10:23:55+03:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 2020-10-22T20:24:04+03:00 --- Returns the quarter and year to which the supplied date belongs to. diff --git a/snippets/query-string-to-object.md b/snippets/query-string-to-object.md index f1a9f356e..350340f98 100644 --- a/snippets/query-string-to-object.md +++ b/snippets/query-string-to-object.md @@ -1,9 +1,9 @@ --- title: Query string to object -tags: object +type: snippet +tags: [object] cover: dark-mode -firstSeen: 2020-10-20T20:25:32+03:00 -lastUpdated: 2020-11-03T22:11:18+02:00 +dateModified: 2020-11-03T22:11:18+02:00 --- Generates an object from the given query string or URL. diff --git a/snippets/quick-sort.md b/snippets/quick-sort.md index 8bb1b744a..0bde5aa62 100644 --- a/snippets/quick-sort.md +++ b/snippets/quick-sort.md @@ -1,9 +1,9 @@ --- title: Quick sort -tags: algorithm,array,recursion +type: snippet +tags: [algorithm,array,recursion] cover: eagle -firstSeen: 2017-12-28T13:42:41+02:00 -lastUpdated: 2021-10-13T19:29:39+02:00 +dateModified: 2021-10-13T19:29:39+02:00 --- Sorts an array of numbers, using the quicksort algorithm. diff --git a/snippets/rads-to-degrees.md b/snippets/rads-to-degrees.md index 195cee64d..435600f76 100644 --- a/snippets/rads-to-degrees.md +++ b/snippets/rads-to-degrees.md @@ -1,9 +1,9 @@ --- title: Radians to degrees -tags: math +type: snippet +tags: [math] cover: flower-portrait-6 -firstSeen: 2018-02-14T12:24:50+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Converts an angle from radians to degrees. diff --git a/snippets/random-alpha-numeric.md b/snippets/random-alpha-numeric.md index fc3f4aed5..1a6390b83 100644 --- a/snippets/random-alpha-numeric.md +++ b/snippets/random-alpha-numeric.md @@ -1,9 +1,9 @@ --- title: Random alphanumeric string -tags: string,random +type: snippet +tags: [string,random] cover: interior-5 -firstSeen: 2020-10-06T18:33:29+03:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 2020-10-22T20:24:04+03:00 --- Generates a random string with the specified length. diff --git a/snippets/random-boolean.md b/snippets/random-boolean.md index 5e0e554bd..f2db1a476 100644 --- a/snippets/random-boolean.md +++ b/snippets/random-boolean.md @@ -1,10 +1,10 @@ --- title: Random boolean value -tags: math,random +type: snippet +tags: [math,random] author: chalarangelo cover: malibu -firstSeen: 2021-01-20T16:20:08+02:00 -lastUpdated: 2021-01-20T16:20:08+02:00 +dateModified: 2021-01-20T16:20:08+02:00 --- Generates a random boolean value. diff --git a/snippets/random-gauss.md b/snippets/random-gauss.md index 4cc8025f9..c8ae44e71 100644 --- a/snippets/random-gauss.md +++ b/snippets/random-gauss.md @@ -1,9 +1,10 @@ --- title: Generate Gaussian random numbers -tags: math,random +type: snippet +tags: [math,random] cover: chess-pawns author: chalarangelo -firstSeen: 2023-04-03T05:00:00-04:00 +dateModified: 2023-04-03T05:00:00-04:00 --- Generates Gaussian (normally distributed) random numbers. diff --git a/snippets/random-hex-color-code.md b/snippets/random-hex-color-code.md index 7d50de95e..b983dbb1e 100644 --- a/snippets/random-hex-color-code.md +++ b/snippets/random-hex-color-code.md @@ -1,9 +1,9 @@ --- title: Random hex color code -tags: math,random +type: snippet +tags: [math,random] cover: feathers -firstSeen: 2017-12-24T14:39:21+02:00 -lastUpdated: 2021-01-08T00:23:44+02:00 +dateModified: 2021-01-08T00:23:44+02:00 --- Generates a random hexadecimal color code. diff --git a/snippets/random-int-array-in-range.md b/snippets/random-int-array-in-range.md index 6751676b4..fe15448ff 100644 --- a/snippets/random-int-array-in-range.md +++ b/snippets/random-int-array-in-range.md @@ -1,9 +1,9 @@ --- title: Random integer array in range -tags: math,random +type: snippet +tags: [math,random] cover: digital-nomad-11 -firstSeen: 2018-01-15T13:25:18+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 2020-10-22T20:24:04+03:00 --- Generates an array of `n` random integers in the specified range. diff --git a/snippets/random-integer-in-range.md b/snippets/random-integer-in-range.md index 6432107c9..54945a023 100644 --- a/snippets/random-integer-in-range.md +++ b/snippets/random-integer-in-range.md @@ -1,9 +1,9 @@ --- title: Random integer in range -tags: math,random +type: snippet +tags: [math,random] cover: painters-desk -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 2020-10-22T20:24:04+03:00 --- Generates a random integer in the specified range. diff --git a/snippets/random-number-in-range.md b/snippets/random-number-in-range.md index d5dd38bdd..79fde3cc9 100644 --- a/snippets/random-number-in-range.md +++ b/snippets/random-number-in-range.md @@ -1,9 +1,9 @@ --- title: Random number in range -tags: math,random +type: snippet +tags: [math,random] cover: white-laptop -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 2020-10-22T20:24:04+03:00 --- Generates a random number in the specified range. diff --git a/snippets/range-generator.md b/snippets/range-generator.md index a9ff5b11b..723290bcc 100644 --- a/snippets/range-generator.md +++ b/snippets/range-generator.md @@ -1,10 +1,10 @@ --- title: Range generator -tags: function,generator +type: snippet +tags: [function,generator] author: chalarangelo cover: dark-leaves-6 -firstSeen: 2020-10-11T17:05:55+03:00 -lastUpdated: 2020-10-11T17:05:55+03:00 +dateModified: 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/ranking.md b/snippets/ranking.md index 24910f130..aa64e202e 100644 --- a/snippets/ranking.md +++ b/snippets/ranking.md @@ -1,9 +1,10 @@ --- title: Array ranking -tags: array,math +type: snippet +tags: [array,math] author: chalarangelo cover: eagle -firstSeen: 2022-04-13T05:00:00-04:00 +dateModified: 2022-04-13T05:00:00-04:00 --- Calculates the ranking of an array based on a comparator function. diff --git a/snippets/read-file-lines.md b/snippets/read-file-lines.md index e35b9cee3..675a260d8 100644 --- a/snippets/read-file-lines.md +++ b/snippets/read-file-lines.md @@ -1,9 +1,9 @@ --- title: Read file lines -tags: node +type: snippet +tags: [node] cover: solitude-beach -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 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 f5e42951e..3ff2dea92 100644 --- a/snippets/rearg.md +++ b/snippets/rearg.md @@ -1,9 +1,9 @@ --- title: Rearrange function arguments -tags: function +type: snippet +tags: [function] cover: island-corridor -firstSeen: 2018-01-28T15:04:21+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 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/record-animation-frames.md b/snippets/record-animation-frames.md index 8af9e0867..ebaa98b75 100644 --- a/snippets/record-animation-frames.md +++ b/snippets/record-animation-frames.md @@ -1,9 +1,9 @@ --- title: Record animation frames -tags: browser,recursion +type: snippet +tags: [browser,recursion] cover: curve -firstSeen: 2018-02-28T08:19:07+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 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 122b99df9..24b0da81a 100644 --- a/snippets/redirect.md +++ b/snippets/redirect.md @@ -1,9 +1,9 @@ --- title: Redirect to URL -tags: browser +type: snippet +tags: [browser] cover: coffee-phone-tray-2 -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-20T11:46:23+03:00 +dateModified: 2020-10-20T11:46:23+03:00 --- Redirects to a specified URL. diff --git a/snippets/reduce-successive.md b/snippets/reduce-successive.md index ad918e48e..d01e0f062 100644 --- a/snippets/reduce-successive.md +++ b/snippets/reduce-successive.md @@ -1,9 +1,9 @@ --- title: Array of successive values -tags: array +type: snippet +tags: [array] cover: laptop-view -firstSeen: 2018-01-24T16:38:08+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 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/reduce-which.md b/snippets/reduce-which.md index 5602b57f8..ca95eede4 100644 --- a/snippets/reduce-which.md +++ b/snippets/reduce-which.md @@ -1,9 +1,9 @@ --- title: Min and max of array based on provided function -tags: array +type: snippet +tags: [array] cover: orange-coffee -firstSeen: 2018-01-24T12:41:03+02:00 -lastUpdated: 2020-11-03T22:11:18+02:00 +dateModified: 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/reduced-filter.md b/snippets/reduced-filter.md index b618e0815..07b6e6320 100644 --- a/snippets/reduced-filter.md +++ b/snippets/reduced-filter.md @@ -1,9 +1,9 @@ --- title: Filter matching and unspecified values -tags: array +type: snippet +tags: [array] cover: little-bird -firstSeen: 2017-12-22T09:37:36+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 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 b0ce84558..cf6ed7682 100644 --- a/snippets/reject.md +++ b/snippets/reject.md @@ -1,9 +1,9 @@ --- title: Reject non-matching values -tags: array +type: snippet +tags: [array] cover: interior-7 -firstSeen: 2018-04-27T03:17:15+03:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 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-accents.md b/snippets/remove-accents.md index 88da906ce..34b0caf97 100644 --- a/snippets/remove-accents.md +++ b/snippets/remove-accents.md @@ -1,9 +1,9 @@ --- title: Remove accents -tags: string +type: snippet +tags: [string] cover: pink-flowers -firstSeen: 2020-10-04T02:23:40+03:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 2020-10-22T20:24:04+03:00 --- Removes accents from strings. diff --git a/snippets/remove-attributes.md b/snippets/remove-attributes.md index aff359e06..7f42376bd 100644 --- a/snippets/remove-attributes.md +++ b/snippets/remove-attributes.md @@ -1,9 +1,10 @@ --- title: Remove attributes -tags: browser +type: snippet +tags: [browser] cover: new-york author: chalarangelo -firstSeen: 2022-07-20T05:00:00-04:00 +dateModified: 2022-07-20T05:00:00-04:00 --- Removes all attributes from an HTML element. diff --git a/snippets/remove-class.md b/snippets/remove-class.md index 6574a378f..f71753533 100644 --- a/snippets/remove-class.md +++ b/snippets/remove-class.md @@ -1,10 +1,10 @@ --- title: Remove class from HTML element -tags: browser +type: snippet +tags: [browser] author: chalarangelo cover: bag-waiting -firstSeen: 2020-12-30T19:21:15+02:00 -lastUpdated: 2020-12-30T19:21:15+02:00 +dateModified: 2020-12-30T19:21:15+02:00 --- Removes a class from an HTML element. diff --git a/snippets/remove-element.md b/snippets/remove-element.md index 1b9feb8bc..b13f08cac 100644 --- a/snippets/remove-element.md +++ b/snippets/remove-element.md @@ -1,10 +1,10 @@ --- title: Remove DOM element -tags: browser +type: snippet +tags: [browser] author: chalarangelo cover: by-the-lighthouse -firstSeen: 2021-01-07T00:20:34+02:00 -lastUpdated: 2021-01-07T00:20:34+02:00 +dateModified: 2021-01-07T00:20:34+02:00 --- Removes an element from the DOM. diff --git a/snippets/remove-event-listener-all.md b/snippets/remove-event-listener-all.md index 044db2ebf..2c170dd6e 100644 --- a/snippets/remove-event-listener-all.md +++ b/snippets/remove-event-listener-all.md @@ -1,10 +1,10 @@ --- title: Remove event listeners from target -tags: browser,event +type: snippet +tags: [browser,event] author: chalarangelo cover: snowy-mountains -firstSeen: 2021-04-22T08:53:29+03:00 -lastUpdated: 2021-04-22T08:53:29+03:00 +dateModified: 2021-04-22T08:53:29+03:00 --- Detaches an event listener from all the provided targets. diff --git a/snippets/remove-non-ascii.md b/snippets/remove-non-ascii.md index b492c08cd..f6b2c73ab 100644 --- a/snippets/remove-non-ascii.md +++ b/snippets/remove-non-ascii.md @@ -1,9 +1,9 @@ --- title: Remove non ASCII characters -tags: string,regexp +type: snippet +tags: [string,regexp] cover: tram-car -firstSeen: 2018-01-26T14:00:54+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Removes non-printable ASCII characters. diff --git a/snippets/remove-whitespace.md b/snippets/remove-whitespace.md index 12bff3b19..bcc51c59c 100644 --- a/snippets/remove-whitespace.md +++ b/snippets/remove-whitespace.md @@ -1,9 +1,9 @@ --- title: Remove whitespaces -tags: string,regexp +type: snippet +tags: [string,regexp] cover: tropical-bike -firstSeen: 2020-10-13T09:37:17+03:00 -lastUpdated: 2020-11-03T21:46:13+02:00 +dateModified: 2020-11-03T21:46:13+02:00 --- Returns a string with whitespaces removed. diff --git a/snippets/remove.md b/snippets/remove.md index 93b0af853..aaef585f1 100644 --- a/snippets/remove.md +++ b/snippets/remove.md @@ -1,9 +1,9 @@ --- title: Remove matching elements from array -tags: array +type: snippet +tags: [array] cover: highlands -firstSeen: 2017-12-17T16:41:31+02:00 -lastUpdated: 2020-10-22T20:24:04+03:00 +dateModified: 2020-10-22T20:24:04+03:00 --- Mutates an array by removing elements for which the given function returns `false`. diff --git a/snippets/rename-keys.md b/snippets/rename-keys.md index 710929b84..f344627de 100644 --- a/snippets/rename-keys.md +++ b/snippets/rename-keys.md @@ -1,9 +1,9 @@ --- title: Rename object keys -tags: object +type: snippet +tags: [object] cover: fallen-leaves -firstSeen: 2018-04-10T20:22:39+03:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Replaces the names of multiple object keys with the values provided. diff --git a/snippets/render-element.md b/snippets/render-element.md index cfd44039b..44cbe3ec7 100644 --- a/snippets/render-element.md +++ b/snippets/render-element.md @@ -1,10 +1,10 @@ --- title: Render DOM element -tags: browser,recursion +type: snippet +tags: [browser,recursion] author: chalarangelo cover: maple-leaf-palette -firstSeen: 2020-05-03T11:55:42+03:00 -lastUpdated: 2021-10-13T19:29:39+02:00 +dateModified: 2021-10-13T19:29:39+02:00 --- Renders the given DOM tree in the specified DOM element. diff --git a/snippets/repeat-generator.md b/snippets/repeat-generator.md index 0829c6b14..b32721977 100644 --- a/snippets/repeat-generator.md +++ b/snippets/repeat-generator.md @@ -1,10 +1,10 @@ --- title: Repeat generator -tags: function,generator +type: snippet +tags: [function,generator] author: chalarangelo cover: white-flower -firstSeen: 2020-10-11T17:05:48+03:00 -lastUpdated: 2020-10-11T17:05:48+03:00 +dateModified: 2020-10-11T17:05:48+03:00 --- Creates a generator, repeating the given value indefinitely. diff --git a/snippets/replace-last.md b/snippets/replace-last.md index e1aa1690d..d7a2b6cf9 100644 --- a/snippets/replace-last.md +++ b/snippets/replace-last.md @@ -1,10 +1,10 @@ --- title: Replace last occurrence in string -tags: string,regexp +type: snippet +tags: [string,regexp] author: chalarangelo cover: waves -firstSeen: 2021-04-22T09:01:22+03:00 -lastUpdated: 2021-04-22T09:01:22+03:00 +dateModified: 2021-04-22T09:01:22+03:00 --- Replaces the last occurrence of a pattern in a string. diff --git a/snippets/replace-or-append.md b/snippets/replace-or-append.md index ad53362da..c9226c90d 100644 --- a/snippets/replace-or-append.md +++ b/snippets/replace-or-append.md @@ -1,9 +1,10 @@ --- title: Replace or append array value -tags: array +type: snippet +tags: [array] author: chalarangelo cover: boutique-home-office-2 -firstSeen: 2023-02-19T05:00:00-04:00 +dateModified: 2023-02-19T05:00:00-04:00 --- Replaces an item in an array or appends it, if it doesn't exist. diff --git a/snippets/require-uncached.md b/snippets/require-uncached.md index 99829e1a1..abd897a42 100644 --- a/snippets/require-uncached.md +++ b/snippets/require-uncached.md @@ -1,10 +1,10 @@ --- title: Uncached module require -tags: node +type: snippet +tags: [node] author: chalarangelo cover: curve -firstSeen: 2020-08-07T15:49:39+03:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Loads a module after removing it from the cache (if exists). diff --git a/snippets/resolve-after.md b/snippets/resolve-after.md index 99a4518f1..d96c83831 100644 --- a/snippets/resolve-after.md +++ b/snippets/resolve-after.md @@ -1,9 +1,10 @@ --- title: Resolve promise after given amount of time -tags: function,promise +type: snippet +tags: [function,promise] author: chalarangelo cover: filter-coffee-pot -firstSeen: 2022-01-08T05:00:00-04:00 +dateModified: 2022-01-08T05:00:00-04:00 --- Creates a promise that resolves after a given amount of time to the provided value. diff --git a/snippets/reverse-number.md b/snippets/reverse-number.md index f1960a5c6..7255cfc2f 100644 --- a/snippets/reverse-number.md +++ b/snippets/reverse-number.md @@ -1,9 +1,9 @@ --- title: Reverse number -tags: math,string +type: snippet +tags: [math,string] cover: walking -firstSeen: 2020-07-17T16:41:28+03:00 -lastUpdated: 2020-09-18T21:19:23+03:00 +dateModified: 2020-09-18T21:19:23+03:00 --- Reverses a number. diff --git a/snippets/reverse-string.md b/snippets/reverse-string.md index 908c0f4d3..fd141a4eb 100644 --- a/snippets/reverse-string.md +++ b/snippets/reverse-string.md @@ -1,9 +1,9 @@ --- title: Reverse string -tags: string +type: snippet +tags: [string] cover: type-stamps -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-18T14:58:09+03:00 +dateModified: 2020-10-18T14:58:09+03:00 --- Reverses a string. diff --git a/snippets/rgb-to-hex.md b/snippets/rgb-to-hex.md index ca179d3c3..d9c2fece6 100644 --- a/snippets/rgb-to-hex.md +++ b/snippets/rgb-to-hex.md @@ -1,9 +1,9 @@ --- title: RGB to hex -tags: string,math +type: snippet +tags: [string,math] cover: colors-mural -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-11-03T22:11:18+02:00 +dateModified: 2020-11-03T22:11:18+02:00 --- Converts the values of RGB components to a hexadecimal color code. diff --git a/snippets/rgb-to-hsb.md b/snippets/rgb-to-hsb.md index 4dbb441b6..ac68ce627 100644 --- a/snippets/rgb-to-hsb.md +++ b/snippets/rgb-to-hsb.md @@ -1,9 +1,9 @@ --- title: RGB to HSB -tags: math +type: snippet +tags: [math] cover: dark-leaves -firstSeen: 2020-09-18T14:25:07+03:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Converts a RGB color tuple to HSB format. diff --git a/snippets/rgb-to-hsl.md b/snippets/rgb-to-hsl.md index 09a0c31f1..85f12e921 100644 --- a/snippets/rgb-to-hsl.md +++ b/snippets/rgb-to-hsl.md @@ -1,9 +1,9 @@ --- title: RGB to HSL -tags: math +type: snippet +tags: [math] cover: planning -firstSeen: 2020-10-01T23:16:30+03:00 -lastUpdated: 2020-10-04T11:25:12+03:00 +dateModified: 2020-10-04T11:25:12+03:00 --- Converts a RGB color tuple to HSL format. diff --git a/snippets/right-substr-generator.md b/snippets/right-substr-generator.md index cd9d47a58..b1a44720c 100644 --- a/snippets/right-substr-generator.md +++ b/snippets/right-substr-generator.md @@ -1,9 +1,10 @@ --- title: Right substring generator -tags: string,generator +type: snippet +tags: [string,generator] cover: boutique-home-office-2 author: chalarangelo -firstSeen: 2022-07-25T05:00:00-04:00 +dateModified: 2022-07-25T05:00:00-04:00 --- Generates all right substrings of a given string. diff --git a/snippets/round.md b/snippets/round.md index 5a5e27682..d6f290817 100644 --- a/snippets/round.md +++ b/snippets/round.md @@ -1,9 +1,9 @@ --- title: Round number to given precision -tags: math +type: snippet +tags: [math] cover: yellow-white-mug-1 -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Rounds a number to a specified amount of digits. diff --git a/snippets/run-async.md b/snippets/run-async.md index 433b14adf..f73507f8b 100644 --- a/snippets/run-async.md +++ b/snippets/run-async.md @@ -1,10 +1,10 @@ --- title: Run function asynchronously -tags: browser,function,promise +type: snippet +tags: [browser,function,promise] excerpt: Runs a function in a separate thread by using a Web Worker. cover: purple-sunset -firstSeen: 2018-01-02T02:17:52+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 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/run-promises-in-series.md b/snippets/run-promises-in-series.md index a0a6138f8..699a43f26 100644 --- a/snippets/run-promises-in-series.md +++ b/snippets/run-promises-in-series.md @@ -1,9 +1,9 @@ --- title: Run promises in series -tags: function,promise +type: snippet +tags: [function,promise] cover: sail-away -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Runs an array of promises in series. diff --git a/snippets/sample-size.md b/snippets/sample-size.md index f24edce68..7fd1c4892 100644 --- a/snippets/sample-size.md +++ b/snippets/sample-size.md @@ -1,9 +1,9 @@ --- title: N random elements in array -tags: array,random +type: snippet +tags: [array,random] cover: tree-roots -firstSeen: 2017-12-31T13:56:28+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 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/sample.md b/snippets/sample.md index 225f431b1..e260bf868 100644 --- a/snippets/sample.md +++ b/snippets/sample.md @@ -1,9 +1,9 @@ --- title: Random element in array -tags: array,string,random +type: snippet +tags: [array,string,random] cover: paper-card -firstSeen: 2017-12-17T16:41:31+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Gets a random element from an array. diff --git a/snippets/scroll-to-top.md b/snippets/scroll-to-top.md index ec7932a38..6c7d06424 100644 --- a/snippets/scroll-to-top.md +++ b/snippets/scroll-to-top.md @@ -1,9 +1,9 @@ --- title: Scroll page to top -tags: browser +type: snippet +tags: [browser] cover: tranquil-lake -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 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 107ce314a..f83299fae 100644 --- a/snippets/sdbm.md +++ b/snippets/sdbm.md @@ -1,9 +1,9 @@ --- title: Hash string into number -tags: math +type: snippet +tags: [math] cover: dark-leaves -firstSeen: 2017-12-27T17:12:34+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Hashes the input string into a whole number. diff --git a/snippets/selection-sort.md b/snippets/selection-sort.md index 0fd22509b..feec49751 100644 --- a/snippets/selection-sort.md +++ b/snippets/selection-sort.md @@ -1,10 +1,10 @@ --- title: Selection sort -tags: algorithm,array +type: snippet +tags: [algorithm,array] author: chalarangelo cover: violin -firstSeen: 2020-12-27T22:22:44+02:00 -lastUpdated: 2021-10-13T19:29:39+02:00 +dateModified: 2021-10-13T19:29:39+02:00 --- Sorts an array of numbers, using the selection sort algorithm. diff --git a/snippets/serialize-cookie.md b/snippets/serialize-cookie.md index d8d2b2b3a..a9573e3ee 100644 --- a/snippets/serialize-cookie.md +++ b/snippets/serialize-cookie.md @@ -1,9 +1,9 @@ --- title: Serialize cookie -tags: browser,string +type: snippet +tags: [browser,string] cover: three-vases -firstSeen: 2018-01-13T14:19:21+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Serializes a cookie name-value pair into a Set-Cookie header string. diff --git a/snippets/serialize-form.md b/snippets/serialize-form.md index e180e3fd3..7d7d35a12 100644 --- a/snippets/serialize-form.md +++ b/snippets/serialize-form.md @@ -1,9 +1,9 @@ --- title: Serialize form -tags: browser,string +type: snippet +tags: [browser,string] cover: down-the-stream -firstSeen: 2019-03-13T14:29:45+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Encodes a set of form elements as a query string. diff --git a/snippets/set-style.md b/snippets/set-style.md index 881f90876..40af9bfb7 100644 --- a/snippets/set-style.md +++ b/snippets/set-style.md @@ -1,9 +1,9 @@ --- title: Set style for element -tags: browser +type: snippet +tags: [browser] cover: laptop-plants-2 -firstSeen: 2017-12-29T00:08:17+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Sets the value of a CSS rule for the specified HTML element. diff --git a/snippets/shallow-clone.md b/snippets/shallow-clone.md index 2d4a20ab1..c976077c8 100644 --- a/snippets/shallow-clone.md +++ b/snippets/shallow-clone.md @@ -1,9 +1,9 @@ --- title: Shallow clone object -tags: object +type: snippet +tags: [object] cover: neon-desk-1 -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 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 c2c6ca750..92aba7ce8 100644 --- a/snippets/shank.md +++ b/snippets/shank.md @@ -1,10 +1,10 @@ --- title: Remove elements from array -tags: array +type: snippet +tags: [array] cover: avocado-slices excerpt: Removes an element from an array without mutating it. -firstSeen: 2018-09-27T01:55:30+03:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 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 b470a03f3..c15f89ca7 100644 --- a/snippets/show.md +++ b/snippets/show.md @@ -1,9 +1,9 @@ --- title: Show elements -tags: browser,css +type: snippet +tags: [browser,css] cover: green-plant -firstSeen: 2017-12-28T23:33:21+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Shows all the elements specified. diff --git a/snippets/shuffle.md b/snippets/shuffle.md index 1d3576230..e55124b8d 100644 --- a/snippets/shuffle.md +++ b/snippets/shuffle.md @@ -1,9 +1,9 @@ --- title: Shuffle array -tags: array,random,algorithm +type: snippet +tags: [array,random,algorithm] cover: interior-11 -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2021-02-20T21:17:38+02:00 +dateModified: 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 279a7a8ce..4f54eaf33 100644 --- a/snippets/similarity.md +++ b/snippets/similarity.md @@ -1,9 +1,9 @@ --- title: Array similarity -tags: array,math +type: snippet +tags: [array,math] cover: dark-leaves-5 -firstSeen: 2017-12-17T16:41:31+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 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 d08f266b5..ddcd60afb 100644 --- a/snippets/size.md +++ b/snippets/size.md @@ -1,9 +1,9 @@ --- title: Size of array, object or string -tags: object,array,string +type: snippet +tags: [object,array,string] cover: digital-nomad-13 -firstSeen: 2017-12-30T16:46:01+02:00 -lastUpdated: 2023-01-20T13:25:47+03:00 +dateModified: 2023-01-20T13:25:47+03:00 --- Gets the size of an array, object or string. diff --git a/snippets/sleep.md b/snippets/sleep.md index 4bbe7d8ed..b9356b4f5 100644 --- a/snippets/sleep.md +++ b/snippets/sleep.md @@ -1,9 +1,9 @@ --- title: Delay async function execution -tags: function,promise +type: snippet +tags: [function,promise] cover: sleepy-cat -firstSeen: 2017-12-13T22:40:56+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 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 748be8040..94173c036 100644 --- a/snippets/slugify.md +++ b/snippets/slugify.md @@ -1,9 +1,9 @@ --- title: String to slug -tags: string,regexp +type: snippet +tags: [string,regexp] cover: houses-rock-sea -firstSeen: 2020-10-04T09:45:43+03:00 -lastUpdated: 2020-10-04T10:36:38+03:00 +dateModified: 2020-10-04T10:36:38+03:00 --- Converts a string to a URL-friendly slug. diff --git a/snippets/smooth-scroll.md b/snippets/smooth-scroll.md index 1af66a3e9..519fffc90 100644 --- a/snippets/smooth-scroll.md +++ b/snippets/smooth-scroll.md @@ -1,9 +1,9 @@ --- title: Smooth scroll element into view -tags: browser,css +type: snippet +tags: [browser,css] cover: carrots -firstSeen: 2018-03-02T18:22:51+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 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/sort-characters-in-string.md b/snippets/sort-characters-in-string.md index 8194374b3..35caf2c5d 100644 --- a/snippets/sort-characters-in-string.md +++ b/snippets/sort-characters-in-string.md @@ -1,9 +1,9 @@ --- title: Sort characters in string -tags: string +type: snippet +tags: [string] cover: purple-flower-field -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Alphabetically sorts the characters in a string. diff --git a/snippets/sorted-index-by.md b/snippets/sorted-index-by.md index 9d35cd784..252b4c683 100644 --- a/snippets/sorted-index-by.md +++ b/snippets/sorted-index-by.md @@ -1,9 +1,9 @@ --- title: Insertion index in sorted array based on function -tags: array,math +type: snippet +tags: [array,math] cover: digital-nomad-15 -firstSeen: 2018-01-26T13:39:09+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 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/sorted-index.md b/snippets/sorted-index.md index 668ead41d..26b9ee6b7 100644 --- a/snippets/sorted-index.md +++ b/snippets/sorted-index.md @@ -1,9 +1,9 @@ --- title: Insertion index in sorted array -tags: array,math +type: snippet +tags: [array,math] cover: apples -firstSeen: 2017-12-31T16:39:06+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 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/sorted-last-index-by.md b/snippets/sorted-last-index-by.md index d0923488f..51d70c790 100644 --- a/snippets/sorted-last-index-by.md +++ b/snippets/sorted-last-index-by.md @@ -1,9 +1,9 @@ --- title: Last insertion index in sorted array based on function -tags: array +type: snippet +tags: [array] cover: hard-disk -firstSeen: 2018-01-26T13:39:09+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 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/sorted-last-index.md b/snippets/sorted-last-index.md index ca3c7e8ed..cdaab2200 100644 --- a/snippets/sorted-last-index.md +++ b/snippets/sorted-last-index.md @@ -1,9 +1,9 @@ --- title: Last insertion index in sorted array -tags: array +type: snippet +tags: [array] cover: rocky-beach-3 -firstSeen: 2018-01-24T13:16:47+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 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/split-lines.md b/snippets/split-lines.md index 0b8a71fd5..2c4f01bdd 100644 --- a/snippets/split-lines.md +++ b/snippets/split-lines.md @@ -1,9 +1,9 @@ --- title: Split into lines -tags: string,regexp +type: snippet +tags: [string,regexp] cover: two-cities -firstSeen: 2017-12-29T12:58:58+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Splits a multiline string into an array of lines. diff --git a/snippets/spread-over.md b/snippets/spread-over.md index 77e72e3c3..a97f0388b 100644 --- a/snippets/spread-over.md +++ b/snippets/spread-over.md @@ -1,9 +1,9 @@ --- title: Convert function from variadic -tags: function +type: snippet +tags: [function] cover: tent-stars -firstSeen: 2017-12-22T04:33:57+02:00 -lastUpdated: 2021-06-13T13:50:25+03:00 +dateModified: 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/stable-sort.md b/snippets/stable-sort.md index 0ee696006..e0458143f 100644 --- a/snippets/stable-sort.md +++ b/snippets/stable-sort.md @@ -1,9 +1,9 @@ --- title: Stable sort -tags: array +type: snippet +tags: [array] cover: horse-sunset -firstSeen: 2018-02-06T18:33:49+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 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/standard-deviation.md b/snippets/standard-deviation.md index 5ba2443c9..6a6f3f4ad 100644 --- a/snippets/standard-deviation.md +++ b/snippets/standard-deviation.md @@ -1,9 +1,9 @@ --- title: Standard deviation -tags: math +type: snippet +tags: [math] cover: interior-16 -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Calculates the standard deviation of an array of numbers. diff --git a/snippets/starts-with-substring.md b/snippets/starts-with-substring.md index c301023a6..5d32dcf52 100644 --- a/snippets/starts-with-substring.md +++ b/snippets/starts-with-substring.md @@ -1,10 +1,11 @@ --- title: String starts with substring +type: snippet shortTitle: Starts with substring -tags: string +tags: [string] cover: boutique-home-office-3 author: chalarangelo -firstSeen: 2022-07-31T05:00:00-04:00 +dateModified: 2022-07-31T05:00:00-04:00 --- Checks if a given string starts with a substring of another string. diff --git a/snippets/string-permutations.md b/snippets/string-permutations.md index d0a800e37..6c39df64f 100644 --- a/snippets/string-permutations.md +++ b/snippets/string-permutations.md @@ -1,9 +1,9 @@ --- title: String permutations -tags: string,recursion +type: snippet +tags: [string,recursion] cover: mac-and-coffee -firstSeen: 2018-02-19T15:47:47+02:00 -lastUpdated: 2020-11-15T17:13:42+02:00 +dateModified: 2020-11-15T17:13:42+02:00 --- Generates all permutations of a string (contains duplicates). diff --git a/snippets/stringify-circular-json.md b/snippets/stringify-circular-json.md index 3122775e4..edfca29dd 100644 --- a/snippets/stringify-circular-json.md +++ b/snippets/stringify-circular-json.md @@ -1,9 +1,9 @@ --- title: Stringify circular JSON -tags: object +type: snippet +tags: [object] cover: periscope -firstSeen: 2020-10-06T12:32:28+03:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Serializes a JSON object containing circular references into a JSON format. diff --git a/snippets/strip-html-tags.md b/snippets/strip-html-tags.md index a32d2ec67..86bb506bd 100644 --- a/snippets/strip-html-tags.md +++ b/snippets/strip-html-tags.md @@ -1,9 +1,9 @@ --- title: Strip HTML tags -tags: string,regexp +type: snippet +tags: [string,regexp] cover: coffee-phone-tray-3 -firstSeen: 2018-01-26T14:17:29+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Removes HTML/XML tags from string. diff --git a/snippets/sub-set.md b/snippets/sub-set.md index c6a66aff2..7560a576e 100644 --- a/snippets/sub-set.md +++ b/snippets/sub-set.md @@ -1,9 +1,9 @@ --- title: Subset of iterable -tags: array +type: snippet +tags: [array] cover: last-light -firstSeen: 2020-10-11T11:53:08+03:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 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-by.md b/snippets/sum-by.md index f420c67f0..426419647 100644 --- a/snippets/sum-by.md +++ b/snippets/sum-by.md @@ -1,9 +1,9 @@ --- title: Mapped array sum -tags: math,array +type: snippet +tags: [math,array] cover: avocado-slices -firstSeen: 2018-01-11T12:25:54+02:00 -lastUpdated: 2020-11-03T22:11:18+02:00 +dateModified: 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/sum-n.md b/snippets/sum-n.md index 7c3fe4954..ef6554585 100644 --- a/snippets/sum-n.md +++ b/snippets/sum-n.md @@ -1,9 +1,9 @@ --- title: Sum of numbers until n -tags: math +type: snippet +tags: [math] cover: blue-flower -firstSeen: 2020-10-08T16:52:55+03:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Sums all the numbers between `1` and `n`. diff --git a/snippets/sum-power.md b/snippets/sum-power.md index 9d57cc26e..78fcb2253 100644 --- a/snippets/sum-power.md +++ b/snippets/sum-power.md @@ -1,9 +1,9 @@ --- title: Sum of powers in range -tags: math +type: snippet +tags: [math] cover: boat-port -firstSeen: 2018-01-01T15:49:25+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 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/sum.md b/snippets/sum.md index db77495d1..750e7421e 100644 --- a/snippets/sum.md +++ b/snippets/sum.md @@ -1,9 +1,9 @@ --- title: Array sum -tags: math +type: snippet +tags: [math] cover: lake-trees -firstSeen: 2017-12-29T13:29:49+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Calculates the sum of two or more numbers/arrays. diff --git a/snippets/super-set.md b/snippets/super-set.md index 341625fd6..7d6e1a4ea 100644 --- a/snippets/super-set.md +++ b/snippets/super-set.md @@ -1,9 +1,9 @@ --- title: Superset of iterable -tags: array +type: snippet +tags: [array] cover: waves-from-above-2 -firstSeen: 2020-10-11T11:53:19+03:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 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/supports-touch-events.md b/snippets/supports-touch-events.md index 27de251a5..4f445446f 100644 --- a/snippets/supports-touch-events.md +++ b/snippets/supports-touch-events.md @@ -1,10 +1,10 @@ --- title: Device supports touch events -tags: browser +type: snippet +tags: [browser] author: chalarangelo cover: man-red-sunset -firstSeen: 2020-05-04T12:57:23+03:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Checks if touch events are supported. diff --git a/snippets/swap-case.md b/snippets/swap-case.md index 727e6d683..423064ca4 100644 --- a/snippets/swap-case.md +++ b/snippets/swap-case.md @@ -1,9 +1,9 @@ --- title: Swapcase string -tags: string +type: snippet +tags: [string] cover: mountain-lake-2 -firstSeen: 2020-11-15T13:09:03+02:00 -lastUpdated: 2020-11-15T13:09:03+02:00 +dateModified: 2020-11-15T13:09:03+02:00 --- Creates a string with uppercase characters converted to lowercase and vice versa. diff --git a/snippets/symbolize-keys.md b/snippets/symbolize-keys.md index f5a7eeb80..722686ffb 100644 --- a/snippets/symbolize-keys.md +++ b/snippets/symbolize-keys.md @@ -1,9 +1,10 @@ --- title: Symbolize object keys -tags: object +type: snippet +tags: [object] author: chalarangelo cover: rocky-lake -firstSeen: 2021-08-01T05:00:00-04:00 +dateModified: 2021-08-01T05:00:00-04:00 --- Creates a new object, converting each key to a `Symbol`. diff --git a/snippets/symmetric-difference-by.md b/snippets/symmetric-difference-by.md index 6b63d4d93..237e64dae 100644 --- a/snippets/symmetric-difference-by.md +++ b/snippets/symmetric-difference-by.md @@ -1,9 +1,9 @@ --- title: Mapped array symmetric difference -tags: array +type: snippet +tags: [array] cover: river-houses -firstSeen: 2018-01-24T11:59:02+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 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/symmetric-difference-with.md b/snippets/symmetric-difference-with.md index 1363b9b99..ab00d7c46 100644 --- a/snippets/symmetric-difference-with.md +++ b/snippets/symmetric-difference-with.md @@ -1,9 +1,9 @@ --- title: Array symmetric difference -tags: array +type: snippet +tags: [array] cover: digital-nomad -firstSeen: 2018-01-24T11:59:02+02:00 -lastUpdated: 2020-10-18T14:58:09+03:00 +dateModified: 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/symmetric-difference.md b/snippets/symmetric-difference.md index 45e2768b1..e34aa495e 100644 --- a/snippets/symmetric-difference.md +++ b/snippets/symmetric-difference.md @@ -1,9 +1,9 @@ --- title: Array symmetric difference -tags: array,math +type: snippet +tags: [array,math] cover: trippy-chemicals -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Returns the symmetric difference between two arrays, without filtering out duplicate values. diff --git a/snippets/tail.md b/snippets/tail.md index 63b3f1744..486707fd9 100644 --- a/snippets/tail.md +++ b/snippets/tail.md @@ -1,9 +1,9 @@ --- title: Array tail -tags: array +type: snippet +tags: [array] cover: waves-from-above -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Returns all elements in an array except for the first one. diff --git a/snippets/take-right-until.md b/snippets/take-right-until.md index 93118b0a7..518ae8acf 100644 --- a/snippets/take-right-until.md +++ b/snippets/take-right-until.md @@ -1,9 +1,9 @@ --- title: Remove list elements from the end until condition is met -tags: array +type: snippet +tags: [array] cover: fruit-feast -firstSeen: 2020-11-29T12:04:53+02:00 -lastUpdated: 2020-11-29T12:04:53+02:00 +dateModified: 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/take-right-while.md b/snippets/take-right-while.md index bc3fa0ba3..d15b59b24 100644 --- a/snippets/take-right-while.md +++ b/snippets/take-right-while.md @@ -1,9 +1,9 @@ --- title: Remove list elements from the end while condition is met -tags: array +type: snippet +tags: [array] cover: beach-pineapple -firstSeen: 2018-01-26T12:55:31+02:00 -lastUpdated: 2020-11-29T12:04:53+02:00 +dateModified: 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/take-right.md b/snippets/take-right.md index b31152f89..8d44e7cab 100644 --- a/snippets/take-right.md +++ b/snippets/take-right.md @@ -1,9 +1,9 @@ --- title: Remove list elements from the end -tags: array +type: snippet +tags: [array] cover: interior-7 -firstSeen: 2017-12-15T02:00:10+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Creates an array with `n` elements removed from the end. diff --git a/snippets/take-until.md b/snippets/take-until.md index c487a4d81..e13e2d945 100644 --- a/snippets/take-until.md +++ b/snippets/take-until.md @@ -1,9 +1,9 @@ --- title: Remove list elements until condition is met -tags: array +type: snippet +tags: [array] cover: purple-sunset-beach -firstSeen: 2020-11-29T12:04:53+02:00 -lastUpdated: 2020-11-29T12:04:53+02:00 +dateModified: 2020-11-29T12:04:53+02:00 --- Removes elements in an array until the passed function returns `true`. diff --git a/snippets/take-while.md b/snippets/take-while.md index 2284c9df3..f41cce401 100644 --- a/snippets/take-while.md +++ b/snippets/take-while.md @@ -1,9 +1,9 @@ --- title: Remove list elements while condition is met -tags: array +type: snippet +tags: [array] cover: colors-mural -firstSeen: 2018-01-26T12:55:31+02:00 -lastUpdated: 2020-11-29T12:04:53+02:00 +dateModified: 2020-11-29T12:04:53+02:00 --- Removes elements in an array until the passed function returns `false`. diff --git a/snippets/take.md b/snippets/take.md index d75dab096..7600304c0 100644 --- a/snippets/take.md +++ b/snippets/take.md @@ -1,9 +1,9 @@ --- title: Remove list elements -tags: array +type: snippet +tags: [array] cover: interior-9 -firstSeen: 2017-12-14T11:35:14+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Creates an array with `n` elements removed from the beginning. diff --git a/snippets/throttle.md b/snippets/throttle.md index fb061da63..97fa915d5 100644 --- a/snippets/throttle.md +++ b/snippets/throttle.md @@ -1,9 +1,9 @@ --- title: Throttle function -tags: function +type: snippet +tags: [function] cover: waves-from-above -firstSeen: 2018-01-28T15:23:01+02:00 -lastUpdated: 2021-10-13T19:29:39+02:00 +dateModified: 2021-10-13T19:29:39+02:00 --- Creates a throttled function that only invokes the provided function at most once per every `wait` milliseconds diff --git a/snippets/time-taken.md b/snippets/time-taken.md index c94deeae5..41c732784 100644 --- a/snippets/time-taken.md +++ b/snippets/time-taken.md @@ -1,9 +1,9 @@ --- title: Time taken by function -tags: function +type: snippet +tags: [function] cover: shelf-plant -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 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 57ca4c707..9101ba08d 100644 --- a/snippets/times.md +++ b/snippets/times.md @@ -1,9 +1,9 @@ --- title: Iterate n times -tags: function +type: snippet +tags: [function] cover: lake-loop -firstSeen: 2018-01-24T13:50:49+02:00 -lastUpdated: 2020-10-20T11:21:07+03:00 +dateModified: 2020-10-20T11:21:07+03:00 --- Iterates over a callback `n` times. diff --git a/snippets/to-camel-case.md b/snippets/to-camel-case.md index 2aae88115..856b4c8cd 100644 --- a/snippets/to-camel-case.md +++ b/snippets/to-camel-case.md @@ -1,9 +1,9 @@ --- title: Camelcase string -tags: string,regexp +type: snippet +tags: [string,regexp] cover: meteora -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Converts a string to camelcase. diff --git a/snippets/to-char-array.md b/snippets/to-char-array.md index 271dfd270..e6d22e104 100644 --- a/snippets/to-char-array.md +++ b/snippets/to-char-array.md @@ -1,9 +1,9 @@ --- title: String to character array -tags: string +type: snippet +tags: [string] cover: waving-over-lake -firstSeen: 2020-10-08T15:17:22+03:00 -lastUpdated: 2020-10-08T15:17:22+03:00 +dateModified: 2020-10-08T15:17:22+03:00 --- Converts a string to an array of characters. diff --git a/snippets/to-currency.md b/snippets/to-currency.md index 787bfd6eb..4ff38c502 100644 --- a/snippets/to-currency.md +++ b/snippets/to-currency.md @@ -1,9 +1,9 @@ --- title: Number to currency string -tags: math,string +type: snippet +tags: [math,string] cover: planning -firstSeen: 2018-01-27T17:15:48+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Takes a number and returns it in the specified currency formatting. diff --git a/snippets/to-decimal-mark.md b/snippets/to-decimal-mark.md index 378227ec9..a852e3c55 100644 --- a/snippets/to-decimal-mark.md +++ b/snippets/to-decimal-mark.md @@ -1,9 +1,9 @@ --- title: Number to decimal mark -tags: math +type: snippet +tags: [math] cover: blue-bench -firstSeen: 2017-12-21T16:29:51+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Converts a number to a decimal mark formatted string. diff --git a/snippets/to-hash.md b/snippets/to-hash.md index 3cc91303d..8525164a0 100644 --- a/snippets/to-hash.md +++ b/snippets/to-hash.md @@ -1,9 +1,9 @@ --- title: Iterable to hash -tags: array +type: snippet +tags: [array] cover: sleepy-cat -firstSeen: 2018-05-31T02:14:04+03:00 -lastUpdated: 2022-01-30T12:45:30+03:00 +dateModified: 2022-01-30T12:45:30+03:00 --- Reduces a given iterable into a value hash (keyed data store). diff --git a/snippets/to-hsl-array.md b/snippets/to-hsl-array.md index c2bf5f259..1d361cae0 100644 --- a/snippets/to-hsl-array.md +++ b/snippets/to-hsl-array.md @@ -1,9 +1,9 @@ --- title: HSL to array -tags: string,regexp +type: snippet +tags: [string,regexp] cover: kettle-laptop -firstSeen: 2020-10-16T21:46:29+03:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Converts an `hsl()` color string to an array of values. diff --git a/snippets/to-hsl-object.md b/snippets/to-hsl-object.md index 50ed6af11..aa954121b 100644 --- a/snippets/to-hsl-object.md +++ b/snippets/to-hsl-object.md @@ -1,9 +1,9 @@ --- title: HSL to object -tags: string,regexp +type: snippet +tags: [string,regexp] cover: measuring -firstSeen: 2020-10-16T21:48:31+03:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 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/to-identity-object.md b/snippets/to-identity-object.md index 569ba122b..ccd239d9c 100644 --- a/snippets/to-identity-object.md +++ b/snippets/to-identity-object.md @@ -1,9 +1,10 @@ --- title: Convert array to identity object -tags: array +type: snippet +tags: [array] author: chalarangelo cover: rain-shopping -firstSeen: 2023-04-16T05:00:00-04:00 +dateModified: 2023-04-16T05:00:00-04:00 --- Converts an array of values into an object with the same values as keys and values. diff --git a/snippets/to-iso-string-with-timezone.md b/snippets/to-iso-string-with-timezone.md index ca2198787..8d69fe8a8 100644 --- a/snippets/to-iso-string-with-timezone.md +++ b/snippets/to-iso-string-with-timezone.md @@ -1,9 +1,9 @@ --- title: Date to ISO format with timezone -tags: date +type: snippet +tags: [date] cover: pop-of-green -firstSeen: 2020-10-07T09:25:05+03:00 -lastUpdated: 2021-10-13T19:29:39+02:00 +dateModified: 2021-10-13T19:29:39+02:00 --- Converts a date to extended ISO format (ISO 8601), including timezone offset. diff --git a/snippets/to-kebab-case.md b/snippets/to-kebab-case.md index dd530ae93..c79ff561e 100644 --- a/snippets/to-kebab-case.md +++ b/snippets/to-kebab-case.md @@ -1,9 +1,9 @@ --- title: Kebabcase string -tags: string,regexp +type: snippet +tags: [string,regexp] cover: old-consoles -firstSeen: 2017-12-22T19:14:51+02:00 -lastUpdated: 2020-12-16T13:42:27+02:00 +dateModified: 2020-12-16T13:42:27+02:00 --- Converts a string to kebab case. diff --git a/snippets/to-optional-fixed.md b/snippets/to-optional-fixed.md index 28b51a1a8..317ac280c 100644 --- a/snippets/to-optional-fixed.md +++ b/snippets/to-optional-fixed.md @@ -1,9 +1,10 @@ --- title: Number to fixed-point notation without trailing zeros -tags: math,string +type: snippet +tags: [math,string] author: chalarangelo cover: red-succulent -firstSeen: 2022-05-10T05:00:00-04:00 +dateModified: 2022-05-10T05:00:00-04:00 --- Formats a number using fixed-point notation, if it has decimals. diff --git a/snippets/to-ordinal-suffix.md b/snippets/to-ordinal-suffix.md index df25fec46..f43fa4265 100644 --- a/snippets/to-ordinal-suffix.md +++ b/snippets/to-ordinal-suffix.md @@ -1,9 +1,9 @@ --- title: Number to ordinal suffix -tags: math +type: snippet +tags: [math] cover: tram-car-2 -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-11-13T19:49:57+02:00 +dateModified: 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/to-pairs.md b/snippets/to-pairs.md index 13e2b9d08..987f311cd 100644 --- a/snippets/to-pairs.md +++ b/snippets/to-pairs.md @@ -1,10 +1,10 @@ --- title: Object to pairs -tags: object,array +type: snippet +tags: [object,array] author: chalarangelo cover: purple-leaves -firstSeen: 2020-03-23T15:07:23+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 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/to-pascal-case.md b/snippets/to-pascal-case.md index b5af9b486..a3dd32ef3 100644 --- a/snippets/to-pascal-case.md +++ b/snippets/to-pascal-case.md @@ -1,8 +1,9 @@ --- title: Pascalcase string -tags: string,regexp +type: snippet +tags: [string,regexp] cover: camera-zoom -firstSeen: 2021-09-08T19:21:13+00:00 +dateModified: 2021-09-08T19:21:13+00:00 --- Converts a string to pascal case. diff --git a/snippets/to-rgb-array.md b/snippets/to-rgb-array.md index 18330e8f5..f195f5ad5 100644 --- a/snippets/to-rgb-array.md +++ b/snippets/to-rgb-array.md @@ -1,9 +1,9 @@ --- title: RGB to array -tags: string,regexp +type: snippet +tags: [string,regexp] cover: greek-coffee -firstSeen: 2020-10-14T20:36:18+03:00 -lastUpdated: 2021-06-13T13:50:25+03:00 +dateModified: 2021-06-13T13:50:25+03:00 --- Converts an `rgb()` color string to an array of values. diff --git a/snippets/to-rgb-object.md b/snippets/to-rgb-object.md index e59713dfd..12b6f0071 100644 --- a/snippets/to-rgb-object.md +++ b/snippets/to-rgb-object.md @@ -1,10 +1,10 @@ --- title: RGB to object -tags: string,regexp +type: snippet +tags: [string,regexp] author: chalarangelo cover: organizer -firstSeen: 2020-10-14T21:58:14+03:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 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/to-roman-numeral.md b/snippets/to-roman-numeral.md index e59f66980..c3ac89b39 100644 --- a/snippets/to-roman-numeral.md +++ b/snippets/to-roman-numeral.md @@ -1,9 +1,9 @@ --- title: Integer to roman numeral -tags: math,string +type: snippet +tags: [math,string] cover: ancient-greek-building -firstSeen: 2020-10-06T19:56:22+03:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 2020-10-22T20:24:44+03:00 --- Converts an integer to its roman numeral representation. diff --git a/snippets/to-safe-integer.md b/snippets/to-safe-integer.md index 7de88ba56..f002ee99d 100644 --- a/snippets/to-safe-integer.md +++ b/snippets/to-safe-integer.md @@ -1,9 +1,9 @@ --- title: Value to safe integer -tags: math +type: snippet +tags: [math] cover: mask-quiet -firstSeen: 2018-01-08T17:12:46+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 2020-10-22T20:24:44+03:00 --- Converts a value to a safe integer. diff --git a/snippets/to-sentence-case.md b/snippets/to-sentence-case.md index 731764d59..16894a71c 100644 --- a/snippets/to-sentence-case.md +++ b/snippets/to-sentence-case.md @@ -1,9 +1,10 @@ --- title: Sentencecase string -tags: string,regexp +type: snippet +tags: [string,regexp] cover: sofia-tram author: chalarangelo -firstSeen: 2023-03-27T05:00:00-04:00 +dateModified: 2023-03-27T05:00:00-04:00 --- Converts a string to sentence case. diff --git a/snippets/to-snake-case.md b/snippets/to-snake-case.md index f46b8b6ab..2d2a53bfc 100644 --- a/snippets/to-snake-case.md +++ b/snippets/to-snake-case.md @@ -1,9 +1,9 @@ --- title: Snakecase string -tags: string,regexp +type: snippet +tags: [string,regexp] cover: rustic-cup -firstSeen: 2017-12-22T18:13:22+02:00 -lastUpdated: 2021-06-28T15:27:44+03:00 +dateModified: 2021-06-28T15:27:44+03:00 --- Converts a string to snake case. diff --git a/snippets/to-title-case.md b/snippets/to-title-case.md index 8a45cd5d9..7b3babb17 100644 --- a/snippets/to-title-case.md +++ b/snippets/to-title-case.md @@ -1,9 +1,9 @@ --- title: Titlecase string -tags: string,regexp +type: snippet +tags: [string,regexp] cover: plant-candle -firstSeen: 2018-10-19T04:49:34+03:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 2020-10-22T20:24:44+03:00 --- Converts a string to title case. diff --git a/snippets/toggle-class.md b/snippets/toggle-class.md index 97b55c7c8..a56b49f87 100644 --- a/snippets/toggle-class.md +++ b/snippets/toggle-class.md @@ -1,9 +1,9 @@ --- title: Toggle class of HTML element -tags: browser +type: snippet +tags: [browser] cover: laptop-plants-2 -firstSeen: 2017-12-28T23:46:33+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 2020-10-22T20:24:30+03:00 --- Toggles a class for an HTML element. diff --git a/snippets/toggle-element.md b/snippets/toggle-element.md index 6dee19989..5f22eac2a 100644 --- a/snippets/toggle-element.md +++ b/snippets/toggle-element.md @@ -1,9 +1,10 @@ --- title: Toggle element in array -tags: array +type: snippet +tags: [array] author: chalarangelo cover: digital-nomad-7 -firstSeen: 2022-04-15T05:00:00-04:00 +dateModified: 2022-04-15T05:00:00-04:00 --- Removes an element from an array if it's included in the array, or pushes it to the array if it isn't. diff --git a/snippets/tomorrow.md b/snippets/tomorrow.md index ff7cb1ab7..1c6bad617 100644 --- a/snippets/tomorrow.md +++ b/snippets/tomorrow.md @@ -1,9 +1,9 @@ --- title: Date of tomorrow -tags: date +type: snippet +tags: [date] cover: travel-mug-2 -firstSeen: 2017-12-26T18:56:24+02:00 -lastUpdated: 2020-10-22T20:24:30+03:00 +dateModified: 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 2562e3ed6..c83c82851 100644 --- a/snippets/transform.md +++ b/snippets/transform.md @@ -1,9 +1,9 @@ --- title: Transform object -tags: object +type: snippet +tags: [object] cover: fishermen -firstSeen: 2018-01-12T13:55:49+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 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/transpose.md b/snippets/transpose.md index 1f209d429..6a19d8ab2 100644 --- a/snippets/transpose.md +++ b/snippets/transpose.md @@ -1,9 +1,10 @@ --- title: Transpose matrix -tags: array +type: snippet +tags: [array] author: chalarangelo cover: painters-desk -firstSeen: 2022-04-20T05:00:00-04:00 +dateModified: 2022-04-20T05:00:00-04:00 --- Transposes a two-dimensional array. diff --git a/snippets/trigger-event.md b/snippets/trigger-event.md index 6a70ce88c..9253dd1da 100644 --- a/snippets/trigger-event.md +++ b/snippets/trigger-event.md @@ -1,9 +1,9 @@ --- title: Trigger event on HTML element -tags: browser,event +type: snippet +tags: [browser,event] cover: cloudy-mountaintop-2 -firstSeen: 2018-06-19T20:57:58+03:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 2020-10-22T20:24:44+03:00 --- Triggers a specific event on a given element, optionally passing custom data. diff --git a/snippets/truncate-string-at-whitespace.md b/snippets/truncate-string-at-whitespace.md index aa67a899e..ccb5e84ab 100644 --- a/snippets/truncate-string-at-whitespace.md +++ b/snippets/truncate-string-at-whitespace.md @@ -1,9 +1,9 @@ --- title: Truncate string at whitespace -tags: string +type: snippet +tags: [string] cover: cloudy-mountaintop-2 -firstSeen: 2020-10-19T11:11:16+03:00 -lastUpdated: 2020-10-21T21:17:45+03:00 +dateModified: 2020-10-21T21:17:45+03:00 --- Truncates a string up to specified length, respecting whitespace when possible. diff --git a/snippets/truncate-string.md b/snippets/truncate-string.md index 904ab7522..e95016a0d 100644 --- a/snippets/truncate-string.md +++ b/snippets/truncate-string.md @@ -1,9 +1,9 @@ --- title: Truncate string -tags: string +type: snippet +tags: [string] cover: bamboo-lamp -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-21T21:17:45+03:00 +dateModified: 2020-10-21T21:17:45+03:00 --- Truncates a string up to a specified length. diff --git a/snippets/truth-check-collection.md b/snippets/truth-check-collection.md index c7bcb3068..a4b9a3f41 100644 --- a/snippets/truth-check-collection.md +++ b/snippets/truth-check-collection.md @@ -1,9 +1,9 @@ --- title: Truth check collection -tags: object,logic,array +type: snippet +tags: [object,logic,array] cover: digital-nomad-8 -firstSeen: 2017-12-18T13:05:21+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 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 b65aa39fb..2c5c1361e 100644 --- a/snippets/unary.md +++ b/snippets/unary.md @@ -1,9 +1,9 @@ --- title: Unary function arity -tags: function +type: snippet +tags: [function] cover: flower-portrait-2 -firstSeen: 2018-01-24T13:22:32+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 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 d5131ce40..824aad993 100644 --- a/snippets/uncurry.md +++ b/snippets/uncurry.md @@ -1,9 +1,9 @@ --- title: Uncurry function -tags: function +type: snippet +tags: [function] cover: perfect-timing -firstSeen: 2018-02-14T11:56:44+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 2020-10-22T20:24:44+03:00 --- Uncurries a function up to depth `n`. diff --git a/snippets/unescape-html.md b/snippets/unescape-html.md index a6eae5608..b2122f22a 100644 --- a/snippets/unescape-html.md +++ b/snippets/unescape-html.md @@ -1,9 +1,9 @@ --- title: Unescape HTML -tags: string,regexp +type: snippet +tags: [string,regexp] cover: little-tree -firstSeen: 2017-12-29T15:09:10+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 2020-10-22T20:24:44+03:00 --- Unescapes escaped HTML characters. diff --git a/snippets/unflatten-object.md b/snippets/unflatten-object.md index 4e7c181ae..874e5388f 100644 --- a/snippets/unflatten-object.md +++ b/snippets/unflatten-object.md @@ -1,9 +1,9 @@ --- title: Unflatten object -tags: object +type: snippet +tags: [object] cover: purple-flower-bunch -firstSeen: 2018-02-07T11:30:18+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 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 2e27dc580..4f18d5a6f 100644 --- a/snippets/unfold.md +++ b/snippets/unfold.md @@ -1,9 +1,9 @@ --- title: Unfold array -tags: function,array +type: snippet +tags: [function,array] cover: dog-waiting -firstSeen: 2018-01-24T16:22:14+02:00 -lastUpdated: 2020-09-15T16:28:04+03:00 +dateModified: 2020-09-15T16:28:04+03:00 --- Builds an array, using an iterator function and an initial seed value. diff --git a/snippets/union-by.md b/snippets/union-by.md index 999e63ecb..3cbd18013 100644 --- a/snippets/union-by.md +++ b/snippets/union-by.md @@ -1,9 +1,9 @@ --- title: Mapped array union -tags: array +type: snippet +tags: [array] cover: lake-church -firstSeen: 2018-01-24T12:19:41+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 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/union-with.md b/snippets/union-with.md index a75a219bd..79c001a20 100644 --- a/snippets/union-with.md +++ b/snippets/union-with.md @@ -1,9 +1,9 @@ --- title: Array union based on function -tags: array +type: snippet +tags: [array] cover: orange-coffee-4 -firstSeen: 2018-01-24T12:19:41+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 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/union.md b/snippets/union.md index 1953a2534..4e538a83c 100644 --- a/snippets/union.md +++ b/snippets/union.md @@ -1,9 +1,9 @@ --- title: Array union -tags: array +type: snippet +tags: [array] cover: yellow-white-mug-2 -firstSeen: 2017-12-17T16:41:31+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 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/unique-elements-by-right.md b/snippets/unique-elements-by-right.md index b52623ad2..cf284627d 100644 --- a/snippets/unique-elements-by-right.md +++ b/snippets/unique-elements-by-right.md @@ -1,9 +1,9 @@ --- title: Reversed unique values in array based on function -tags: array +type: snippet +tags: [array] cover: beach-from-above -firstSeen: 2018-07-18T20:49:07+03:00 -lastUpdated: 2021-10-13T19:29:39+02:00 +dateModified: 2021-10-13T19:29:39+02:00 --- Finds all unique values of an array, based on a provided comparator function, starting from the right. diff --git a/snippets/unique-elements-by.md b/snippets/unique-elements-by.md index ba8b88128..cb3798732 100644 --- a/snippets/unique-elements-by.md +++ b/snippets/unique-elements-by.md @@ -1,9 +1,9 @@ --- title: Unique values in array based on function -tags: array +type: snippet +tags: [array] cover: sunrise-over-mountains -firstSeen: 2018-07-18T20:49:07+03:00 -lastUpdated: 2021-10-13T19:29:39+02:00 +dateModified: 2021-10-13T19:29:39+02:00 --- Finds all unique values of an array, based on a provided comparator function. diff --git a/snippets/unique-elements.md b/snippets/unique-elements.md index 05d1d1fb1..6876b74a7 100644 --- a/snippets/unique-elements.md +++ b/snippets/unique-elements.md @@ -1,9 +1,9 @@ --- title: Unique values in array -tags: array +type: snippet +tags: [array] cover: architectural -firstSeen: 2018-01-17T19:02:49+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 2020-10-22T20:24:44+03:00 --- Finds all unique values in an array. diff --git a/snippets/unique-symmetric-difference.md b/snippets/unique-symmetric-difference.md index f00bf9797..f38e16c87 100644 --- a/snippets/unique-symmetric-difference.md +++ b/snippets/unique-symmetric-difference.md @@ -1,9 +1,9 @@ --- title: Array unique symmetric difference -tags: array,math +type: snippet +tags: [array,math] cover: paper-card -firstSeen: 2018-08-17T08:37:08+03:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 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 810b4a2df..180eb042f 100644 --- a/snippets/untildify.md +++ b/snippets/untildify.md @@ -1,9 +1,9 @@ --- title: Convert to absolute path -tags: node,string +type: snippet +tags: [node,string] cover: lighthouse -firstSeen: 2018-01-01T17:43:18+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 2020-10-22T20:24:44+03:00 --- Converts a tilde path to an absolute path. diff --git a/snippets/unwind.md b/snippets/unwind.md index f9cd6b16b..460dd5862 100644 --- a/snippets/unwind.md +++ b/snippets/unwind.md @@ -1,9 +1,10 @@ --- title: Unwind object -tags: object +type: snippet +tags: [object] author: chalarangelo cover: waves-from-above -firstSeen: 2022-04-18T05:00:00-04:00 +dateModified: 2022-04-18T05:00:00-04:00 --- Produces an array of objects from an object and one of its array-valued properties. diff --git a/snippets/unzip-with.md b/snippets/unzip-with.md index 61f7a9d3e..bc56b5f9d 100644 --- a/snippets/unzip-with.md +++ b/snippets/unzip-with.md @@ -1,9 +1,9 @@ --- title: Ungroup array elements based on function -tags: array +type: snippet +tags: [array] cover: coconuts -firstSeen: 2018-01-24T12:44:16+02:00 -lastUpdated: 2022-01-23T13:18:50+03:00 +dateModified: 2022-01-23T13:18:50+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/unzip.md b/snippets/unzip.md index 30f8b35e2..4fbce6a22 100644 --- a/snippets/unzip.md +++ b/snippets/unzip.md @@ -1,9 +1,9 @@ --- title: Ungroup array elements -tags: array +type: snippet +tags: [array] cover: glass-blowing -firstSeen: 2018-01-24T12:35:25+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 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/upperize.md b/snippets/upperize.md index c62ea1cf4..52597e749 100644 --- a/snippets/upperize.md +++ b/snippets/upperize.md @@ -1,9 +1,10 @@ --- title: Uppercase object keys -tags: object +type: snippet +tags: [object] author: chalarangelo cover: sofia-tram -firstSeen: 2023-02-11T05:00:00-04:00 +dateModified: 2023-02-11T05:00:00-04:00 --- Converts all the keys of an object to upper case. diff --git a/snippets/url-join.md b/snippets/url-join.md index 7bae61b25..62236626d 100644 --- a/snippets/url-join.md +++ b/snippets/url-join.md @@ -1,9 +1,9 @@ --- title: Join URL segments -tags: string,regexp +type: snippet +tags: [string,regexp] cover: digital-nomad-2 -firstSeen: 2018-01-16T15:53:03+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 2020-10-22T20:24:44+03:00 --- Joins all given URL segments together, then normalizes the resulting URL. diff --git a/snippets/uuid-generator-browser.md b/snippets/uuid-generator-browser.md index 338c5df44..ffcea1eb0 100644 --- a/snippets/uuid-generator-browser.md +++ b/snippets/uuid-generator-browser.md @@ -1,9 +1,9 @@ --- title: Generate UUID (browser) -tags: browser,random +type: snippet +tags: [browser,random] cover: mountain-lake-cottage -firstSeen: 2017-12-29T09:47:10+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 2020-10-22T20:24:44+03:00 --- Generates a UUID in a browser. diff --git a/snippets/uuid-generator-node.md b/snippets/uuid-generator-node.md index b794f382b..5eb55954a 100644 --- a/snippets/uuid-generator-node.md +++ b/snippets/uuid-generator-node.md @@ -1,9 +1,9 @@ --- title: Generate UUID (Node.js) -tags: node,random +type: snippet +tags: [node,random] cover: digital-nomad-7 -firstSeen: 2017-12-29T09:47:10+02:00 -lastUpdated: 2022-03-14T17:41:43+03:00 +dateModified: 2022-03-14T17:41:43+03:00 --- Generates a UUID in Node.JS. diff --git a/snippets/validate-number.md b/snippets/validate-number.md index 7bdd0ed37..48982a51a 100644 --- a/snippets/validate-number.md +++ b/snippets/validate-number.md @@ -1,9 +1,9 @@ --- title: Validate number -tags: math +type: snippet +tags: [math] cover: flower-portrait-9 -firstSeen: 2017-12-17T17:55:51+02:00 -lastUpdated: 2020-10-22T20:23:26+03:00 +dateModified: 2020-10-22T20:23:26+03:00 --- Checks if the given value is a number. diff --git a/snippets/vector-angle.md b/snippets/vector-angle.md index a60bbe318..2169fb990 100644 --- a/snippets/vector-angle.md +++ b/snippets/vector-angle.md @@ -1,9 +1,9 @@ --- title: Vector angle -tags: math +type: snippet +tags: [math] cover: avocado-slices -firstSeen: 2019-12-16T16:43:13+02:00 -lastUpdated: 2021-01-08T00:23:44+02:00 +dateModified: 2021-01-08T00:23:44+02:00 --- Calculates the angle (theta) between two vectors. diff --git a/snippets/vector-distance.md b/snippets/vector-distance.md index 9a9c6a7ea..7c1a5d244 100644 --- a/snippets/vector-distance.md +++ b/snippets/vector-distance.md @@ -1,9 +1,9 @@ --- title: Vector distance -tags: math,algorithm +type: snippet +tags: [math,algorithm] cover: orange-coffee-3 -firstSeen: 2019-02-23T19:13:48+02:00 -lastUpdated: 2020-12-28T13:49:24+02:00 +dateModified: 2020-12-28T13:49:24+02:00 --- Calculates the distance between two vectors. diff --git a/snippets/walk-through.md b/snippets/walk-through.md index 99fbed9a7..84671623c 100644 --- a/snippets/walk-through.md +++ b/snippets/walk-through.md @@ -1,10 +1,10 @@ --- title: Walk through object -tags: object,recursion,generator +type: snippet +tags: [object,recursion,generator] author: chalarangelo cover: bridge -firstSeen: 2020-12-31T13:03:15+02:00 -lastUpdated: 2021-11-15T13:18:18+02:00 +dateModified: 2021-11-15T13:18:18+02:00 --- Creates a generator, that walks through all the keys of a given object. diff --git a/snippets/week-of-year.md b/snippets/week-of-year.md index d7a96aa5b..4aebc9f1b 100644 --- a/snippets/week-of-year.md +++ b/snippets/week-of-year.md @@ -1,9 +1,10 @@ --- title: Week of year -tags: date +type: snippet +tags: [date] author: chalarangelo cover: godray-computer-mug -firstSeen: 2021-08-15T05:00:00-04:00 +dateModified: 2021-08-15T05:00:00-04:00 --- Returns the zero-indexed week of the year that a date corresponds to. diff --git a/snippets/weighted-average.md b/snippets/weighted-average.md index d812caaa8..d1bb98a8b 100644 --- a/snippets/weighted-average.md +++ b/snippets/weighted-average.md @@ -1,9 +1,9 @@ --- title: Weighted average -tags: math +type: snippet +tags: [math] cover: interior-12 -firstSeen: 2020-10-04T00:38:33+03:00 -lastUpdated: 2020-11-03T21:46:13+02:00 +dateModified: 2020-11-03T21:46:13+02:00 --- Calculates the weighted average of two or more numbers. diff --git a/snippets/weighted-sample.md b/snippets/weighted-sample.md index 2a47c30ad..aa8e8d65b 100644 --- a/snippets/weighted-sample.md +++ b/snippets/weighted-sample.md @@ -1,10 +1,10 @@ --- title: Weighted sample -tags: array,random +type: snippet +tags: [array,random] author: chalarangelo cover: digital-nomad-14 -firstSeen: 2019-12-31T11:34:26+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 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 9c996b530..9ecddaa8c 100644 --- a/snippets/when.md +++ b/snippets/when.md @@ -1,9 +1,9 @@ --- title: Apply function when condition is met -tags: function,logic +type: snippet +tags: [function,logic] cover: flower-portrait-8 -firstSeen: 2018-04-19T03:45:32+03:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 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 d8c75b1c6..1090a5a50 100644 --- a/snippets/without.md +++ b/snippets/without.md @@ -1,9 +1,9 @@ --- title: Filter out matching array elements -tags: array +type: snippet +tags: [array] cover: dying-flowers -firstSeen: 2017-12-15T09:35:30+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 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/word-wrap.md b/snippets/word-wrap.md index 319f7ae6e..a7dbdedc7 100644 --- a/snippets/word-wrap.md +++ b/snippets/word-wrap.md @@ -1,9 +1,9 @@ --- title: Word wrap string -tags: string,regexp +type: snippet +tags: [string,regexp] cover: white-tablet -firstSeen: 2020-10-06T11:48:41+03:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 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 024fb2e4e..328ce3fdb 100644 --- a/snippets/words.md +++ b/snippets/words.md @@ -1,9 +1,9 @@ --- title: String to words -tags: string,regexp +type: snippet +tags: [string,regexp] cover: sea-view-2 -firstSeen: 2017-12-21T14:50:57+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 2020-10-22T20:24:44+03:00 --- Converts a given string into an array of words. diff --git a/snippets/x-prod.md b/snippets/x-prod.md index 81493a7fd..937b65020 100644 --- a/snippets/x-prod.md +++ b/snippets/x-prod.md @@ -1,9 +1,9 @@ --- title: Cross product of arrays -tags: math,array +type: snippet +tags: [math,array] cover: cup-of-orange -firstSeen: 2018-01-24T15:55:03+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 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 24963ffb3..e3de470e4 100644 --- a/snippets/xor.md +++ b/snippets/xor.md @@ -1,10 +1,10 @@ --- title: Logical xor -tags: math,logic +type: snippet +tags: [math,logic] unlisted: true cover: succulent-11 -firstSeen: 2020-10-05T21:19:21+03:00 -lastUpdated: 2021-01-04T13:04:15+02:00 +dateModified: 2021-01-04T13:04:15+02:00 --- Checks if only one of the arguments is `true`. diff --git a/snippets/yes-no.md b/snippets/yes-no.md index dea9d257b..81f763e4c 100644 --- a/snippets/yes-no.md +++ b/snippets/yes-no.md @@ -1,10 +1,10 @@ --- title: Check yes/no string -tags: string,regexp +type: snippet +tags: [string,regexp] unlisted: true cover: mask-quiet -firstSeen: 2017-12-30T18:35:54+02:00 -lastUpdated: 2021-01-04T13:04:15+02:00 +dateModified: 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 4e7b998f2..087f165cf 100644 --- a/snippets/yesterday.md +++ b/snippets/yesterday.md @@ -1,9 +1,9 @@ --- title: Date of yesterday -tags: date +type: snippet +tags: [date] cover: travel-mug-2 -firstSeen: 2019-07-19T10:57:21+03:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 2020-10-22T20:24:44+03:00 --- Results in a string representation of yesterday's date. diff --git a/snippets/zip-object.md b/snippets/zip-object.md index 174e88935..8de68d882 100644 --- a/snippets/zip-object.md +++ b/snippets/zip-object.md @@ -1,9 +1,9 @@ --- title: Group array into object -tags: array,object +type: snippet +tags: [array,object] cover: baloons-field -firstSeen: 2017-12-21T00:55:18+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 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/zip-with.md b/snippets/zip-with.md index 8541bd4e6..d5d34e658 100644 --- a/snippets/zip-with.md +++ b/snippets/zip-with.md @@ -1,9 +1,9 @@ --- title: Group array elements based on function -tags: array +type: snippet +tags: [array] cover: switzerland-night -firstSeen: 2018-01-20T17:21:34+02:00 -lastUpdated: 2020-11-03T21:46:13+02:00 +dateModified: 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. diff --git a/snippets/zip.md b/snippets/zip.md index 0e5a6eda0..236868d01 100644 --- a/snippets/zip.md +++ b/snippets/zip.md @@ -1,9 +1,9 @@ --- title: Group array elements -tags: array +type: snippet +tags: [array] cover: orange-flower -firstSeen: 2017-12-17T16:41:31+02:00 -lastUpdated: 2020-10-22T20:24:44+03:00 +dateModified: 2020-10-22T20:24:44+03:00 --- Creates an array of elements, grouped based on their position in the original arrays.