Skip to content
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

Merged
merged 5 commits into from Jul 1, 2014

Conversation

jugglinmike
Copy link
Member

No description provided.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0%) when pulling df964e3 on jugglinmike:unused into f14d818 on cheeriojs:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0%) when pulling df964e3 on jugglinmike:unused into f14d818 on cheeriojs:master.

@@ -49,7 +49,7 @@ var setAttr = function(el, name, value) {
}
};

var attr = exports.attr = function(name, value) {
Copy link
Contributor

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?

@davidchambers
Copy link
Contributor

Very nice!

Prefer accessing these methods via the global `module` namespace for
clarity.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0%) when pulling d8c5905 on jugglinmike:unused into f14d818 on cheeriojs:master.

@jugglinmike
Copy link
Member Author

@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.

@davidchambers
Copy link
Contributor

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.

@matthewmueller
Copy link
Member

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.

@davidchambers
Copy link
Contributor

That's three thumbs up. Merging. :)

davidchambers added a commit that referenced this pull request Jul 1, 2014
Remove unused variable references
@davidchambers davidchambers merged commit ce39046 into cheeriojs:master Jul 1, 2014
@jugglinmike
Copy link
Member Author

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants