Skip to content

Conversation

@k0d13
Copy link
Owner

@k0d13 k0d13 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
@k0d13 k0d13 marked this pull request as ready for review February 7, 2025 00:49
@k0d13 k0d13 merged commit d666fec into main Feb 8, 2025
6 checks passed
@k0d13 k0d13 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.

2 participants