Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT]: Add the number lodash into this package #16

Open
3 tasks done
ImBIOS opened this issue Sep 7, 2023 · 0 comments
Open
3 tasks done

[FEAT]: Add the number lodash into this package #16

ImBIOS opened this issue Sep 7, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest

Comments

@ImBIOS
Copy link
Owner

ImBIOS commented Sep 7, 2023

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

  1. Create a new module called number under the src directory.
  2. Implement the most commonly used lodash number utility functions in this module, such as:
    • add
    • ceil
    • floor
    • max
    • min
    • round
    • subtract
  3. Include thorough unit tests to cover all edge cases for each function.
  4. 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

@ImBIOS ImBIOS added enhancement New feature or request good first issue Good for newcomers labels Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest
Projects
None yet
Development

No branches or pull requests

1 participant