Created
September 27, 2023 12:45
-
-
Save spcbfr/019081aa2bb74bd2856d29f33b306007 to your computer and use it in GitHub Desktop.
scriptEquals
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const strictEquals = (a,b) => (Object.is(a,b) | |
? !Object.is(a, NaN) | |
: (Object.is(a, 0) && Object.is(b, -0)) || (Object.is(a, -0) && Object.is(b, 0))) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment