Skip to content

Commit

Permalink
Merge pull request #1919 from 30-seconds/updated-frontmatter
Browse files Browse the repository at this point in the history
Updated frontmatter
  • Loading branch information
Chalarangelo authored Apr 28, 2023
2 parents 705e4e0 + 1c378c2 commit 3c6e115
Show file tree
Hide file tree
Showing 578 changed files with 1,734 additions and 1,680 deletions.
5 changes: 3 additions & 2 deletions snippet-template.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
title: Function name
tags: array
type: snippet
tags: [array]
cover: image
firstSeen: 2021-06-13T05:00:00-04:00
dateModified: 2021-06-13T05:00:00-04:00
---

Explain briefly what the snippet does.
Expand Down
6 changes: 3 additions & 3 deletions snippets/accumulate.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/add-class.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/add-days-to-date.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/add-event-listener-all.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/add-minutes-to-date.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/add-multiple-events.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/add-styles.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/add-week-days.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/all-equal-by.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/all-equal.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/all-unique-by.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/all-unique.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/all.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
5 changes: 3 additions & 2 deletions snippets/alphabetical.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/and.md
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down
6 changes: 3 additions & 3 deletions snippets/any.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/aperture.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/approximately-equal.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/arithmetic-progression.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/array-to-csv.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/array-to-html-list.md
Original file line number Diff line number Diff line change
@@ -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 `<li>` tags and appends them to the list of the given id.
Expand Down
6 changes: 3 additions & 3 deletions snippets/ary.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
5 changes: 3 additions & 2 deletions snippets/assert-valid-keys.md
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down
6 changes: 3 additions & 3 deletions snippets/atob.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/attempt.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/average-by.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/average.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/bifurcate-by.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions snippets/bifurcate.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Loading

0 comments on commit 3c6e115

Please sign in to comment.