Crate lorust

Source
Expand description

§Lorust - API Documentation

Lorust is the Rust version of Lodash, which is a modern Javascript utilty library delivering modularity, performance & extras.

§Usage

Depend on lorust in Cargo.toml:

[dependencies]
lorust = "0.1.0"

Structs§

Debounce
Debounce struct enables calling the provided closure after a specified delay. The delay is reset if another call is made before the delay duration has passed. It holds an Option for a sender which is used to send messages to the worker thread. It also holds an Option for a JoinHandle for the worker thread. The debounce_config stores the closure and delay information.

Functions§

capitalize
Converts the first character of the input string to uppercase and the remaining characters to lowercase.
debounce
Debounce function takes a closure and a delay, and returns a Debounce struct.
deburr
Deburrs a string by converting Latin-1 Supplement and Latin Extended-A letters to basic Latin letters and removing combining diacritical marks.
ends_with
Checks if string ends with the given target string.
get
Gets the value at path of object. If the resolved value is None, the default_value is returned in its place.
is_number
The is_number function takes a string and returns a boolean value. It checks if the input string can be parsed into a f64 number excluding the special f64 number cases (i.e., “inf”, “-inf”, “+inf”, “infinity”, “-infinity”, “+infinity”, “nan”).
kebab_case
Converts a String to kebab case.
map_values
Creates a new HashMap with the same keys as map and values generated by running each key-value pair of map through the mapper function.
merge
Merges two objects recursively, assigning properties from source objects to the destination object.
pick
Creates a new HashMap composed of the picked properties from the source HashMap.
round
Computes number rounded to precision.
set
Sets the value at key of object. If the key doesn’t exist, it’s created.
words
Split the input string into an array of its words.