jsdifflib is a Javascript library that provides a partial reimplementation of Python's difflib module (specifically, the SequenceMatcher class).
npm install https://github.com/w-site/jsdifflib.git
import { getInlineDiffsArray, getSideBySideDiffsArray } from 'jsdifflib'
Returns array of inline diffs.
Param | Type | Description |
---|---|---|
first | String |
Base text to compare |
second | String |
New text to compare |
Returns arrays of diff side by side, each item of array (ex. array[2]) have 2 items:
- Fist - diff from base text
- Second - diff from new text
Param | Type | Description |
---|---|---|
first | String |
Base text to compare |
second | String |
New text to compare |