Skip to content

Commit

Permalink
Optimization for array comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jan 14, 2014
1 parent 3c59ef9 commit 0169b55
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ module.exports = function isEqual(value, other) {

if (type === arrayType) {
if (value.length !== other.length) { return false; }
if (String(value) !== String(other)) { return false; }

var index = value.length;
do {
Expand Down

0 comments on commit 0169b55

Please sign in to comment.