1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-06-04 15:03:01 +02:00
TableFilter/dev/helpers.js

31 lines
767 B
JavaScript
Raw Normal View History

2015-05-13 12:54:29 +02:00
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