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

Refactor distinch until changed #60

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yerlanyr
Copy link
Collaborator

@yerlanyr yerlanyr commented May 7, 2022

Motivation
I saw that there is an opportunity to write distinchUntilChanged in a way that will be as succintly as possible.
Because of this part of code in ramda equals:
https://github.com/ramda/ramda/blob/c207cf1be650e8373bef85a77198ba23647c9165/source/internal/_equals.js#L50

export default function _equals(a, b, stackA, stackB) {
  /*... code ommited for brevity */
  if (typeof a.equals === 'function' || typeof b.equals === 'function') {
    return typeof a.equals === 'function' && a.equals(b) &&
      typeof b.equals === 'function' && b.equals(a);
  }

And also refactored existing tests and added a couple new using rxjs/testing's TestingSchedule

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.

1 participant