Crate rodash

Source
Expand description

§rodash

Latest Version Rust Documentation

This crate provides performant general-purpose utility functions inspired by the lodash library for the JavaScript ecosystem.

Traits§

Difference
A trait that implements the Difference::difference method on arrays.
DifferenceAll
A trait that implements the DifferenceAll::difference_all method on arrays.
Escape
A trait that implements the Escape::escape method on strings.
IndexOf
A trait that implements the IndexOf::index_of method on arrays.
Initial
A trait that implements the Initial::initial method on arrays.
Intersect
A trait that implements the Intersect::intersect method on arrays.
IntersectAll
A trait that implements the IntersectAll::intersect_all method on arrays.
Mean
A trait that implements the Mean::mean method on arrays.
Pull
A trait that implements the Pull::pull method on arrays.
PullAll
A trait that implements the PullAll::pull_all method on arrays.
Sample
A trait that implements the Sample::sample method on arrays.
Shuffle
A trait that implements the Shuffle::shuffle method on arrays.
Tail
A trait that implements the Tail::tail method on arrays.
Unescape
A trait that implements the Unescape::unescape method on strings.
Uniq
A trait that implements the Uniq::uniq method on arrays.

Functions§

difference
Creates a vector of array values not included in the other array.
difference_all
Creates a vector of array values not included in the others nested arrays.
escape
Converts the characters “&”, “<”, “>”, ‘“’, and “’” in value to their corresponding HTML entities.
index_of
Gets the index at which the first occurrence of element is found in the array.
initial
Gets all but the last element of array.
intersect
Creates an array of unique values that are included in both the array and other arrays. The order of result values are determined by the array.
intersect_all
Creates an array of unique values that are included in both the array and others nested arrays. The order of result values are determined by the array.
mean
Computes the mean of the values in array.
pull
Removes a single given value from array.
pull_all
This method is like pull except that it accepts an array of values to remove.
sample
Gets a random element from array.
shuffle
Creates an array of shuffled values.
tail
Gets all but the first element of array.
unescape
The inverse of escape. This method converts the HTML entities &amp;, &lt;, &gt;, &quot; and &#39; in value to their corresponding characters.
uniq
Creates a duplicate-free version of an array, in which only the first occurrence of each element is kept. The order of result values is determined by the order they occur in the array.