New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unused variable references #533
Conversation
1 similar comment
@@ -49,7 +49,7 @@ var setAttr = function(el, name, value) { | |||
} | |||
}; | |||
|
|||
var attr = exports.attr = function(name, value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to remove all of these. Even those that are referenced are unnecessary, as we can reference exports.<name>
instead. Thoughts?
Very nice! |
Prefer accessing these methods via the global `module` namespace for clarity.
@davidchambers The only excuse for aliasing exported methods is to avoid the overhead of dereferencing. Really though, if we were concerned with performance at that level, Cheerio would be a native module. I've implemented your suggestion. |
I find this line of reasoning compelling, @jugglinmike. I'll give @matthewmueller and @fb55 a chance to chime in before we merge this pull request. |
haha coveralls is pretty sweet. I'm +1 to this idea. I've kind of been liking... Cheerio.prototype.after = require('./api/manipulation/after'); Lately... but that would be a bigger change. |
That's three thumbs up. Merging. :) |
Remove unused variable references
Thanks :) |
No description provided.