feat(order): bundled actions (#7133)
This commit is contained in:
committed by
GitHub
parent
e4898fb00d
commit
d02905cefa
@@ -2,13 +2,16 @@ export function trimZeros(value: string) {
|
||||
const [whole, fraction] = value.split(".")
|
||||
|
||||
if (fraction) {
|
||||
const decimal = fraction.replace(/0+$/, "")
|
||||
const exp = fraction.split("e")
|
||||
|
||||
const decimal = exp[0].replace(/0+$/, "")
|
||||
const expStr = exp.length > 1 ? `e${exp[1]}` : ""
|
||||
|
||||
if (!decimal) {
|
||||
return whole
|
||||
return whole + expStr
|
||||
}
|
||||
|
||||
return `${whole}.${decimal}`
|
||||
return `${whole}.${decimal}` + expStr
|
||||
}
|
||||
|
||||
return whole
|
||||
|
||||
Reference in New Issue
Block a user