Created
October 19, 2014 18:45
-
-
Save eddieantonio/9cb787ec122c92e50a73 to your computer and use it in GitHub Desktop.
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
# Code transliterated from | |
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Compatibility | |
unless String::trim | |
do -> | |
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g | |
String::trim = -> @replace(rtrim, '') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment