Skip to content

Instantly share code, notes, and snippets.

@Keraito
Created March 31, 2022 20:29
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 Keraito/adcce0a7786b1120aa727cfabeac384c to your computer and use it in GitHub Desktop.
Save Keraito/adcce0a7786b1120aa727cfabeac384c to your computer and use it in GitHub Desktop.
function shallowEqual(objA: mixed, objB: mixed): boolean {
// ...
if (
typeof objA !== 'object' ||
objA === null ||
typeof objB !== 'object' ||
objB === null
) {
return false;
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment