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

Reimplement elemMatch #165

Closed
wants to merge 1 commit into from
Closed

Reimplement elemMatch #165

wants to merge 1 commit into from

Conversation

miripiruni
Copy link
Contributor

@qfox
Copy link
Member

qfox commented Dec 28, 2015

Here is the problem with back-compat:

block('b').def()(
  elemMatch(function(){ return this.elem === 'e1'; })('1'),
  elem('e2')('2')
);
// +
{ block: 'b', elem: 'e2' }

@miripiruni
Copy link
Contributor Author

//cc @veged

@miripiruni miripiruni force-pushed the issue-135__elemMatch branch from 27b3e41 to 073de7b Compare January 26, 2016 15:26
@miripiruni
Copy link
Contributor Author

@zxqfox Here is two tests about priority.

], '<b class="b1__e1"></b><b class="b1__e2"></b><div class="b1__e3"></div>')
});

it('priority of elemMatch is higher than elem', function() {
Copy link
Member

Choose a reason for hiding this comment

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

Actually, I don't get why?

@miripiruni miripiruni force-pushed the issue-135__elemMatch branch from 073de7b to dcb9bac Compare January 27, 2016 13:30
@arikon
Copy link
Member

arikon commented Jan 27, 2016

We decided to remove elemMatch() in 5.0 in favor of

  • elem('*').match(); and document pequilarity
  • elems('a', 'b', 'c', ...)

@qfox
Copy link
Member

qfox commented Jan 27, 2016

Don't forget to remove or fix elem('*')

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

Successfully merging this pull request may close these issues.

3 participants