Usage import DiffMatchPatch from 'diff-match-patch'; const dmp = new DiffMatchPatch(); const diff = dmp.diff_main('dogs bark', 'cats bark'); // You can also use the following properties: DiffMatchPatch.DIFF_DEL