Created
December 5, 2014 20:02
-
-
Save AWaselnuk/72ee50d93a7c8d9589a1 to your computer and use it in GitHub Desktop.
Make a string safe for css (by removing all nonalphanumeric characters)
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
var str = 'A&P Grocers, Inc.'; | |
str.replace(/\W/g, '').toLowerCase(); // apgrocersinc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment