mirror of
https://github.com/cryptosharks131/lndg.git
synced 2026-08-13 12:33:04 +02:00
Update formatted number string to int parsing to fix different locales (#436)
This commit is contained in:
parent
bb51c33990
commit
73809d64c1
1 changed files with 1 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
//HELPER FUNCTIONS
|
||||
function byId(id){ return document.getElementById(id) }
|
||||
String.prototype.toInt = function(){ return parseInt(this.replace(/,/g,''))}
|
||||
String.prototype.toInt = function(){ return parseInt(this.replace(/[^\d-]/g,''))}
|
||||
String.prototype.toBool = function(if_false = 0){ return this && /^true$/i.test(this) ? 1 : if_false}
|
||||
Number.prototype.intcomma = function(){ return parseInt(this).toLocaleString() }
|
||||
HTMLElement.prototype.defaultCloneNode = HTMLElement.prototype.cloneNode
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue