10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-24 13:23:40 +01:00

Add function to check if string can be converted float in JavaScript

This commit is contained in:
Mickaël Véril 2020-02-01 16:54:00 +01:00
parent 89356b1b51
commit ea6c37d4f9

7
static/js/checkFloat.js Normal file
View File

@ -0,0 +1,7 @@
function checkFloat(string) {
try {
return isNaN(parseFloat(string))
} catch (error) {
return false
}
}