mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-07-23 19:27:42 +02:00
18 lines
291 B
JavaScript
18 lines
291 B
JavaScript
|
class stringFloat{
|
||
|
constructor(value) {
|
||
|
this.string=value
|
||
|
}
|
||
|
get Value(){
|
||
|
return parseFloat(this.string)
|
||
|
}
|
||
|
valueOf() {
|
||
|
return this.Value;
|
||
|
}
|
||
|
toString(){
|
||
|
if (isNaN(checkFloat(this.Value))) {
|
||
|
return this.Value
|
||
|
} else {
|
||
|
return this.string
|
||
|
}
|
||
|
}
|
||
|
}
|