Crate lodash_rust

source ·
Expand description

A library for javascript lodash methods in rustlang

This library methods is meant to give the same output as their equivalent in javascript, if you notice any bugs or differences please on an issue.

Usage

First, add this to your Cargo.toml

[dependencies]
lodash_rust = "0.1.0"

Next:

use lodash_rust::capitalize;
 
fn main() {
 let greet = String::from("hello world");
 let res = capitalize::new(greet);
 println!("{res}") // Hello world
}

Modules

  • Converts String to camel case.
  • Converts the first character of String to upper case and the remaining to lower case.
  • Creates an array of array values not included in the other given arrays using SameValueZero
  • Creates a slice of array with n elements dropped from the beginning.
  • Creates a slice of array with n elements dropped from the end.
  • Creates a slice of array excluding elements dropped from the end. Elements are dropped until predicate returns falsy.
  • Creates a slice of array excluding elements dropped from the beginning. Elements are dropped until predicate returns falsy.
  • Checks if predicate returns truthy for all elements of array Iteration is stopped once predicate returns falsy. The predicate is Note: This method returns true for empty vector because everything is true of elements of empty vector.
  • Iterates over elements of array, returning an array of all elements predicate returns truthy for.
  • This method is like find except that it iterates over elements of collection from right to left.
  • Converts String to kebab case. This method is like find except that it iterates over elements of collection from right to left.
  • Converts String to snake case.
  • Converts String to start case.