MCPcopy Index your code
hub / github.com/loggerhead/json4u / classify

Function classify

src/lib/compare/diff.ts:50–54  ·  view source on GitHub ↗
(diffs: Diff[])

Source from the content-addressed store, hash-verified

48 * @returns An object containing the left and right differences.
49 */
50export function classify(diffs: Diff[]): { left: Diff[]; right: Diff[] } {
51 const left = sort(diffs.filter((d) => d.type === "del"));
52 const right = sort(diffs.filter((d) => d.type === "ins"));
53 return { left, right };
54}
55
56/**
57 * Sorts an array of differences by type and offset.

Callers 3

solveMethod · 0.90
diffFunction · 0.90
diffArrayFunction · 0.90

Calls 1

sortFunction · 0.85

Tested by

no test coverage detected