Deprecate utility tag

This commit is contained in:
Angelos Chalaris
2020-04-16 23:07:33 +03:00
parent 5e42f0aaa4
commit e31aea403d
60 changed files with 118 additions and 117 deletions

View File

@ -1,6 +1,6 @@
--- ---
title: functionName title: functionName
tags: utility,intermediate tags: array,intermediate
--- ---
Explain briefly what the snippet does. Explain briefly what the snippet does.

View File

@ -1,6 +1,6 @@
--- ---
title: CSVToArray title: CSVToArray
tags: string,array,utility,intermediate tags: string,array,intermediate
--- ---
Converts a comma-separated values (CSV) string to a 2D array. Converts a comma-separated values (CSV) string to a 2D array.

View File

@ -1,6 +1,6 @@
--- ---
title: RGBToHex title: RGBToHex
tags: utility,intermediate tags: string,math,intermediate
--- ---
Converts the values of RGB components to a color code. Converts the values of RGB components to a color code.

View File

@ -1,6 +1,6 @@
--- ---
title: URLJoin title: URLJoin
tags: string,utility,regexp,advanced tags: string,regexp,advanced
--- ---
Joins all given URL segments together, then normalizes the resulting URL. Joins all given URL segments together, then normalizes the resulting URL.

View File

@ -1,6 +1,6 @@
--- ---
title: UUIDGeneratorBrowser title: UUIDGeneratorBrowser
tags: browser,utility,random,intermediate tags: browser,random,intermediate
--- ---
Generates a UUID in a browser. Generates a UUID in a browser.

View File

@ -1,6 +1,6 @@
--- ---
title: UUIDGeneratorNode title: UUIDGeneratorNode
tags: node,utility,random,intermediate tags: node,random,intermediate
--- ---
Generates a UUID in Node.JS. Generates a UUID in Node.JS.

View File

@ -1,6 +1,6 @@
--- ---
title: arrayToCSV title: arrayToCSV
tags: array,string,utility,intermediate tags: array,string,intermediate
--- ---
Converts a 2D array to a comma-separated values (CSV) string. Converts a 2D array to a comma-separated values (CSV) string.

View File

@ -1,6 +1,6 @@
--- ---
title: atob title: atob
tags: node,string,utility,beginner tags: node,string,beginner
--- ---
Decodes a string of data which has been encoded using base-64 encoding. Decodes a string of data which has been encoded using base-64 encoding.

View File

@ -1,6 +1,6 @@
--- ---
title: btoa title: btoa
tags: node,string,utility,beginner tags: node,string,beginner
--- ---
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. 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.

View File

@ -1,6 +1,6 @@
--- ---
title: castArray title: castArray
tags: utility,array,type,beginner tags: type,array,beginner
--- ---
Casts the provided value as an array if it's not one. Casts the provided value as an array if it's not one.

View File

@ -1,6 +1,6 @@
--- ---
title: checkProp title: checkProp
tags: function,object,utility,beginner tags: function,object,beginner
--- ---
Given a `predicate` function and a `prop` string, this curried function will then take an `object` to inspect by calling the property and passing it to the predicate. Given a `predicate` function and a `prop` string, this curried function will then take an `object` to inspect by calling the property and passing it to the predicate.

View File

@ -1,6 +1,6 @@
--- ---
title: cloneRegExp title: cloneRegExp
tags: utility,regexp,intermediate tags: type,string,regexp,intermediate
--- ---
Clones a regular expression. Clones a regular expression.

View File

@ -1,6 +1,6 @@
--- ---
title: coalesce title: coalesce
tags: utility,beginner tags: type,beginner
--- ---
Returns the first defined, non-null argument. Returns the first defined, non-null argument.

View File

@ -1,6 +1,6 @@
--- ---
title: coalesceFactory title: coalesceFactory
tags: utility,intermediate tags: type,intermediate
--- ---
Returns a customized coalesce function that returns the first argument that returns `true` from the provided argument validation function. Returns a customized coalesce function that returns the first argument that returns `true` from the provided argument validation function.

View File

@ -1,6 +1,6 @@
--- ---
title: colorize title: colorize
tags: node,utility,string,intermediate tags: node,string,intermediate
--- ---
Add special characters to text to print in color in the console (combined with `console.log()`). Add special characters to text to print in color in the console (combined with `console.log()`).

View File

