Skip to content
Snippets Groups Projects
Commit e643742e authored by Thomas Müller's avatar Thomas Müller
Browse files

adding prototype trim as fallback for IE8

parent 8065c733
No related branches found
No related tags found
No related merge requests found
......@@ -23,3 +23,10 @@ if (!Function.prototype.bind) {
return fBound;
};
}
//https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/Trim
if(!String.prototype.trim) {
String.prototype.trim = function () {
return this.replace(/^\s+|\s+$/g,'');
};
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment