Created
October 27, 2010 08:29
-
-
Save jed/648670 to your computer and use it in GitHub Desktop.
is this code worth the 5 byte savings?
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
{1:"createElement",2:"createAttribute",3:"createTextNode",8:"createComment",11:"createDocumentFragment"} | |
",Element,Attribute,TextNode,,,,,Comment,,,DocumentFragment".replace(/\b\w/g,"create$&").split(",") |
indeed, i don't really know what i was thinking here...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thumbs down.
The
:"create
bytes will be gzipped out anyway, and the first is better run-time performance.