UNPKG
@jk-core/components
Version:
latest (1.2.0)
1.2.0
1.1.23
1.1.22
1.1.21
1.1.20
1.1.19
1.1.18
1.1.17
1.1.16
1.1.15
1.1.14
1.1.13
1.1.12
1.1.11
1.1.10
1.1.9
1.1.8
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.2
1.0.1
1.0.0
0.1.16
0.1.15
0.1.14
0.1.13
0.1.12
0.1.11
0.1.10
0.1.9
0.1.8
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
0.0.65
0.0.64
0.0.63
0.0.62
0.0.61
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
components for jk
bitbucket.org/jkcore/frontend_library
@jk-core/components
/
src
/
utils
/
ts
/
allowDecimal.ts
5 lines
•
158 B
text/typescript
View Raw
1
2
3
4
5
export
const
allowDecimal = (val: number) => {
const
str = val.toString();
const
decimal
= str.split(
'.'
)[
1
];
return
!
decimal
||
decimal
.length <=
2
; };