Lovely bit of work, this: @mathias wrote code to derive a regex for valid JavaScript identifiers, which I’d totally have used if the regex was smaller than 16KB. https://mathiasbynens.be/demo/javascript-identifier-regex …
So, I went with this awful cut down version: /^(?!(?:)$)(?:[\$A-Z_a-z])(?:[\$0-9A-Z_a-z])*$/
I wrote a blog post on that: https://mathiasbynens.be/notes/javascript-properties …
-
-
That’ll do nicely. Thanks!
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.