Re-tag function snippets
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: all
|
title: all
|
||||||
tags: array,function,beginner
|
tags: array,beginner
|
||||||
---
|
---
|
||||||
|
|
||||||
Returns `true` if the provided predicate function returns `true` for all elements in a collection, `false` otherwise.
|
Returns `true` if the provided predicate function returns `true` for all elements in a collection, `false` otherwise.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: allEqual
|
title: allEqual
|
||||||
tags: array,function,beginner
|
tags: array,beginner
|
||||||
---
|
---
|
||||||
|
|
||||||
Check if all elements in an array are equal.
|
Check if all elements in an array are equal.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: any
|
title: any
|
||||||
tags: array,function,beginner
|
tags: array,beginner
|
||||||
---
|
---
|
||||||
|
|
||||||
Returns `true` if the provided predicate function returns `true` for at least one element in a collection, `false` otherwise.
|
Returns `true` if the provided predicate function returns `true` for at least one element in a collection, `false` otherwise.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: differenceWith
|
title: differenceWith
|
||||||
tags: array,function,intermediate
|
tags: array,intermediate
|
||||||
---
|
---
|
||||||
|
|
||||||
Filters out all values from an array for which the comparator function does not return `true`.
|
Filters out all values from an array for which the comparator function does not return `true`.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: dropRightWhile
|
title: dropRightWhile
|
||||||
tags: array,function,intermediate
|
tags: array,intermediate
|
||||||
---
|
---
|
||||||
|
|
||||||
Removes elements from the end of an array until the passed function returns `true`. Returns the remaining elements in the array.
|
Removes elements from the end of an array until the passed function returns `true`. Returns the remaining elements in the array.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: dropWhile
|
title: dropWhile
|
||||||
tags: array,function,intermediate
|
tags: array,intermediate
|
||||||
---
|
---
|
||||||
|
|
||||||
Removes elements in an array until the passed function returns `true`. Returns the remaining elements in the array.
|
Removes elements in an array until the passed function returns `true`. Returns the remaining elements in the array.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: findKey
|
title: findKey
|
||||||
tags: object,function,intermediate
|
tags: object,intermediate
|
||||||
---
|
---
|
||||||
|
|
||||||
Returns the first key that satisfies the provided testing function. Otherwise `undefined` is returned.
|
Returns the first key that satisfies the provided testing function. Otherwise `undefined` is returned.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: findLastIndex
|
title: findLastIndex
|
||||||
tags: array,function,intermediate
|
tags: array,intermediate
|
||||||
---
|
---
|
||||||
|
|
||||||
Returns the index of the last element for which the provided function returns a truthy value.
|
Returns the index of the last element for which the provided function returns a truthy value.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: findLastKey
|
title: findLastKey
|
||||||
tags: object,function,intermediate
|
tags: object,intermediate
|
||||||
---
|
---
|
||||||
|
|
||||||
Returns the last key that satisfies the provided testing function.
|
Returns the last key that satisfies the provided testing function.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: forEachRight
|
title: forEachRight
|
||||||
tags: array,function,intermediate
|
tags: array,intermediate
|
||||||
---
|
---
|
||||||
|
|
||||||
Executes a provided function once for each array element, starting from the array's last element.
|
Executes a provided function once for each array element, starting from the array's last element.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: intersectionWith
|
title: intersectionWith
|
||||||
tags: array,function,intermediate
|
tags: array,intermediate
|
||||||
---
|
---
|
||||||
|
|
||||||
Returns the elements that exist in both arrays, using a provided comparator function.
|
Returns the elements that exist in both arrays, using a provided comparator function.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: invertKeyValues
|
title: invertKeyValues
|
||||||
tags: object,function,intermediate
|
tags: object,intermediate
|
||||||
---
|
---
|
||||||
|
|
||||||
Inverts the key-value pairs of an object, without mutating it. The corresponding inverted value of each inverted key is an array of keys responsible for generating the inverted value. If a function is supplied, it is applied to each inverted key.
|
Inverts the key-value pairs of an object, without mutating it. The corresponding inverted value of each inverted key is an array of keys responsible for generating the inverted value. If a function is supplied, it is applied to each inverted key.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: mapKeys
|
title: mapKeys
|
||||||
tags: object,function,intermediate
|
tags: object,intermediate
|
||||||
---
|
---
|
||||||
|
|
||||||
Creates an object with keys generated by running the provided function for each key and the same values as the provided object.
|
Creates an object with keys generated by running the provided function for each key and the same values as the provided object.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: mapValues
|
title: mapValues
|
||||||
tags: object,function,intermediate
|
tags: object,intermediate
|
||||||
---
|
---
|
||||||
|
|
||||||
Creates an object with the same keys as the provided object and values generated by running the provided function for each value.
|
Creates an object with the same keys as the provided object and values generated by running the provided function for each value.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: matchesWith
|
title: matchesWith
|
||||||
tags: object,type,function,intermediate
|
tags: object,type,intermediate
|
||||||
---
|
---
|
||||||
|
|
||||||
Compares two objects to determine if the first one contains equivalent property values to the second one, based on a provided function.
|
Compares two objects to determine if the first one contains equivalent property values to the second one, based on a provided function.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: none
|
title: none
|
||||||
tags: array,function,beginner
|
tags: array,beginner
|
||||||
---
|
---
|
||||||
|
|
||||||
Returns `true` if the provided predicate function returns `false` for all elements in a collection, `false` otherwise.
|
Returns `true` if the provided predicate function returns `false` for all elements in a collection, `false` otherwise.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: objectToQueryString
|
title: objectToQueryString
|
||||||
tags: object,function,intermediate
|
tags: object,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.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: partition
|
title: partition
|
||||||
tags: array,object,function,intermediate
|
tags: array,object,intermediate
|
||||||
---
|
---
|
||||||
|
|
||||||
Groups the elements into two arrays, depending on the provided function's truthiness for each element.
|
Groups the elements into two arrays, depending on the provided function's truthiness for each element.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: reduceSuccessive
|
title: reduceSuccessive
|
||||||
tags: array,function,intermediate
|
tags: array,intermediate
|
||||||
---
|
---
|
||||||
|
|
||||||
Applies a function against an accumulator and each element in the array (from left to right), returning an array of successively reduced values.
|
Applies a function against an accumulator and each element in the array (from left to right), returning an array of successively reduced values.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: reduceWhich
|
title: reduceWhich
|
||||||
tags: array,function,intermediate
|
tags: array,intermediate
|
||||||
---
|
---
|
||||||
|
|
||||||
Returns the minimum/maximum value of an array, after applying the provided function to set comparing rule.
|
Returns the minimum/maximum value of an array, after applying the provided function to set comparing rule.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: takeRightWhile
|
title: takeRightWhile
|
||||||
tags: array,function,intermediate
|
tags: array,intermediate
|
||||||
---
|
---
|
||||||
|
|
||||||
Removes elements from the end of an array until the passed function returns `true`. Returns the removed elements.
|
Removes elements from the end of an array until the passed function returns `true`. Returns the removed elements.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: takeWhile
|
title: takeWhile
|
||||||
tags: array,function,intermediate
|
tags: array,intermediate
|
||||||
---
|
---
|
||||||
|
|
||||||
Removes elements in an array until the passed function returns `true`. Returns the removed elements.
|
Removes elements in an array until the passed function returns `true`. Returns the removed elements.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: unionWith
|
title: unionWith
|
||||||
tags: array,function,intermediate
|
tags: array,intermediate
|
||||||
---
|
---
|
||||||
|
|
||||||
Returns every element that exists in any of the two arrays once, using a provided comparator function.
|
Returns every element that exists in any of the two arrays once, using a provided comparator function.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: unzipWith
|
title: unzipWith
|
||||||
tags: array,function,advanced
|
tags: array,advanced
|
||||||
---
|
---
|
||||||
|
|
||||||
Creates an array of elements, ungrouping the elements in an array produced by [zip](#zip) and applying the provided function.
|
Creates an array of elements, ungrouping the elements in an array produced by [zip](#zip) and applying the provided function.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: zipWith
|
title: zipWith
|
||||||
tags: array,function,advanced
|
tags: array,advanced
|
||||||
---
|
---
|
||||||
|
|
||||||
Creates an array of elements, grouped based on the position in the original arrays and using function as the last value to specify how grouped values should be combined.
|
Creates an array of elements, grouped based on the position in the original arrays and using function as the last value to specify how grouped values should be combined.
|
||||||
|
|||||||
Reference in New Issue
Block a user