<commit_before># 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)

> Does a shallow comparison of two objects, returning false if the keys or values differ.

The purpose of this lib is to do the fastest comparison possible of two objects when the values will predictably be primitives.

* only compares objects.
* only compares the first level of each object
* values must be primitives. If a value is not a primitive, even if the values are the same, `false` is returned.

Install with [npm](https://www.npmjs.com/)

```sh
$ npm i is-equal-shallow --save
```

## Usage

```js
var equals = require('is-equal-shallow');
equals(object_a, object_b);<commit_msg>Add example for es6 import<commit_after># 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)

> Does a shallow comparison of two objects, returning false if the keys or values differ.

The purpose of this lib is to do the fastest comparison possible of two objects when the values will predictably be primitives.

* only compares objects.
* only compares the first level of each object
* values must be primitives. If a value is not a primitive, even if the values are the same, `false` is returned.

Install with [npm](https://www.npmjs.com/)

```sh
$ npm i is-equal-shallow --save
```

## Usage

```js
// legacy cjs require
var equals = require('is-equal-shallow');
// use es6 import
import equals from 'is-equal-shallow';

equals(object_a, object_b);
{'fraction_non_alphanumeric': 0.1302913688840022, 'fraction_numerical': 0.0010995052226498076, 'mean_word_length': 4.384615384615385, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6552705', 'n_tokens_mistral': 603, 'n_tokens_neox': 578, 'n_words': 193}