1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-06-07 08:22:26 +02:00
TableFilter/src/helpers.js
2015-03-01 21:44:39 +11:00

32 lines
751 B
JavaScript

define(["exports"], function (exports) {
"use strict";
/**
* Misc helpers
*/
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;
}
};
exports.Helpers = Helpers;
});
//# sourceMappingURL=helpers.js.map