cursed code 

- for (const m of string.match(regex)) { ... }
+ string.replace(regex, (m) => { ... }); (discarding the return value, which will be the source text with all matches replaced with the string "undefined")

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!