@driveflux/format-money 6.0.3-next.1 → 7.0.1
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/config.js +3 -3
- package/dist/index.js +1 -1
- package/package.json +6 -6
package/dist/config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { singleton } from '@driveflux/singleton';
|
|
2
|
-
var getConfig = function() {
|
|
2
|
+
var getConfig = function getConfig() {
|
|
3
3
|
return {
|
|
4
4
|
defaultFormat: {
|
|
5
5
|
currency: 'MYR',
|
|
@@ -11,10 +11,10 @@ var getConfig = function() {
|
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
export var config = singleton('formatMoneyConfig', getConfig());
|
|
14
|
-
export var resetConfig = function() {
|
|
14
|
+
export var resetConfig = function resetConfig() {
|
|
15
15
|
config = singleton('formatMoneyConfig', getConfig(), true);
|
|
16
16
|
return config;
|
|
17
17
|
};
|
|
18
|
-
export var setConfig = function(key, value) {
|
|
18
|
+
export var setConfig = function setConfig(key, value) {
|
|
19
19
|
config[key] = value;
|
|
20
20
|
};
|
package/dist/index.js
CHANGED
|
@@ -90,7 +90,7 @@ import { config } from './config.js';
|
|
|
90
90
|
* @param money
|
|
91
91
|
* @param fraction cannot be less than 1
|
|
92
92
|
* @returns
|
|
93
|
-
*/ export var decimals = function(money) {
|
|
93
|
+
*/ export var decimals = function decimals(money) {
|
|
94
94
|
var fraction = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 2;
|
|
95
95
|
if (fraction < 1) {
|
|
96
96
|
throw new Error('Fraction cannot be less than 1');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@driveflux/format-money",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./package.json": "./package.json",
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"dist"
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@driveflux/singleton": "
|
|
16
|
+
"@driveflux/singleton": "3.0.1"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@driveflux/fab": "
|
|
20
|
-
"@driveflux/tsconfig": "
|
|
21
|
-
"@types/node": "^
|
|
19
|
+
"@driveflux/fab": "4.0.1",
|
|
20
|
+
"@driveflux/tsconfig": "3.0.1",
|
|
21
|
+
"@types/node": "^25.7.0",
|
|
22
22
|
"del-cli": "^7.0.0",
|
|
23
|
-
"typescript": "^
|
|
23
|
+
"typescript": "^6.0.3"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "fab",
|