·
2 commits
to main
since this release
Patch Changes
-
2ea7e8e: Refactors several functions related to reading and processing digit groups in Vietnamese number words, focusing on code readability, logic simplification, and consistent parameter handling. Minor formatting and code quality improvements are also included, along with updates to development dependencies.
Refactoring and Code Simplification
- Replaced multi-line if statements with concise ternary expressions in
readFirstGroupandreadSubsequentGroupto improve readability insrc/read/three-digits.ts. - Simplified the
getDigitWordfunction by removing the intermediate variable and returning the mapped value directly insrc/read/digits.ts.
Consistent Parameter Handling
- Updated
readHundredsto usegroupLengthinstead of a boolean flag, and made related changes in calls toreadHundreds,readTens, andreadOnesfor more predictable behavior insrc/read/three-digits.ts. [1] [2]
Minor Code Quality Improvements
- Added spacing and minor formatting for readability in utility functions such as
allFollowingGroupsAreZeroinsrc/read/utils.tsandcalculateGroupTypesinsrc/read/groups.ts. [1] [2]
Dependency Updates
- Updated development dependencies in
package.json, including@biomejs/biome,syncpack, andtsdownto their latest versions.
- Replaced multi-line if statements with concise ternary expressions in