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 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

  • 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 given target string.
  • Gets the value at path of object. If the resolved value is None, the default_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 of map through the mapper 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 to precision.
  • Sets the value at key of object. If the key doesn’t exist, it’s created.
  • Split the input string into an array of its words.