DEV Community

loading...

Discussion on: Removing duplicates in an Array of Objects in JS with Sets

Collapse
jreina profile image
Johnny Reina

I found myself with this issue recently and though I've always used the same code to find distinct primitives (before we had the Set object), this code required me to adhere to the C# API where you pass in a comparison function T -> T -> boolean. This solution felt relatively clean though obviously not in linear time.
github.com/jreina/ShittyLINQ.js/bl...

Forem Open with the Forem app