From 277a37b527c76cee717ee0a02261f7f85cd37190 Mon Sep 17 00:00:00 2001 From: shayan Date: Fri, 24 Dec 2021 22:09:26 +0330 Subject: [PATCH] put sign after symbol in prefix formatting --- src/formatting.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/formatting.js b/src/formatting.js index 270c952f..146c5481 100644 --- a/src/formatting.js +++ b/src/formatting.js @@ -331,9 +331,9 @@ function formatCurrency(instance, providedFormat, state) { if (position === "prefix") { if (instance._value < 0 && options.negative === "sign") { - output = `-${space}${symbol}${output.slice(1)}`; + output = `${symbol}${space}-${output.slice(1)}`; } else if (instance._value > 0 && options.forceSign) { - output = `+${space}${symbol}${output.slice(1)}`; + output = `${symbol}${space}+${output.slice(1)}`; } else { output = symbol + space + output; }