Skip to content

Commit 190a848

Browse files
committed
Clarify hasTensPosition variable usage in read function
Renamed and refactored the variable `len > 1` to `hasTensPosition` for improved readability and intent clarity. Updated its usage across the function to enhance maintainability without changing the existing behavior.
1 parent 55f2b90 commit 190a848

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/read/three-digits.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ function readThreeDigitsCore(group: string): string {
6060
return result.trim()
6161
}
6262

63-
result += readTens(second, len > 1)
64-
result += readOnes(last, second, len > 1)
63+
const hasTensPosition = len > 1
64+
result += readTens(second, hasTensPosition)
65+
result += readOnes(last, second, hasTensPosition)
6566

6667
return result.trim()
6768
}

0 commit comments

Comments
 (0)