Created
November 14, 2013 14:55
-
-
Save MichaelPaulukonis/7468195 to your computer and use it in GitHub Desktop.
JS ES5 hack for multi-line strings from http://css.dzone.com/articles/javascript-es-5-hack-clean
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
var MultiString = function(f) { | |
return f.toString().split('\n').slice(1, -1).join('\n'); | |
} | |
var ms = MultiString(function() {/** | |
line one | |
line two | |
line 'three' | |
**/}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment