Skip to content
This repository has been archived by the owner on Jan 5, 2019. It is now read-only.

Commit

Permalink
Fixed *-if-required formatters
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Feb 24, 2018
1 parent 5a9b37e commit a1edcde
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/localize/formatters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ const formatters: { [key: string]: Formatter } = {
old_leech_permyriad: n => n / 50,
per_minute_to_per_second_0dp: n => (n / 60).toFixed(0),
per_minute_to_per_second_2dp: n => (n / 60).toFixed(2),
per_minute_to_per_second_2dp_if_required: n => (n / 60).toPrecision(2),
per_minute_to_per_second_2dp_if_required: n =>
(n / 60).toFixed(2).replace(/\.?0*$/, ''),
milliseconds_to_seconds_0dp: n => (n / 1000).toFixed(0),
milliseconds_to_seconds_2dp: n => (n / 1000).toFixed(2),
multiplicative_damage_modifier: n => n,
Expand Down

0 comments on commit a1edcde

Please sign in to comment.