shravan20 / flare.ts

A powerful utility library for clean code in js (npm package)
https://shravan20.github.io/flare.ts
MIT License
2 stars 6 forks source link

JSON Comparison #25

Closed shubhankar-mern closed 10 months ago

shubhankar-mern commented 10 months ago

This PR adds the proposed functionality of Create a utility method to compare two JSON objects, highlighting the differences between them.

@shravan20 Please Review and Merge

Summary by CodeRabbit

coderabbitai[bot] commented 10 months ago

Walkthrough

This change introduces a new utility function compareJSONObject in the JSONUtils module. It compares two JSON objects and returns the differences. A corresponding test case has been added to ensure the function works as expected.

Changes

File Summary
lib/utility/JSONUtils/index.ts Introduced a new type JSONValue and a function compareJSONObject that compares two JSON objects and returns the differences.
lib/tests/JSONUtils/test.spec.ts Added a test case for the compareJSONObject function. The test creates two sample JSON objects, compares them, and asserts the result.

🐇

In the land of code, where the shadows lie,

A rabbit hops, its gaze held high.

With each key press, a new world born,

In the heart of JSON, a new dawn is drawn.

Comparing objects, finding what's new,

Celebrating changes, for me and for you. 🎉

Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - Mention `@coderabbitai` in any *review comment* for bot assistance. - Note: Review comments are made on code diffs or files, not on the PR overview. ### Pause Incremental Reviews - Insert `@coderabbitai: ignore` in the PR description to halt the bot's ongoing reviews. Remove the line to resume. - Additionally, enter `@coderabbitai pause` to halt the bot's ongoing reviews as any issue or review comment. To resume reviews, enter `@coderabbitai resume` as any issue or review comment.
shubhankar-mern commented 10 months ago

hi @shravan20 what is failing? The eslint check?

shravan20 commented 10 months ago

hi @shravan20 what is failing? The eslint check?

This shouldnt be an issue. PR LGTM