Created
May 22, 2023 06:09
-
-
Save abdulhadad/823fde9a9edc6e7e932c62757c1d1888 to your computer and use it in GitHub Desktop.
JS string trim and compact
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
" Text with spaces ".replace(/ +/g, ' ').trim() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment