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

Enhanced MS Version 4 #6

Merged
merged 9 commits into from
Feb 8, 2025
Merged

Enhanced MS Version 4 #6

merged 9 commits into from
Feb 8, 2025

Conversation

apteryxxyz
Copy link
Owner

@apteryxxyz apteryxxyz commented Feb 2, 2025

Codebase rewrite to improve readability and performance

  • Added new createMs function to create a new instance of ms with custom language and formatting options

    • With this change, the ms function no longer accepts a language via its parameters, use createMs instead
  • Improved performance of formatting milliseconds by up to 10%

  • Added additional options to FormatOptions for more customisation

    • Replaced shortFormat with useAbbreviations
    • Added hideUnitNames, includeZero, includedUnits, unitLimit, unitSeparator, minimumDigits
    • Added format option presets: short, fullPrecision, colonNotation
  • Improved base performance of parsing durations by up to 1,100%

  • Removed ability for parse to handle maths operators, this will likely be re-added in a future version as an option

@github-actions github-actions bot added dependencies Dependency updates!! languages labels Feb 2, 2025
@apteryxxyz apteryxxyz marked this pull request as ready for review February 7, 2025 00:49
@apteryxxyz apteryxxyz merged commit d666fec into main Feb 8, 2025
6 checks passed
@apteryxxyz apteryxxyz deleted the v4 branch February 8, 2025 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Dependency updates!! languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant