Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dancastillo/json
https://github.com/dancastillo/json
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dancastillo/json
- Owner: dancastillo
- License: mit
- Created: 2023-10-26T21:25:36.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-12T13:50:25.000Z (5 months ago)
- Last Synced: 2024-08-13T03:35:09.397Z (5 months ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @dancastillo/json
A simple, lightweight JavaScript library for deep comparison of objects. Perfect for ensuring two objects have identical values, no matter how nested they are.
## Features
- **Deep Equality Check**: Compares objects deeply, ensuring that every nested property is equal.
- **Lightweight & Fast**: Optimized for performance, adding minimal overhead to your projects.
- **Easy to Use**: Simple and straightforward API.## Installation
To install the package, run the following command in your project directory:
```bash
npm install @dancastillo/json
```## API Reference
#### deepEqual(obj1, obj2)
Compares two objects for deep equality.
Example Usage
```typsescripe
const { deepEqual } = require('@dancastillo/json')const a = {
a: 1,
b: {
d: 4,
e: { f: 6 }
},
c: 3
}
const b = {
a: 1,
b: {
d: 4,
e: { f: 6 }
},
c: 3
}console.log(deepEqual(a, b)) // true
```