feat(order): bundled actions (#7133)

This commit is contained in:
Carlos R. L. Rodrigues
2024-04-25 07:06:23 -03:00
committed by GitHub
parent e4898fb00d
commit d02905cefa
23 changed files with 1114 additions and 232 deletions

View File

@@ -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