Skip to content

Instantly share code, notes, and snippets.

View federico-hv's full-sized avatar
🏠
Working from home

Federico Hernández federico-hv

🏠
Working from home
View GitHub Profile
@federico-hv
federico-hv / index.js
Last active December 1, 2024 08:04
Reproduces the bug in "whatwg-url-without-unicode"
/**
"whatwg-url-without-unicode" incorrectly matches URL.searchParams.has to `true`
when given a different value as the second argument.
If the first line is commented in node or a browser console
the result is `false` but with the library's implementation of URL you get a wrong match
*/