# @zoroaster/deep-equal

> The Deep Equal Assertion With Color.

Latest version **1.0.1** (published 2019-04-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @zoroaster/deep-equal
pnpm add @zoroaster/deep-equal
yarn add @zoroaster/deep-equal
bun add @zoroaster/deep-equal
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-04-29 |
| First published | 2019-04-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Anton |
| Maintainers | zvr |
| Keywords | deep-equal, zoroaster, assert, color, difference, diff |

## Links

- npm: https://www.npmjs.com/package/@zoroaster/deep-equal
- Repository: https://github.com/contexttesting/deep-equal
- Homepage: https://github.com/contexttesting/deep-equal#readme
- Issues: https://github.com/contexttesting/deep-equal/issues
- npm.io page: https://npm.io/package/@zoroaster/deep-equal

## Dependencies (1)

- [differently](https://npm.io/package/differently.md) ^1.0.0

## Alternatives

- [postcss-color-hex-alpha](https://npm.io/package/postcss-color-hex-alpha.md) — 6.4M weekly downloads
- [randomcolor](https://npm.io/package/randomcolor.md) — 348.0K weekly downloads
- [bows](https://npm.io/package/bows.md) — 1.3K weekly downloads
- [ep_prefer_color_scheme](https://npm.io/package/ep_prefer_color_scheme.md) — 260 weekly downloads
- [coc-yank](https://npm.io/package/coc-yank.md) — 61 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-04-29
- 1.0.0 — 2019-04-29

## README

# @zoroaster/deep-equal

[![npm version](https://badge.fury.io/js/%40zoroaster%2Fdeep-equal.svg)](https://npmjs.org/package/@zoroaster/deep-equal)

`@zoroaster/deep-equal` is The Deep Equal Assertion With Color.

```sh
yarn add @zoroaster/deep-equal
```

## Table Of Contents

- [Table Of Contents](#table-of-contents)
- [API](#api)
- [`deepEqual(actual: ?, expected: ?, message?: string)`](#deepequalactual-expected-message-string-void)
- [Copyright](#copyright)

<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/0.svg?sanitize=true"></a></p>

## API

The package is available by importing its default function:

```js
import deepEqual from '@zoroaster/deep-equal'
```

<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/1.svg?sanitize=true"></a></p>

## `deepEqual(`<br/>&nbsp;&nbsp;`actual: ?,`<br/>&nbsp;&nbsp;`expected: ?,`<br/>&nbsp;&nbsp;`message?: string,`<br/>`): void`

Calls `assert.deepStrictEqual` and then creates a visual representation of the difference between objects if it throws.

```js
import deepEqual from '@zoroaster/deep-equal'

const compare = (a, b) => {
  try {
    deepEqual(a, b)
  } catch (err) {
    console.log(err.message)
  }
}

compare('hello', 'world')
compare([10, 4, 20], [100, 4, 30])
compare({ a: 'example', b: 10 }, { b: 10, c: 'context-testing' })
```

<table>
<table>
<tr><td>

```
'hello' deepStrictEqual 'world'
- world
+ hello
[ 10, 4, 20 ] deepStrictEqual [ 100, 4, 30 ]
[0]
- 100
+ 10
[2]
- 30
+ 20
{ a: 'example', b: 10 } deepStrictEqual { b: 10, c: 'context-testing' }
- c: context-testing
+ a: example
```
</td></tr><tr><td>

![Deep Equal With Color](doc/doc.png)
</td></tr>
</table>

<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/2.svg?sanitize=true"></a></p>

## Copyright


  (c) [Context Testing](https://contexttesting.com) 2019


<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/-1.svg?sanitize=true"></a></p>

---
_Source: https://npm.io/package/@zoroaster/deep-equal · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
