Created
September 3, 2019 05:07
-
-
Save daltonmenezes/6b2c30805b213d28a9e9c51db224d1ae to your computer and use it in GitHub Desktop.
A function to minify strings in JavaScript.
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
const multilineString = ` | |
This is... | |
a multiline string. | |
` | |
const minify = it => it.replace(/\s+/g, '') | |
minify(multilineString) | |
// Thisis...amultilinestring. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment