Update frontmatter data
This commit is contained in:
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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`.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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`.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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`.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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()`).
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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`.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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).
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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`.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user