UNPKG

@pawanosman/textdiff

Version:

Unicode-aware multilingual text diff library for Node.js that diffs by whole words and merges adjacent changes.

17 lines (15 loc) 476 B
type ChangeType = "insert" | "delete" | "replace" | "spell-correction"; interface TextDiff { oldText: string; position: { startIndex: number; endIndex: number; }; newText: string; changeType: ChangeType; } declare function getTextDiffs(oldTextInput: string, newTextInput: string): TextDiff[]; declare const _default: { getTextDiffs: typeof getTextDiffs; }; export { type ChangeType, type TextDiff, _default as default, getTextDiffs };