2 * is-equal-shallow <https://github.com/jonschlinkert/is-equal-shallow>
4 * Copyright (c) 2015, Jon Schlinkert.
5 * Licensed under the MIT License.
10 var isPrimitive = require('is-primitive');
12 module.exports = function isEqual(a, b) {
13 if (!a && !b) { return true; }
14 if (!a && b || a && !b) { return false; }
16 var numKeysA = 0, numKeysB = 0, key;
19 if (!isPrimitive(b[key]) || !a.hasOwnProperty(key) || (a[key] !== b[key])) {
26 return numKeysA === numKeysB;