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
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 anOption
for a sender which is used to send messages to the worker thread. It also holds anOption
for a JoinHandle for the worker thread. Thedebounce_config
stores the closure and delay information.
Functions
- Converts the first character of the input string to uppercase and the remaining characters to lowercase.
- Debounce function takes a closure and a delay, and returns a
Debounce
struct. - Deburrs a string by converting Latin-1 Supplement and Latin Extended-A letters to basic Latin letters and removing combining diacritical marks.
- Checks if
string
ends with the giventarget
string. - Gets the value at
path
ofobject
. If the resolved value isNone
, thedefault_value
is returned in its place. - 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”). - Converts a
String
to kebab case. - Creates a new HashMap with the same keys as
map
and values generated by running each key-value pair ofmap
through themapper
function. - Merges two objects recursively, assigning properties from source objects to the destination object.
- Creates a new HashMap composed of the picked properties from the source HashMap.
- Computes
number
rounded toprecision
. - Sets the value at
key
ofobject
. If thekey
doesn’t exist, it’s created. - Split the input string into an array of its words.