Skip to content

Conversation

@mgol
Copy link
Member

@mgol mgol commented Oct 7, 2019

Summary

Use the nodeName util where possible to save size.

-20 bytes

Checklist

@mgol mgol added this to the 4.0.0 milestone Oct 7, 2019
@mgol mgol self-assigned this Oct 7, 2019

TAG: function( nodeNameSelector ) {
var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
var expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it might save a bit more to name this nodeNameExpected but it was the same. One day I will understand gzip.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmethvin Minification happens before gzip so source variable names are irrelevant.

Copy link
Member

@gibson042 gibson042 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Member

@timmywil timmywil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ALL THE BYTES

@mgol mgol removed the Needs review label Oct 8, 2019
@mgol mgol merged commit 4504fc3 into jquery:master Oct 8, 2019
@mgol mgol deleted the nodeName branch October 8, 2019 20:42
@lock lock bot locked as resolved and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Development

Successfully merging this pull request may close these issues.

4 participants