Skip to content

Commit

Permalink
add type check to support browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
jarofghosts committed Feb 4, 2015
1 parent 39dbd12 commit 3acb0d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,5 @@ function objEquiv(a, b, opts) {
key = ka[i];
if (!deepEqual(a[key], b[key], opts)) return false;
}
return true;
return typeof a === typeof b;
}
5 changes: 5 additions & 0 deletions test/cmp.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,8 @@ test('buffers', function (t) {
t.ok(equal(Buffer('xyz'), Buffer('xyz')));
t.end();
});

test('booleans and arrays', function (t) {
t.notOk(equal(true, []));
t.end();
})

0 comments on commit 3acb0d7

Please sign in to comment.