ltwlf / json-diff-ts

A diff tool for JavaScript written in TypeScript.
MIT License
77 stars 24 forks source link

Question related to `atomizeChangeset` #149

Open maiconcarraro opened 4 months ago

maiconcarraro commented 4 months ago

First of all, amazing project, really straightforward and gets the job done.

Would be possible to incorporate simple-text-diff or text-diff for long text fields? (suggestion/or similar library)

My current situation is to compare complex JSON objects which one of the fields is a description (long text), and sometimes the only diff is a word or new punctuation, but for both changesets (original and atomized) it keeps the full new and old values... which can lead to a massive waste of space and redundant text for the "atomized".

I'll be testing the combination for my own project, but leaving here the suggestion which can be a great plus in the context of atomized changeset.

ltwlf commented 3 months ago

I'm really glad to hear that you find the library useful! Incorporating a simple-text-diff or similar library for managing differences in long text fields is a great suggestion. I've considered something similar in the past and agree that it could significantly enhance the efficiency, especially in reducing redundancy in the storage of changesets.

I'm quite curious to hear about your experiments with combining these functionalities for your project. Your feedback would be invaluable and could potentially guide future updates to the library. Please keep me posted on your progress and any insights you might gather!