n20-common-lib 2.6.19 → 2.6.20

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": "n20-common-lib",
3
- "version": "2.6.19",
3
+ "version": "2.6.20",
4
4
  "private": false,
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -111,7 +111,7 @@ function nFloor(n, f) {
111
111
  export function add(m, n, decimal) {
112
112
  const data = XEUtils.add(m, n)
113
113
  if (decimal) {
114
- return subFixed(data, decimal)
114
+ return XEUtils.toFixed(data, decimal)
115
115
  } else {
116
116
  return data
117
117
  }
@@ -120,7 +120,7 @@ export function add(m, n, decimal) {
120
120
  export function sub(m, n, decimal) {
121
121
  const data = XEUtils.subtract(m, n)
122
122
  if (decimal) {
123
- return subFixed(data, decimal)
123
+ return XEUtils.toFixed(data, decimal)
124
124
  } else {
125
125
  return data
126
126
  }
@@ -129,7 +129,7 @@ export function sub(m, n, decimal) {
129
129
  export function mul(m, n, decimal) {
130
130
  const data = XEUtils.multiply(m, n)
131
131
  if (decimal) {
132
- return subFixed(data, decimal)
132
+ return XEUtils.toFixed(data, decimal)
133
133
  } else {
134
134
  return data
135
135
  }
@@ -138,7 +138,7 @@ export function mul(m, n, decimal) {
138
138
  export function div(m, n, decimal) {
139
139
  const data = XEUtils.divide(m, n)
140
140
  if (decimal) {
141
- return subFixed(data, decimal)
141
+ return XEUtils.toFixed(data, decimal)
142
142
  } else {
143
143
  return data
144
144
  }
@@ -194,7 +194,7 @@ export const subFixed = function (n, decimal = 6) {
194
194
  if (n === undefined || n === null || n === '') {
195
195
  return ''
196
196
  } else {
197
- return XEUtils.toNumber(XEUtils.toFixed(n, decimal))
197
+ return XEUtils.toFixed(n, decimal)
198
198
  }
199
199
  }
200
200
  /**