format-money-js
Advanced tools
Comparing version 0.2.2 to 0.2.3
/*! | ||
* format-money-js v0.2.2 | ||
* format-money-js v0.2.3 | ||
* (c) 2020 Yurii Derevych | ||
@@ -4,0 +4,0 @@ * Released under the BSD-2-Clause License. |
"use strict"; | ||
/*! | ||
* format-money-js v0.2.2 | ||
* format-money-js v0.2.3 | ||
* (c) 2020 Yurii Derevych | ||
@@ -11,3 +11,3 @@ * Released under the BSD-2-Clause License. | ||
this.options = options; | ||
this.version = '0.2.2'; | ||
this.version = '0.2.3'; | ||
this.defaults = { | ||
@@ -14,0 +14,0 @@ grouping: true, |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});class FormatMoney{constructor(t){this.options=t,this.version="0.2.2",this.defaults={grouping:!0,separator:",",decimalPoint:".",decimals:0,prefix:"",suffix:""},this.from=(t=>{const s=t<0?"-":"";let i,o,e,n,r;if(i=Math.abs(t).toFixed(this.options.decimals),e=(o=(i+="").split("."))[0],n=o.length>1?this.options.decimalPoint+o[1]:"",this.options.grouping){r="";for(let t=0,s=e.length;t<s;++t)0!==t&&t%3==0&&(r=this.options.separator+r),r=e[s-t-1]+r;e=r}return s+this.options.prefix+e+n+this.options.suffix}),this.options=Object.assign(Object.assign({},this.defaults),t)}}exports.FormatMoney=FormatMoney; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});class FormatMoney{constructor(t){this.options=t,this.version="0.2.3",this.defaults={grouping:!0,separator:",",decimalPoint:".",decimals:0,prefix:"",suffix:""},this.from=(t=>{const s=t<0?"-":"";let i,o,e,n,r;if(i=Math.abs(t).toFixed(this.options.decimals),e=(o=(i+="").split("."))[0],n=o.length>1?this.options.decimalPoint+o[1]:"",this.options.grouping){r="";for(let t=0,s=e.length;t<s;++t)0!==t&&t%3==0&&(r=this.options.separator+r),r=e[s-t-1]+r;e=r}return s+this.options.prefix+e+n+this.options.suffix}),this.options=Object.assign(Object.assign({},this.defaults),t)}}exports.FormatMoney=FormatMoney; |
{ | ||
"name": "format-money-js", | ||
"description": "Tiny JavaScript library by CurrencyRate.today, providing simple and advanced number, money and currency formatting.", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"license": "BSD-2-Clause", | ||
"main": "./dist/format-money.min.js", | ||
"main": "index.js", | ||
"author": "@dejurin", | ||
@@ -8,0 +8,0 @@ "bugs": { |
/*! | ||
* format-money-js v0.2.2 | ||
* format-money-js v0.2.3 | ||
* (c) 2020 Yurii Derevych | ||
@@ -18,3 +18,3 @@ * Released under the BSD-2-Clause License. | ||
version = '0.2.2'; | ||
version = '0.2.3'; | ||
private defaults: FormatMoneyOptions = { | ||
@@ -21,0 +21,0 @@ grouping: true, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12828