mirror of
https://github.com/koalyptus/TableFilter.git
synced 2024-06-20 22:55:27 +02:00
28 lines
505 B
JavaScript
28 lines
505 B
JavaScript
/**
|
|
* Misc helpers
|
|
*/
|
|
|
|
var Helpers = {
|
|
isIE(){
|
|
return (/msie|MSIE/).test(navigator.userAgent);
|
|
},
|
|
|
|
removeNbFormat(data, format){
|
|
if(!data){
|
|
return;
|
|
}
|
|
if(!format){
|
|
format = 'us';
|
|
}
|
|
var n = data;
|
|
if(str.lower(format)==='us'){
|
|
n =+ n.replace(/[^\d\.-]/g,'');
|
|
} else {
|
|
n =+ n.replace(/[^\d\,-]/g,'').replace(',','.');
|
|
}
|
|
return n;
|
|
}
|
|
};
|
|
|
|
exports.Helpers = Helpers;
|