Created
November 21, 2016 12:19
-
-
Save MatthewBarker/bc484ab54a0e95df66cc7bda671db9b4 to your computer and use it in GitHub Desktop.
Trim poly-fill for IE8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!String.prototype.trim) { | |
String.prototype.trim = function () { | |
return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment