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

Comparison functions should use new features from Set #27

Open
paceaux opened this issue Sep 9, 2024 · 2 comments
Open

Comparison functions should use new features from Set #27

paceaux opened this issue Sep 9, 2024 · 2 comments
Assignees

Comments

@paceaux
Copy link
Owner

paceaux commented Sep 9, 2024

Set now has new data comparison features:

  • .difference()
  • .intersection()
  • symmetricDifference()
  • .union()
  • .disjointFrom()

The functions.comparisons.ts should be refactored to use these rather than the built in versions.

All existing tests should continue to pass.

@paceaux paceaux self-assigned this Sep 9, 2024
@paceaux
Copy link
Owner Author

paceaux commented Sep 10, 2024

Apparently there's some sort of problem between either Babel, Jest, or ts-jest where the unit tests fail saying set.union is not a function. Like a lying bastard.

@paceaux
Copy link
Owner Author

paceaux commented Sep 25, 2024

Turns out this requires the use of shims because pre-Node-20 these methods aren't available on the prototype.

so the functions have been refactored slightly to use the shims, which obviously will be less necessary in a year or two.

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

No branches or pull requests

1 participant