From 0568785b2b90189f47c9e2a68faccb4ccad6fdcb Mon Sep 17 00:00:00 2001 From: Alecsander Farias <91743821+AlecsFarias@users.noreply.github.com> Date: Sat, 11 Jan 2025 11:00:59 -0300 Subject: [PATCH 1/2] Update index.js Add comment to explain NaN verify --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index 26cec8d..df6f300 100644 --- a/index.js +++ b/index.js @@ -116,6 +116,8 @@ function equal(a, b) { return true; } + + // NaN verify return a !== a && b !== b; } // end fast-deep-equal From 03ba58d5bab73af20ec02c1afde360302e08854a Mon Sep 17 00:00:00 2001 From: Ryan Roemer Date: Fri, 13 Nov 2026 10:26:31 -0800 Subject: [PATCH 2/2] Update NaN verification comment in index.js Clarified comment regarding NaN equality check. --- index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index df6f300..2dfcb66 100644 --- a/index.js +++ b/index.js @@ -116,8 +116,7 @@ function equal(a, b) { return true; } - - // NaN verify + // Both NaN: NaN is the only value that isn't equal to itself return a !== a && b !== b; } // end fast-deep-equal