1 # is-equal-shallow [![NPM version](https://badge.fury.io/js/is-equal-shallow.svg)](http://badge.fury.io/js/is-equal-shallow) [![Build Status](https://travis-ci.org/jonschlinkert/is-equal-shallow.svg)](https://travis-ci.org/jonschlinkert/is-equal-shallow)
3 > Does a shallow comparison of two objects, returning false if the keys or values differ.
5 The purpose of this lib is to do the fastest comparison possible of two objects when the values will predictably be primitives.
7 * only compares objects.
8 * only compares the first level of each object
9 * values must be primitives. If a value is not a primitive, even if the values are the same, `false` is returned.
11 Install with [npm](https://www.npmjs.com/)
14 $ npm i is-equal-shallow --save
20 var equals = require('is-equal-shallow');
21 equals(object_a, object_b);
27 equals({a: true, b: true}, {a: true, b: true});
30 equals({a: true, b: false}, {c: false, b: false});
33 equals({a: true, b: false}, {a: false, b: false});
37 Strict comparison for equality:
40 equals({a: true, b: true}, {a: true, b: 'true'});
44 When values are not primitives, `false` is always returned:
47 equals({ b: {}}, { b: {}});
50 equals({ b: []}, { b: []});
58 * [clone-deep](https://github.com/jonschlinkert/clone-deep): Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives.
59 * [for-in](https://github.com/jonschlinkert/for-in): Iterate over the own and inherited enumerable properties of an objecte, and return an object… [more](https://github.com/jonschlinkert/for-in)
60 * [for-own](https://github.com/jonschlinkert/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own)
61 * [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor.
62 * [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null.
66 Install dev dependencies:
69 $ npm i -d && npm test
74 Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-equal-shallow/issues/new)
80 + [github/jonschlinkert](https://github.com/jonschlinkert)
81 + [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
85 Copyright © 2015 Jon Schlinkert
86 Released under the MIT license.
90 _This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 22, 2015._