Doesn't work with URLSearchParams
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.5k
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
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
```javascript
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the URLSearchParams reproduction in the linked StackBlitz example, then inspect the plain-object comparison around src/index.js lines 73-80. Confirm the behavior for URLSearchParams instances and add or update coverage so comparisons reflect their contents rather than only their enumerable properties.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100