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

streetsidesoftware / cspell / 9892707064

11 Jul 2024 01:51PM UTC coverage: 94.74% (-0.4%) from 95.165%
9892707064

Pull #5888

github

web-flow
Merge 5f3491e07 into 12c570942
Pull Request #5888: fix: Improve word lookup performance for FastTrieBlob and TrieBlob

6654 of 7592 branches covered (87.64%)

302 of 347 new or added lines in 13 files covered. (87.03%)

34 existing lines in 2 files now uncovered.

13581 of 14335 relevant lines covered (94.74%)

23182.65 hits per line

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

85.71
/packages/cspell-pipe/src/helpers/iteratorToIterable.ts
1
export function* iteratorToIterable<T>(iterator: Iterator<T>): Iterable<T> {
2
    try {
11✔
3
        let n: IteratorResult<T>;
4
        while (!(n = iterator.next()).done) {
11✔
5
            yield n.value;
21✔
6
        }
7
    } catch (e) {
8
        if (iterator.throw) {
1!
9
            return iterator.throw(e);
1✔
10
        }
NEW
11
        throw e;
×
12
    } finally {
13
        // ensure that clean up happens.
14
        iterator.return?.();
11✔
15
    }
16
}
17

18
export async function* asyncIteratorToAsyncIterable<T>(iterator: AsyncIterator<T> | Iterator<T>): AsyncIterable<T> {
19
    try {
12✔
20
        let n: IteratorResult<T>;
21
        while (!(n = await iterator.next()).done) {
12✔
22
            yield n.value;
26✔
23
        }
24
    } catch (e) {
25
        if (iterator.throw) {
1!
26
            return iterator.throw(e);
1✔
27
        }
NEW
28
        throw e;
×
29
    } finally {
30
        // ensure that clean up happens.
31
        iterator.return?.();
12✔
32
    }
33
}
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

© 2026 Coveralls, Inc