Created
July 24, 2015 10:04
-
-
Save JavaScript-Packer/99836b90c3843513b86a to your computer and use it in GitHub Desktop.
Function removes leading and trailing whitespace from string
This file contains hidden or 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
| function strip(e) { | |
| return e.trim ? e.trim() : e.replace(/^\s+/, "").replace(/\s+$/, ""); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment