(num: number | string, digits = 0)
| 11 | * 包装原生 toFixed,确保输出数字而不是字符串 |
| 12 | */ |
| 13 | export function toFixed(num: number | string, digits = 0): number { |
| 14 | return parseFloat(Number(num).toFixed(digits)) |
| 15 | } |
| 16 | |
| 17 | /** |
| 18 | * 移除字符串内所有空白,包括空格、空行、制表符 |
no outgoing calls
no test coverage detected