package
0.0.0-20241124205504-36ac48ec4307
Repository: https://github.com/frantjc/x.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
No description provided by the author
Every tests whether all elements in the array pass the test implemented by the provided function.
Filter creates a new array with all elements that pass the test implemented by the provided function.
Find returns the first element in the provided array that satisfies the provided testing function.
FindIndex returns the index of the first element in the array that satisfies the provided testing function.
ForEach executes a provided function once for each array element.
Includes determines whether an array includes a certain value among its entries, returning true or false as appropriate.
IndexOf returns the first index at which a given element can be found in the array, or -1 if it is not present.
Join creates and returns a new string by concatenating all of the elements in an array (or an array-like object), separated by commas or a specified separator string.
LastIndexOf returns the last index at which a given element can be found in the array, or -1 if it is not present.
Map creates a new array populated with the results of calling a provided function on every element in the calling array.
No description provided by the author
Reduce executes a user-supplied "reducer" callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element.
ReduceRight applies a function against an accumulator and each value of the array (from right-to-left) to reduce it to a single value.
Reverse creates a new array by reversing the given array.
Slice returns a shallow copy of a portion of an array into a new array object selected from start to end (end not included) where start and end represent the index of items in that array.
Some tests whether at least one element in the array passes the test implemented by the provided function.
Sort creates a new array by sorting the elements of the given array and returns the sorted array.
Unique creates a new array with only unique elements from the given array.
# Type aliases
AnySlice is an array of any and has methods that mimic a subset of the JavaScript array functions.