@ -1,6 +1,6 @@
--- ---
title: createElement title: createElement
tags: browser,utility,beginner tags: browser,beginner
--- ---
Creates an element from a string (without appending it to the document). Creates an element from a string (without appending it to the document).

View File

@ -1,6 +1,6 @@
--- ---
title: extendHex title: extendHex
tags: utility,string,intermediate tags: string,intermediate
--- ---
Extends a 3-digit color code to a 6-digit color code. Extends a 3-digit color code to a 6-digit color code.

View File

@ -1,6 +1,6 @@
--- ---
title: formatDuration title: formatDuration
tags: date,math,string,utility,intermediate tags: date,math,string,intermediate
--- ---
Returns the human readable format of the given number of milliseconds. Returns the human readable format of the given number of milliseconds.

View File

@ -1,6 +1,6 @@
--- ---
title: functionName title: functionName
tags: function,utility,beginner tags: function,beginner
--- ---
Logs the name of a function. Logs the name of a function.

View File

@ -1,6 +1,6 @@
--- ---
title: getURLParameters title: getURLParameters
tags: utility,browser,string,url,intermediate tags: browser,string,url,intermediate
--- ---
Returns an object containing the parameters of the current URL. Returns an object containing the parameters of the current URL.

View File

@ -1,6 +1,6 @@
--- ---
title: hashBrowser title: hashBrowser
tags: browser,utility,advanced,promise,advanced tags: browser,advanced,promise,advanced
--- ---
Creates a hash for a value using the [SHA-256](https://en.wikipedia.org/wiki/SHA-2) algorithm. Returns a promise. Creates a hash for a value using the [SHA-256](https://en.wikipedia.org/wiki/SHA-2) algorithm. Returns a promise.

View File

@ -1,6 +1,6 @@
--- ---
title: hashNode title: hashNode
tags: node,utility,promise,intermediate tags: node,promise,intermediate
--- ---
Creates a hash for a value using the [SHA-256](https://en.wikipedia.org/wiki/SHA-2) algorithm. Returns a promise. Creates a hash for a value using the [SHA-256](https://en.wikipedia.org/wiki/SHA-2) algorithm. Returns a promise.

View File

@ -1,6 +1,6 @@
--- ---
title: hexToRGB title: hexToRGB
tags: utility,string,math,advanced tags: string,math,advanced
--- ---
Converts a color code to a `rgb()` or `rgba()` string if alpha value is provided. Converts a color code to a `rgb()` or `rgba()` string if alpha value is provided.

View File

@ -1,6 +1,6 @@
--- ---
title: httpDelete title: httpDelete
tags: utility,url,browser,intermediate tags: browser,url,intermediate
--- ---
Makes a `DELETE` request to the passed URL. Makes a `DELETE` request to the passed URL.

View File

@ -1,6 +1,6 @@
--- ---
title: httpGet title: httpGet
tags: utility,url,browser,intermediate tags: browser,url,intermediate
--- ---
Makes a `GET` request to the passed URL. Makes a `GET` request to the passed URL.

View File

@ -1,6 +1,6 @@
--- ---
title: httpPost title: httpPost
tags: utility,url,browser,intermediate tags: browser,url,intermediate
--- ---
Makes a `POST` request to the passed URL. Makes a `POST` request to the passed URL.

View File

@ -1,6 +1,6 @@
--- ---
title: httpPut title: httpPut
tags: utility,url,browser,intermediate tags: browser,url,intermediate
--- ---
Makes a `PUT` request to the passed URL. Makes a `PUT` request to the passed URL.

View File

@ -1,6 +1,6 @@
--- ---
title: indentString title: indentString
tags: string,utility,beginner tags: string,beginner
--- ---
Indents each line in the provided string. Indents each line in the provided string.

View File

@ -1,6 +1,6 @@
--- ---
title: isAbsoluteURL title: isAbsoluteURL
tags: string,utility,browser,url,intermediate tags: string,browser,url,intermediate
--- ---
Returns `true` if the given string is an absolute URL, `false` otherwise. Returns `true` if the given string is an absolute URL, `false` otherwise.

View File

@ -1,6 +1,6 @@
--- ---
title: isAfterDate title: isAfterDate
tags: date,utility,beginner tags: date,beginner
--- ---
Check if a date is after another date. Check if a date is after another date.

View File

@ -1,6 +1,6 @@
--- ---
title: isBeforeDate title: isBeforeDate
tags: date,utility,beginner tags: date,beginner
--- ---
Check if a date is before another date. Check if a date is before another date.

View File

@ -1,6 +1,6 @@
--- ---
title: isBrowser title: isBrowser
tags: utility,browser,intermediate tags: browser,intermediate
--- ---
Determines if the current runtime environment is a browser so that front-end modules can run on the server (Node) without throwing errors. Determines if the current runtime environment is a browser so that front-end modules can run on the server (Node) without throwing errors.

View File

@ -1,6 +1,6 @@
--- ---
title: isLowerCase title: isLowerCase
tags: string,utility,beginner tags: string,beginner
--- ---
Checks if a string is lower case. Checks if a string is lower case.

View File

@ -1,6 +1,6 @@
--- ---
title: isNegativeZero title: isNegativeZero
tags: math,utility,beginner tags: math,beginner
--- ---
Checks if the given value is equal to negative zero (`-0`). Checks if the given value is equal to negative zero (`-0`).

View File

@ -1,6 +1,6 @@
--- ---
title: isSameDate title: isSameDate
tags: date,utility,beginner tags: date,beginner
--- ---
Check if a date is the same as another date. Check if a date is the same as another date.

View File

@ -1,6 +1,6 @@
--- ---
title: isUpperCase title: isUpperCase
tags: string,utility,beginner tags: string,beginner
--- ---
Checks if a string is upper case. Checks if a string is upper case.

View File

@ -1,6 +1,6 @@
--- ---
title: longestItem title: longestItem
tags: array,string,utility,intermediate tags: array,string,intermediate
--- ---
Takes any number of iterable objects or objects with a `length` property and returns the longest one. Takes any number of iterable objects or objects with a `length` property and returns the longest one.

View File

@ -1,6 +1,6 @@
--- ---
title: luhnCheck title: luhnCheck
tags: math,utility,advanced tags: math,advanced
--- ---
Implementation of the [Luhn Algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) used to validate a variety of identification numbers, such as credit card numbers, IMEI numbers, National Provider Identifier numbers etc. Implementation of the [Luhn Algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) used to validate a variety of identification numbers, such as credit card numbers, IMEI numbers, National Provider Identifier numbers etc.

View File

@ -1,6 +1,6 @@
--- ---
title: mapString title: mapString
tags: string,array,function,utility,beginner tags: string,array,function,beginner
--- ---
Creates a new string with the results of calling a provided function on every character in the calling string. Creates a new string with the results of calling a provided function on every character in the calling string.

View File

@ -1,6 +1,6 @@
--- ---
title: mask title: mask
tags: string,utility,intermediate tags: string,intermediate
--- ---
Replaces all but the last `num` of characters with the specified mask character. Replaces all but the last `num` of characters with the specified mask character.

View File

@ -1,6 +1,6 @@
--- ---
title: mostPerformant title: mostPerformant
tags: utility,function tags: function,intermediate
--- ---
Returns the index of the function in an array of functions which executed the fastest. Returns the index of the function in an array of functions which executed the fastest.

View File

@ -1,6 +1,6 @@
--- ---
title: nthArg title: nthArg
tags: utility,function,beginner tags: function,beginner
--- ---
Creates a function that gets the argument at index `n`. If `n` is negative, the nth argument from the end is returned. Creates a function that gets the argument at index `n`. If `n` is negative, the nth argument from the end is returned.

View File

@ -1,6 +1,6 @@
--- ---
title: objectToQueryString title: objectToQueryString
tags: utility,object,function,intermediate tags: object,function,intermediate
--- ---
Returns a query string generated from the key-value pairs of the given object. Returns a query string generated from the key-value pairs of the given object.

View File

@ -1,6 +1,6 @@
--- ---
title: parseCookie title: parseCookie
tags: utility,string,intermediate tags: browser,string,intermediate
--- ---
Parse an HTTP Cookie header string and return an object of all cookie name-value pairs. Parse an HTTP Cookie header string and return an object of all cookie name-value pairs.

View File

@ -1,6 +1,6 @@
--- ---
title: prefix title: prefix
tags: browser,utility,intermediate tags: browser,intermediate
--- ---
Returns the prefixed version (if necessary) of a CSS property that the browser supports. Returns the prefixed version (if necessary) of a CSS property that the browser supports.

View File

@ -1,6 +1,6 @@
--- ---
title: prettyBytes title: prettyBytes
tags: utility,string,math,advanced tags: string,math,advanced
--- ---
Converts a number in bytes to a human-readable string. Converts a number in bytes to a human-readable string.

View File

@ -1,11 +1,12 @@
--- ---
title: randomHexColorCode title: randomHexColorCode
tags: utility,random,beginner tags: math,random,beginner
--- ---
Generates a random hexadecimal color code. Generates a random hexadecimal color code.
Use `Math.random` to generate a random 24-bit(6x4bits) hexadecimal number. Use bit shifting and then convert it to an hexadecimal String using `toString(16)`. Use `Math.random` to generate a random 24-bit(6x4bits) hexadecimal number.
Use bit shifting and then convert it to an hexadecimal String using `toString(16)`.
```js ```js
const randomHexColorCode = () => { const randomHexColorCode = () => {

View File

@ -1,6 +1,6 @@
--- ---
title: randomIntArrayInRange title: randomIntArrayInRange
tags: math,utility,random,intermediate tags: math,random,intermediate
--- ---
Returns an array of n random integers in the specified range. Returns an array of n random integers in the specified range.

View File

@ -1,6 +1,6 @@
--- ---
title: randomIntegerInRange title: randomIntegerInRange
tags: math,utility,random,beginner tags: math,random,beginner
--- ---
Returns a random integer in the specified range. Returns a random integer in the specified range.

View File

@ -1,6 +1,6 @@
--- ---
title: randomNumberInRange title: randomNumberInRange
tags: math,utility,random,beginner tags: math,random,beginner
--- ---
Returns a random number in the specified range. Returns a random number in the specified range.

View File

@ -1,6 +1,6 @@
--- ---
title: recordAnimationFrames title: recordAnimationFrames
tags: browser,utility,intermediate tags: browser,intermediate
--- ---
Invokes the provided callback on each animation frame. Invokes the provided callback on each animation frame.

View File

@ -1,6 +1,6 @@
--- ---
title: sdbm title: sdbm
tags: math,utility,intermediate tags: math,intermediate
--- ---
Hashes the input string into a whole number. Hashes the input string into a whole number.

View File

@ -1,6 +1,6 @@
--- ---
title: serializeCookie title: serializeCookie
tags: utility,string,intermediate tags: browser,string,intermediate
--- ---
Serialize a cookie name-value pair into a Set-Cookie header string. Serialize a cookie name-value pair into a Set-Cookie header string.

View File

@ -1,6 +1,6 @@
--- ---
title: stripHTMLTags title: stripHTMLTags
tags: string,utility,regexp,beginner tags: string,regexp,beginner
--- ---
Removes HTML/XML tags from string. Removes HTML/XML tags from string.

View File

@ -1,6 +1,6 @@
--- ---
title: timeTaken title: timeTaken
tags: utility,beginner tags: function,beginner
--- ---
Measures the time taken by a function to execute. Measures the time taken by a function to execute.

View File

@ -1,6 +1,6 @@
--- ---
title: toCurrency title: toCurrency
tags: utility,intermediate tags: math,string,intermediate
--- ---
Take a number and return specified currency formatting. Take a number and return specified currency formatting.

View File

@ -1,6 +1,6 @@
--- ---
title: toDecimalMark title: toDecimalMark
tags: utility,math,beginner tags: math,beginner
--- ---
Converts a number to a decimal mark formatted string. Converts a number to a decimal mark formatted string.

View File

@ -1,6 +1,6 @@
--- ---
title: toOrdinalSuffix title: toOrdinalSuffix
tags: utility,math,intermediate tags: math,intermediate
--- ---
Adds an ordinal suffix to a number. Adds an ordinal suffix to a number.

View File

@ -1,6 +1,6 @@
--- ---
title: validateNumber title: validateNumber
tags: utility,math,intermediate tags: math,intermediate
--- ---
Returns `true` if the given value is a number, `false` otherwise. Returns `true` if the given value is a number, `false` otherwise.

View File

@ -1,6 +1,6 @@
--- ---
title: yesNo title: yesNo
tags: utility,regexp,intermediate tags: string,regexp,intermediate
--- ---
Returns `true` if the string is `y`/`yes` or `false` if the string is `n`/`no`. Returns `true` if the string is `y`/`yes` or `false` if the string is `n`/`no`.