# lukeed/dequal architecture

> Architecture diagram of the GitHub repository lukeed/dequal, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lukeed/dequal
- Repository: https://github.com/lukeed/dequal
- Video tour (about a minute): https://gitdiagram.com/lukeed/dequal/video

## Overview

dequal is a small JavaScript library for deep equality checks. A caller supplies two values to either the full or lite implementation and receives a boolean; recursive comparisons handle nested values. The full implementation also searches Set and Map keys by value. README-described type support is preserved here, though only the main comparison paths were sampled.

Main entry points: [`src/index.js`](https://github.com/lukeed/dequal/blob/master/src/index.js) (Full comparator), [`src/lite.js`](https://github.com/lukeed/dequal/blob/master/src/lite.js) (Lite comparator)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_caller(("Library caller"))
node_full["Full comparator<br/>[index.js]"]
node_lite["Lite comparator<br/>[lite.js]"]
node_key_search["Key search<br/>[index.js]"]

node_caller -->|"compares values"| node_full
node_caller -->|"compares values"| node_lite
node_full -->|"recurses"| node_full
node_lite -->|"recurses"| node_lite
node_full -->|"searches keys"| node_key_search
node_key_search -->|"compares keys"| node_full
node_full -->|"returns boolean"| node_caller
node_lite -->|"returns boolean"| node_caller

click node_full "https://github.com/lukeed/dequal/blob/master/src/index.js"
click node_lite "https://github.com/lukeed/dequal/blob/master/src/lite.js"
click node_key_search "https://github.com/lukeed/dequal/blob/master/src/index.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_caller toneIndigo
class node_full,node_lite,node_key_search toneTeal
```

## Components

### Other components

- **Library caller**
- [Full comparator](https://github.com/lukeed/dequal/blob/master/src/index.js): `src/index.js`
- [Lite comparator](https://github.com/lukeed/dequal/blob/master/src/lite.js): `src/lite.js`
- [Key search](https://github.com/lukeed/dequal/blob/master/src/index.js): `src/index.js`

## Connections

- Library caller → Full comparator: compares values
- Library caller → Lite comparator: compares values
- Full comparator → Full comparator: recurses
- Lite comparator → Lite comparator: recurses
- Full comparator → Key search: searches keys
- Key search → Full comparator: compares keys
- Full comparator → Library caller: returns boolean
- Lite comparator → Library caller: returns boolean
