mirror of
https://github.com/koalyptus/TableFilter.git
synced 2024-05-15 21:06:44 +02:00
31 lines
767 B
JavaScript
31 lines
767 B
JavaScript
define(['exports', './string'], function (exports, _string) {
|
|
'use strict';
|
|
|
|
var Helpers = {
|
|
isIE: function isIE() {
|
|
return /msie|MSIE/.test(navigator.userAgent);
|
|
},
|
|
|
|
removeNbFormat: function removeNbFormat(data, format) {
|
|
if (!data) {
|
|
return;
|
|
}
|
|
if (!format) {
|
|
format = 'us';
|
|
}
|
|
var n = data;
|
|
if (_string.Str.lower(format) === 'us') {
|
|
n = +n.replace(/[^\d\.-]/g, '');
|
|
} else {
|
|
n = +n.replace(/[^\d\,-]/g, '').replace(',', '.');
|
|
}
|
|
return n;
|
|
}
|
|
};
|
|
|
|
exports.Helpers = Helpers;
|
|
});
|
|
/**
|
|
* Misc helpers
|
|
*/
|
|
//# sourceMappingURL=helpers.js.map
|