# @gilbarbara/deep-equal

> Tiny deep equal comparator

Latest version **0.4.1** (published 2026-02-04) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.4.1 |
| Published | 2026-02-04 |
| First published | 2022-03-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 38.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| Author | Gil Barbara |
| Maintainers | gilbarbara |
| Keywords | equal, deep-equal, typescript |

## Links

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

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.4.1 (latest) — 2026-02-04
- 0.4.0 — 2026-02-04
- 0.3.1 — 2023-10-17
- 0.3.0 — 2023-10-11
- 0.2.0 — 2023-03-26
- 0.1.2 — 2022-10-19
- 0.1.1 — 2022-03-07
- 0.1.0 — 2022-03-06

## README

# @gilbarbara/deep-equal

[![npm version](https://badge.fury.io/js/%40gilbarbara%2Fdeep-equal.svg)](https://badge.fury.io/js/%40gilbarbara%2Fdeep-equal) [![CI](https://github.com/gilbarbara/deep-equal/actions/workflows/main.yml/badge.svg)](https://github.com/gilbarbara/deep-equal/actions/workflows/main.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=gilbarbara_deep-equal&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=gilbarbara_deep-equal)

Lightweight deep equal comparator.

## Features
- Written in TypeScript
- ESM ready
- Works with Map, Set, and Typed Arrays
- Works with React component (avoid circular references)

## Usage

```shell
npm i @gilbarbara/deep-equal
```

```typescript
import equal from '@gilbarbara/deep-equal';

equal({ a: 1 }, { a: 1 }); // true

```

## Credits

Inspired by [fast-deep-equal](https://github.com/epoberezkin/fast-deep-equal) package. Thanks! ❤️

## License

MIT

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