Use Number.isInteger

This commit is contained in:
dotvirus 2020-06-08 23:53:21 +02:00 committed by Corentin THOMASSET
parent 17f3e7de35
commit 318691837e

View file

@ -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 {