Skip to content

Commit 18aee45

Browse files
author
Cody Moorhouse
committed
Change defaults to max and min safe integers
1 parent 45102ed commit 18aee45

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ Vue.use(money, {precision: 4})
5151
suffix: ' #',
5252
precision: 2,
5353
masked: false,
54-
min: -1000000000,
55-
max: 1000000000,
54+
min: Number.MIN_SAFE_INTEGER,
55+
max: Number.MAX_SAFE_INTEGER
5656
}
5757
}
5858
}
@@ -83,8 +83,8 @@ Must use `vmodel.lazy` to bind works properly.
8383
suffix: ' #',
8484
precision: 2,
8585
masked: false /* doesn't work with directive */,
86-
min: -1000000000,
87-
max: 1000000000
86+
min: Number.MIN_SAFE_INTEGER,
87+
max: Number.MAX_SAFE_INTEGER
8888
}
8989
}
9090
},
@@ -96,17 +96,17 @@ Must use `vmodel.lazy` to bind works properly.
9696

9797
## Properties
9898

99-
| property | Required | Type | Default | Description |
100-
|-----------|----------|---------|-------------|---------------------------------------------------------|
101-
| precision | **true** | Number | 2 | How many decimal places |
102-
| precision | **true** | Number | 2 | How many decimal places |
103-
| decimal | false | String | "." | Decimal separator |
104-
| thousands | false | String | "," | Thousands separator |
105-
| prefix | false | String | "" | Currency symbol followed by a Space, like "R$ " |
106-
| suffix | false | String | "" | Percentage for example: " %" |
107-
| masked | false | Boolean | false | If the component output should include the mask or not |
108-
| min | false | Number | -1000000000 | The min value allowed |
109-
| max | false | Number | 1000000000 | The max value allowed |
99+
| property | Required | Type | Default | Description |
100+
|-----------|----------|---------|-------------------------|---------------------------------------------------------|
101+
| precision | **true** | Number | 2 | How many decimal places |
102+
| precision | **true** | Number | 2 | How many decimal places |
103+
| decimal | false | String | "." | Decimal separator |
104+
| thousands | false | String | "," | Thousands separator |
105+
| prefix | false | String | "" | Currency symbol followed by a Space, like "R$ " |
106+
| suffix | false | String | "" | Percentage for example: " %" |
107+
| masked | false | Boolean | false | If the component output should include the mask or not |
108+
| min | false | Number | Number.MIN_SAFE_INTEGER | The min value allowed |
109+
| max | false | Number | Number.MAX_SAFE_INTEGER | The max value allowed |
110110

111111
### References
112112

src/options.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ export default {
44
thousands: ',',
55
decimal: '.',
66
precision: 2,
7-
min: -1000000000,
8-
max: 1000000000
7+
min: Number.MIN_SAFE_INTEGER,
8+
max: Number.MAX_SAFE_INTEGER
99
}

0 commit comments

Comments
 (0)