Skip to content

Instantly share code, notes, and snippets.

@bloodyowl
Created May 4, 2015 16:28
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 bloodyowl/a8ec9b4f2162e1dc41a3 to your computer and use it in GitHub Desktop.
Save bloodyowl/a8ec9b4f2162e1dc41a3 to your computer and use it in GitHub Desktop.
arrayShallowEqual
export default function arrayShallowEqual(left, right) {
if(left.length !== right.length) {
return false
}
return !left.some((item, index) => item !== right[index])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment