fable 3.0.77 → 3.0.78

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": "fable",
3
- "version": "3.0.77",
3
+ "version": "3.0.78",
4
4
  "description": "An entity behavior management and API bundling library.",
5
5
  "main": "source/Fable.js",
6
6
  "scripts": {
@@ -54,6 +54,7 @@
54
54
  "dependencies": {
55
55
  "async.eachlimit": "^0.5.2",
56
56
  "async.waterfall": "^0.5.2",
57
+ "big.js": "^6.2.1",
57
58
  "cachetrax": "^1.0.4",
58
59
  "cookie": "^0.5.0",
59
60
  "data-arithmatic": "^1.0.7",
@@ -61,7 +62,6 @@
61
62
  "fable-serviceproviderbase": "^3.0.10",
62
63
  "fable-settings": "^3.0.8",
63
64
  "fable-uuid": "^3.0.5",
64
- "js-big-decimal": "^1.4.1",
65
65
  "manyfest": "^1.0.25",
66
66
  "simple-get": "^4.0.1"
67
67
  }
@@ -261,7 +261,8 @@ class DataFormat extends libFableServiceProviderBase
261
261
  return this._Value_NaN_Currency;
262
262
  }
263
263
 
264
- let tmpDollarAmount = this.fable.Utility.bigDecimal.round(pValue, 2);
264
+ let tmpDollarAmountArbitrary = this.fable.Utility.bigNumber(pValue);
265
+ let tmpDollarAmount = tmpDollarAmountArbitrary.toFixed(2);
265
266
 
266
267
  if (isNaN(tmpDollarAmount))
267
268
  {
@@ -299,7 +300,9 @@ class DataFormat extends libFableServiceProviderBase
299
300
  return tmpZed.toFixed(tmpDigits);
300
301
  }
301
302
 
302
- let tmpValue = this.fable.Utility.bigDecimal.round(pValue, tmpDigits);
303
+ let tmpAmountArbitrary = this.fable.Utility.bigNumber(pValue);
304
+ let tmpValue = tmpAmountArbitrary.toFixed(tmpDigits);
305
+
303
306
  if (isNaN(tmpValue))
304
307
  {
305
308
  let tmpZed = 0;
@@ -332,11 +335,11 @@ class DataFormat extends libFableServiceProviderBase
332
335
  else
333
336
  {
334
337
  let tmpPadLength = pTargetLength - pString.length;
335
- if (tmpPadLength > pPadString.length)
338
+ if (tmpPadLength > tmpPadString.length)
336
339
  {
337
- pPadString += pPadString.repeat(tmpTargetLength / pPadString.length);
340
+ tmpPadString += tmpPadString.repeat(tmpTargetLength / tmpPadString.length);
338
341
  }
339
- return pPadString.slice(0,tmpPadLength);
342
+ return tmpPadString.slice(0, tmpPadLength);
340
343
  }
341
344
  }
342
345
 
@@ -4,7 +4,7 @@ const libFableServiceBase = require('../Fable-ServiceManager.js').ServiceProvide
4
4
  const libAsyncWaterfall = require('async.waterfall');
5
5
  const libAsyncEachLimit = require('async.eachlimit');
6
6
 
7
- const libBigDecimal = require('js-big-decimal');
7
+ const libBigNumber = require('big.js');
8
8
 
9
9
  class FableServiceUtility extends libFableServiceBase
10
10
  {
@@ -27,7 +27,7 @@ class FableServiceUtility extends libFableServiceBase
27
27
  this.waterfall = libAsyncWaterfall;
28
28
  this.eachLimit = libAsyncEachLimit;
29
29
 
30
- this.bigDecimal = libBigDecimal;
30
+ this.bigNumber = libBigNumber;
31
31
  }
32
32
 
33
33
  // Underscore and lodash have a behavior, _.extend, which merges objects.