1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-06-27 09:50:24 +02:00
TableFilter/src/helpers.js

32 lines
751 B
JavaScript
Raw Normal View History

2014-11-16 01:29:07 +01:00
define(["exports"], function (exports) {
2015-02-28 10:27:28 +01:00
"use strict";
2015-02-28 10:27:28 +01:00
/**
* Misc helpers
*/
2015-02-28 10:27:28 +01:00
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 (str.lower(format) === "us") {
n = +n.replace(/[^\d\.-]/g, "");
} else {
n = +n.replace(/[^\d\,-]/g, "").replace(",", ".");
}
return n;
2015-02-28 10:27:28 +01:00
}
};
2015-02-28 10:27:28 +01:00
exports.Helpers = Helpers;
});
//# sourceMappingURL=helpers.js.map