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/b4b354482ffeb55f0e345d9e284228d0 to your computer and use it in GitHub Desktop.
Save Keraito/b4b354482ffeb55f0e345d9e284228d0 to your computer and use it in GitHub Desktop.
function shallowEqual(objA: mixed, objB: mixed): boolean {
// ...
const keysA = Object.keys(objA);
const keysB = Object.keys(objB);
if (keysA.length !== keysB.length) {
return false;
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment