mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-23 00:06:15 -04:00
Use Number.isInteger
This commit is contained in:
parent
0812385ada
commit
c484715c3e
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ const formatBytes = (bytes, decimals = 2) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const isInt = (value) => {
|
const isInt = (value) => {
|
||||||
return !isNaN(value) && ((x) => (x | 0) === x)(parseFloat(value))
|
return Number.isInteger(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue