@qikdev/sdk 0.1.137 → 0.1.138

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qikdev/sdk",
3
- "version": "0.1.137",
3
+ "version": "0.1.138",
4
4
  "type": "module",
5
5
  "description": "Promise based Javascript SDK",
6
6
  "scripts": {
@@ -725,14 +725,16 @@ service.mapParameters = function(parameters) {
725
725
  * sdk.utils.formatCurrency(1000, 'usd');
726
726
  *
727
727
  */
728
- service.formatCurrency = function(value, currency) {
728
+ service.formatCurrency = function(value, currency, decimalPoints) {
729
729
 
730
730
  if (!value || isNaN(value)) {
731
731
  value = 0;
732
732
  }
733
733
 
734
+ decimalPoints = decimalPoints || 2;
735
+
734
736
  var currencyPrefix = service.currencySymbol(currency);
735
- return `${currencyPrefix}${parseFloat(parseInt(value) / 100).toFixed(2)}`;
737
+ return `${currencyPrefix}${parseFloat(parseInt(value) / 100).toFixed(decimalPoints)}`;
736
738
 
737
739
  }
738
740
 
package/src/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '0.1.137'
1
+ export const version = '0.1.138'