gl-w-number-frontend
Advanced tools
Comparing version 6.0.1 to 6.1.0
@@ -9,6 +9,6 @@ import { Decimal } from 'decimal.js'; | ||
toString(number: number): string; | ||
currencyToNumber(num: number, decimal?: TDecimalSeparators, currency?: TCurrencySymbolTypes, decimalPlaces?: number): number; | ||
currencyToNumber(num: number, currency?: TCurrencySymbolTypes, decimalPlaces?: number): number; | ||
decimalToString(num: number, decimalOutput?: TDecimalSeparators, decimalPlaces?: number): string; | ||
percentageToNumber(num: string, decimal?: TDecimalSeparators, decimalPlaces?: number): number; | ||
stringCurrencyToNumber(num: string, decimal: TDecimalSeparators, currency: TCurrencySymbolTypes, decimalPlaces?: number): number; | ||
stringCurrencyToNumber(num: string, currency: TCurrencySymbolTypes, decimalPlaces?: number): number; | ||
formatDecimalSeparator(num: number, decimal?: TDecimalSeparators): string; | ||
@@ -15,0 +15,0 @@ } |
@@ -83,3 +83,3 @@ import { Decimal } from 'decimal.js'; | ||
} | ||
currencyToNumber(num, decimal = ',', currency, decimalPlaces = 2) { | ||
currencyToNumber(num, currency, decimalPlaces = 2) { | ||
const parsedNumber = new Decimal(num).toDecimalPlaces(decimalPlaces).toString(); | ||
@@ -124,3 +124,3 @@ if (currency != null) { | ||
} | ||
stringCurrencyToNumber(num, decimal = ',', currency, decimalPlaces = 2) { | ||
stringCurrencyToNumber(num, currency, decimalPlaces = 2) { | ||
return new Decimal(num | ||
@@ -127,0 +127,0 @@ .replace(/\./g, '') |
{ | ||
"name": "gl-w-number-frontend", | ||
"version": "6.0.1", | ||
"version": "6.1.0", | ||
"description": "Common code for using among web front-end development such as ES6+ and TypeScript", | ||
@@ -40,18 +40,9 @@ "main": "lib/number/src/index.js", | ||
"decimal.js": "^10.4.3", | ||
"typescript": "^5.3.3" | ||
"typescript": "^5.4.5" | ||
}, | ||
"devDependencies": { | ||
"@angular-eslint/eslint-plugin": "^17.4.0", | ||
"@angular-eslint/eslint-plugin-template": "^17.4.0", | ||
"@types/node": "^20.9.0", | ||
"@typescript-eslint/eslint-plugin": "^7.8.0", | ||
"@typescript-eslint/parser": "^7.8.0", | ||
"eslint": "^8.57.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-jsdoc": "^48.2.3", | ||
"eslint-plugin-prefer-arrow": "^1.2.3", | ||
"shx": "^0.3.4", | ||
"typescript": "^5.3.3" | ||
"typescript": "^5.4.5" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
3
99137