| Crates.io | highdash |
| lib.rs | highdash |
| version | 0.0.1 |
| created_at | 2023-03-04 12:44:07.299125+00 |
| updated_at | 2023-03-04 18:16:35.495523+00 |
| description | A lodash alternative for Rust. Great package for people coming from Javascript |
| homepage | https://github.com/himanshurajora/highdash |
| repository | https://github.com/himanshurajora/highdash |
| max_upload_size | |
| id | 800613 |
| size | 9,322 |
You have decided switch to Rust from JavaScript but are missing some of the cool libraries such as lodash. This library tries to implement Lodash in rust and gives the experience as close as possible to lodash. Currently It is in development and has only implemented a few array methods. I am constantly working on it and adding new features. Hopefully this library will serve its purpose.
Installation
cargo add highdash
Example
use highdash::{gstr, map};
#[allow(unused)]
#[derive(Debug)]
struct User {
name: String,
age: i32,
}
fn main() {
let user = User {
name: gstr("Himanshu"),
age: 20,
};
// It works for both arrays and vectors
let users1 = vec![user];
let names_only = map::<User, String>(&users1, |user, _i| return format!("{_i}: {}", user.name));
print!("{:?}", names_only);
}
// Output: ["0: Himanshu"]
Currently, Open For Contribution
Thanks for visiting!
Made by Vedik Dev: Himanshu Jangid