Comment

Comment by panic

Here's an implementation of "deep equality" -- a relatively common operation on composite values -- in JS. It has millions of downloads in just the last week: https://github.com/substack/node-deep-equal/blob/master/inde...

It includes special cases for dates, takes O(n log n) time in the number of keys, and has suspicious comments like, "I've managed to break Object.keys through screwy arguments passing. Converting to array solves the problem." There are 15 open issues and 15 open pull requests. A sane language would have this operation built-in.

parent panic 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton