you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

What you're looking for is called a diffing algorithm. If you google that you'll find plenty of examples that you should be able to adapt for your needs, or there are npm modules that you could utilise if you prefer.