diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-01-11 02:56:32 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-01-11 02:56:32 +0100 |
commit | ffe6dee6aa50c864cc9a36e816eb95f2f23719b1 (patch) | |
tree | dddcd8134d351241e5af8e016fa59848beace6d1 /extension/lib/commonHelpers.ts | |
parent | 4f934925e017082606f2786e0bbf0d48281928d9 (diff) |
refactor code to be clearer/prettier
Diffstat (limited to 'extension/lib/commonHelpers.ts')
-rw-r--r-- | extension/lib/commonHelpers.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/extension/lib/commonHelpers.ts b/extension/lib/commonHelpers.ts index 5c32e47c1..4974778b9 100644 --- a/extension/lib/commonHelpers.ts +++ b/extension/lib/commonHelpers.ts @@ -14,12 +14,12 @@ TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/> */ -Handlebars.registerHelper('prettyAmount', function (amount) { +Handlebars.registerHelper("prettyAmount", function (amount) { let v = amount.value + amount.fraction / 1e6; - return v.toFixed(2) + " " + amount.currency; + return `${v.toFixed(2)} ${amount.currency}`; }); -Handlebars.registerHelper('prettyAmountNoCurrency', function (amount) { +Handlebars.registerHelper("prettyAmountNoCurrency", function (amount) { let v = amount.value + amount.fraction / 1e6; return v.toFixed(2); }); |