question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doesn't compare Sets

See original GitHub issue

Hi!

I just noticed this library does not compare Sets correctly.

Repro:


var dequal = require("dequal")

let a = new Set([1,2,3,4])
let b = new Set([1,2,3,4])

console.log(dequal(a,b))

https://runkit.com/embed/yiu9lr2kont0

As an example, lodash’s isEqual does compare Sets and in the above use case does return true.

This is also related to https://github.com/kentcdodds/use-deep-compare-effect/issues/15

Fran

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lukeedcommented, Aug 3, 2020

It’s not released yet. I’ll push to have both dequal & klona 2.0 done this week – they go hand in hand.

0reactions
Mika83ACcommented, Aug 3, 2020

Great, thank you @lukeed !

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to efficiently compare two unordered lists (not sets)?
O(n): The Counter() method is best (if your objects are hashable): def compare(s, t): return Counter(s) == Counter(t).
Read more >
Ultimate Guide - Compare two lists or datasets in Excel
Learn how you can compare two lists, two columns or two data sets in Excel. We will look at conditional formatting, formulas and...
Read more >
The Best Ways to Compare Two Lists in Python
The easiest way to compare two lists for equality is to use the == operator. This comparison method works well for simple cases,...
Read more >
4 Must-Know Methods for Python Set Comparison
In this article, we will go over 4 must-know methods for comparing sets. Let's start with creating a set object. myset = {1,...
Read more >
Don't Get Blindsided by PROC COMPARE - SAS Support
The COMPARE procedure simply compares the data sets based on the variables in common and reports its findings based on that comparison. If...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found