• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

YuJianrong / fast-array-diff / 9537246397

16 Jun 2024 04:03PM UTC coverage: 100.0%. Remained the same
9537246397

Pull #423

github

web-flow
Merge 5966e4742 into f5754f82e
Pull Request #423: chore(deps-dev): bump braces from 3.0.2 to 3.0.3

143 of 147 branches covered (97.28%)

187 of 187 relevant lines covered (100.0%)

2074.11 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/diff/same.ts
1
import bestSubSequence from './lcs';
1✔
2

3
export default function <T, U = T>(
2✔
4
  a: T[],
5
  b: U[],
6
  compareFunc: (ia: T, ib: U) => boolean = (ia: T, ib: U) => ia === (ib as unknown as T),
3,429✔
7
): T[] {
8
  const ret: T[] = [];
25✔
9
  bestSubSequence(a, b, compareFunc, (type, oldArr, oldStart, oldEnd) => {
25✔
10
    if (type === 'same') {
120✔
11
      for (let i = oldStart; i < oldEnd; ++i) {
57✔
12
        ret.push(oldArr[i]);
85✔
13
      }
14
    }
15
  });
16
  return ret;
25✔
17
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc