Skip to content

Instantly share code, notes, and snippets.

@MaxXxiMast
Last active June 25, 2019 08:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaxXxiMast/bfe01716e172a0768d623b05a0186bbd to your computer and use it in GitHub Desktop.
Save MaxXxiMast/bfe01716e172a0768d623b05a0186bbd to your computer and use it in GitHub Desktop.
Object.is Polyfill
if (!Object.is) {
Object.is = function ObjectIs(x, y) {
if (x === y) {
return x !== 0 || 1/x === 1/y
} else {
return x !== x && y !== y;
}
}
}
// frontend masters - DeepJavascript Foundations V3 - Kyle Simpson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment