macoslinuxwindowsinboxwhatsappicloudtweetdeckhipchattelegramhangoutsslackgmailskypefacebook-workplaceoutlookemailmicrosoft-teamsdiscordmessengercustom-services
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
305 B
15 lines
305 B
9 years ago
|
/**
|
||
|
* 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(""));
|
||
|
}
|
||
|
});
|