5 changed files with 34 additions and 7 deletions
@ -0,0 +1,15 @@
|
||||
/** |
||||
* Created by vsxed on 7/11/2016. |
||||
*/ |
||||
Ext.define('Rambox.util.Format', { |
||||
singleton: true, |
||||
|
||||
formatNumber: function(n) { |
||||
return n.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,"); |
||||
}, |
||||
|
||||
stripNumber: function(n) { |
||||
return (typeof n == "number") ? n : parseInt(n.match(/\d+/g).join("")); |
||||
} |
||||
|
||||
}); |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue