MCPcopy Create free account
hub / github.com/alibaba/open-code-review / firstDiffIndex

Function firstDiffIndex

scripts/github-actions/check-translation-sync.js:112–116  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

110}
111
112function firstDiffIndex(a, b) {
113 const n = Math.min(a.length, b.length);
114 for (let i = 0; i < n; i++) if (a[i] !== b[i]) return i;
115 return n; // sequences agree up to the shorter one's length
116}
117
118function describeHeading(h) {
119 if (!h) return "no heading (document ends)";

Callers 1

compareReadmeStructuresFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected