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

Refactor collapseLeadingSlashes function for simplicity and readability #183

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Commits on Nov 6, 2024

  1. Refactor zeroPad to use padStart for improved readability

    Replaced the manual loop with `padStart` to simplify the code and improve readability. This aligns with modern JavaScript practices, making the function more concise and easier to maintain. No functional changesjust a cleaner, more efficient approach to padding numbers with leading zeros.
    Ayoub-Mabrouk committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    61e8474 View commit details
    Browse the repository at this point in the history
  2. Refactor collapseLeadingSlashes function for simplicity and readability

    Replaced the old implementation of collapseLeadingSlashes, which iterated over each character, with a more concise and efficient version using a regular expression. The new version uses 
    eplace() to collapse leading slashes into a single slash and handles empty strings by returning '/'. This update improves code readability and leverages modern JavaScript string methods.
    Ayoub-Mabrouk committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    8574a80 View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2024

  1. Refactor collapseLeadingSlashes function for simplicity and readability

    Replaced the old implementation of collapseLeadingSlashes, which iterated over each character, with a more concise and efficient version using a regular expression. The new version uses 
    eplace() to collapse leading slashes into a single slash and handles empty strings by returning '/'. This update improves code readability and leverages modern JavaScript string methods.
    Ayoub-Mabrouk committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    ae5c141 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    af7cd7b View commit details
    Browse the repository at this point in the history
  3. Refactor zeroPad to use padStart for improved readability

    Replaced the manual loop with `padStart` to simplify the code and improve readability. This aligns with modern JavaScript practices, making the function more concise and easier to maintain. No functional changesjust a cleaner, more efficient approach to padding numbers with leading zeros.
    Ayoub-Mabrouk committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    7fc73c8 View commit details
    Browse the repository at this point in the history
  4. Refactor zeroPad to use padStart for improved readability Replaced th…

    …e manual loop with padStart to simplify the code and improve readability. This aligns with modern JavaScript practices, making the function more concise and easier to maintain. No functional changesjust a cleaner, more efficient approach to padding numbers with leading zeros.
    Ayoub-Mabrouk committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    9a94734 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fbf723b View commit details
    Browse the repository at this point in the history
  6. Refactor collapseLeadingSlashes function for simplicity and readability

    Replaced the old implementation of collapseLeadingSlashes, which iterated over each character, with a more concise and efficient version using a regular expression. The new version uses 
    eplace() to collapse leading slashes into a single slash and handles empty strings by returning '/'. This update improves code readability and leverages modern JavaScript string methods.
    Ayoub-Mabrouk committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    d3f9d3c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3f73a4b View commit details
    Browse the repository at this point in the history