dequal icon indicating copy to clipboard operation
dequal copied to clipboard

Doesn't work with URLSearchParams

Open defaude opened this issue 2 years ago • 0 comments

See https://stackblitz.com/edit/js-gxcyih?file=index.js

I think it's because of the way we fall into the "plain" object comparison in https://github.com/lukeed/dequal/blob/master/src/index.js#L73-L80

const x = new URLSearchParams();
x.append("foo", "bar");

for (i in x) {
  if (x.hasOwnProperty(i)) console.info(i);
}

=> Nothing gets printed because e.g. entries is always the same, but the stuff returned from entries is not.

defaude avatar Aug 30 '22 09:08 defaude