Format like in para #271
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
haspr
help wanted
invalid
javascript
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
parasitepool/parastats!271
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "format-like-para"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
LGTM
@ -29,3 +29,3 @@const formatPhd = (phd: number) => (phd < 1 ? formatHashDays(phd * 1e15) : `${trimPhd(phd)} PHd`);const trimPhd = (phd: number) => String(Math.round(phd * 100) / 100);const trimPhd = (phd: number) => String(Math.floor(phd * 100) / 100);Shouldn't trimPhd be declared before formatPhd that uses it on line 29?
Also, if you are using this elsewhere, it would be a good idea to keep it in integer format instead of dividing back as most two digit decimals are not precise in u64.
@ -22,3 +11,1 @@} else {return `${scaledValue.toFixed(2)}${units[unitIndex]}`;}const truncated = Math.floor(scaledValue * 100) / 100;trunc() instead of floor could be used throughout. It behaves identically in this context, but is better practice to use instead of floor() as it always tends towards 0.
No change needed.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.