Clear and concise description of the problem
Currently, the Lorust library lacks support for utility functions dealing with numbers. This leaves a gap in functionality that could benefit various applications that require mathematical operations, rounding, or other number manipulations.
Suggested solution
- Create a new module called
number under the src directory.
- Implement the most commonly used lodash
number utility functions in this module, such as:
add
ceil
floor
max
min
round
subtract
- Include thorough unit tests to cover all edge cases for each function.
- Update the README to indicate that the
number category is now supported.
Code Example:
// src/number/mod.rs
pub fn add(a: f64, b: f64) -> f64 {
a + b
}
pub fn ceil(value: f64, precision: u32) -> f64 {
// implementation here
}
// ... more functions
Alternative
An alternative approach would be to introduce these functions incrementally in smaller batches, prioritizing the most commonly used or requested ones first.
Additional context
Having a number category that mimics lodash's number utilities would provide a more complete utility experience in Rust, thereby possibly attracting more developers to adopt Lorust in their projects. This would align well with the library's goal of being the Rust version of Lodash.
Validations
Clear and concise description of the problem
Currently, the Lorust library lacks support for utility functions dealing with numbers. This leaves a gap in functionality that could benefit various applications that require mathematical operations, rounding, or other number manipulations.
Suggested solution
numberunder thesrcdirectory.numberutility functions in this module, such as:addceilfloormaxminroundsubtractnumbercategory is now supported.Code Example:
Alternative
An alternative approach would be to introduce these functions incrementally in smaller batches, prioritizing the most commonly used or requested ones first.
Additional context
Having a
numbercategory that mimics lodash'snumberutilities would provide a more complete utility experience in Rust, thereby possibly attracting more developers to adopt Lorust in their projects. This would align well with the library's goal of being the Rust version of Lodash.Validations