Skip to content

Conversation

cvrebert
Copy link
Contributor

Naive implementation of http://api.jquery.com/has/ , with unit tests.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) when pulling d660fc2 on cvrebert:master into 6ba5338 on cheeriojs:master.

@@ -328,6 +328,13 @@ var makeFilterMethod = function(filterFn) {
exports.filter = makeFilterMethod(_.filter);
exports.not = makeFilterMethod(_.reject);

exports.has = function(selectorOrHaystack) {
var that = this;
return exports.filter.call(this, function () {
Copy link
Member

Choose a reason for hiding this comment

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

Could you remove the space between the function keyword and the parenthesis?

@jugglinmike
Copy link
Member

Thanks for this, Chris! Besides a code style change, we'll need documentation for this in the project's Readme.md file. Mind adding that?

@cvrebert
Copy link
Contributor Author

@jugglinmike Sorry for the oversight. Added docs and made the style change.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) when pulling c0d0162 on cvrebert:master into 6ba5338 on cheeriojs:master.

@jugglinmike jugglinmike merged commit c0d0162 into cheeriojs:master Oct 23, 2014
@jugglinmike
Copy link
Member

Nice work! Thanks for the patch :)

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

Successfully merging this pull request may close these issues.

3 participants