fable 3.0.82 → 3.0.83

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/dist/fable.js CHANGED
@@ -3003,7 +3003,7 @@ return pNumber.toString().replace(this._Regex_formatterAddCommasToNumber,this.pr
3003
3003
  *
3004
3004
  * @param {*} pValue
3005
3005
  * @returns {string}
3006
- */formatterDollars(pValue){if(isNaN(pValue)){return this._Value_NaN_Currency;}let tmpDollarAmountArbitrary=this.fable.Utility.bigNumber(pValue);let tmpDollarAmount=tmpDollarAmountArbitrary.toFixed(2);if(isNaN(tmpDollarAmount)){// Try again and see if what was passed in was a dollars string.
3006
+ */formatterDollars(pValue){if(isNaN(pValue)){return this._Value_NaN_Currency;}if(pValue===null||pValue===undefined){return this._Value_NaN_Currency;}let tmpDollarAmountArbitrary=this.fable.Utility.bigNumber(pValue);let tmpDollarAmount=tmpDollarAmountArbitrary.toFixed(2);if(isNaN(tmpDollarAmount)){// Try again and see if what was passed in was a dollars string.
3007
3007
  if(typeof pValue=='string'){// TODO: Better rounding function? This is a hack to get rid of the currency symbol and commas.
3008
3008
  tmpDollarAmount=parseFloat(pValue.replace(this._Value_MoneySign_Currency,'').replace(this._Regex_formatterDollarsRemoveCommas,'')).toFixed(2);}// If we didn't get a number, return the "not a number" string.
3009
3009
  if(isNaN(tmpDollarAmount)){return this._Value_NaN_Currency;}}// TODO: Get locale data and use that for this stuff.
@@ -3013,7 +3013,7 @@ return"$".concat(this.formatterAddCommasToNumber(tmpDollarAmount));}/**
3013
3013
  * @param {*} pValue
3014
3014
  * @param {number} pDigits
3015
3015
  * @returns {string}
3016
- */formatterRoundNumber(pValue,pDigits){let tmpDigits=typeof pDigits=='undefined'?2:pDigits;if(isNaN(pValue)){let tmpZed=0;return tmpZed.toFixed(tmpDigits);}let tmpAmountArbitrary=this.fable.Utility.bigNumber(pValue);let tmpValue=tmpAmountArbitrary.toFixed(tmpDigits);if(isNaN(tmpValue)){let tmpZed=0;return tmpZed.toFixed(tmpDigits);}else{return tmpValue;}}/**
3016
+ */formatterRoundNumber(pValue,pDigits){let tmpDigits=typeof pDigits=='undefined'?2:pDigits;if(isNaN(pValue)){let tmpZed=0;return tmpZed.toFixed(tmpDigits);}if(pValue===null||pValue===undefined){return'';}let tmpAmountArbitrary=this.fable.Utility.bigNumber(pValue);let tmpValue=tmpAmountArbitrary.toFixed(tmpDigits);if(isNaN(tmpValue)){let tmpZed=0;return tmpZed.toFixed(tmpDigits);}else{return tmpValue;}}/**
3017
3017
  * Generate a reapeating padding string to be appended before or after depending on
3018
3018
  * which padding function it uses.
3019
3019
  *