monaco-diff
v1.2.1
Published
Text diff library exported from monaco-editor-core, which is core of VS Code.
Downloads
35
Maintainers
Readme
monaco-diff
Text diff library exported from monaco-editor-core, which is core of VS Code.
Install
npm install monaco-diff
Usage
import { diff, linesDiff } from "monaco-diff";
console.log(
diff(
"just some text\n\nHello World\n\nSome more text".split("\n"),
"just some Text\n\nHello World\n\nSome more changes".split("\n")
)
);
console.log(
linesDiff(
"just some text\n\nHello World\n\nSome more text".split("\n"),
"just some Text\n\nHello World\n\nSome more changes".split("\n")
)
);