mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 09:14:27 +08:00
code refactor
This commit is contained in:
+3
-3
@@ -9,7 +9,7 @@ export function appendDigitGroupingSymbol(value: number | string, options: Numbe
|
||||
if (isNumber(value)) {
|
||||
textualValue = value.toString();
|
||||
} else {
|
||||
textualValue = value as string;
|
||||
textualValue = value;
|
||||
}
|
||||
|
||||
if (!textualValue) {
|
||||
@@ -137,7 +137,7 @@ export function formatAmount(value: number | string, options: NumberFormatOption
|
||||
if (isNumber(value)) {
|
||||
textualValue = value.toString();
|
||||
} else {
|
||||
textualValue = value as string;
|
||||
textualValue = value;
|
||||
}
|
||||
|
||||
if (!textualValue) {
|
||||
@@ -157,7 +157,7 @@ export function formatAmount(value: number | string, options: NumberFormatOption
|
||||
const decimalSeparator = options.decimalSeparator || DecimalSeparator.Default.symbol;
|
||||
let decimalNumberCount = options.decimalNumberCount;
|
||||
|
||||
if (!isNumber(decimalNumberCount) || (decimalNumberCount as number) > MAX_SUPPORTED_DECIMAL_NUMBER_COUNT) {
|
||||
if (!isNumber(decimalNumberCount) || decimalNumberCount > MAX_SUPPORTED_DECIMAL_NUMBER_COUNT) {
|
||||
decimalNumberCount = DEFAULT_DECIMAL_NUMBER_COUNT;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user