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

source-academy / js-slang / 5406352152

pending completion
5406352152

Pull #1428

github

web-flow
Merge 0380f5ed7 into 8618e26e4
Pull Request #1428: Further Enhancements to the Module System

3611 of 4728 branches covered (76.37%)

Branch coverage included in aggregate %.

831 of 831 new or added lines in 50 files covered. (100.0%)

10852 of 12603 relevant lines covered (86.11%)

93898.15 hits per line

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

80.0
/src/utils/arrayMap.ts
1
/**
2
 * Convenience class for maps that store an array of values
3
 */
4
export default class ArrayMap<K, V> {
52✔
5
  constructor(private readonly map: Map<K, V[]> = new Map()) {}
1,829✔
6

7
  public get(key: K) {
8
    return this.map.get(key)
×
9
  }
10

11
  public add(key: K, item: V) {
12
    if (!this.map.has(key)) {
122✔
13
      this.map.set(key, [])
113✔
14
    }
15
    this.map.get(key)!.push(item)
122✔
16
  }
17

18
  public entries() {
19
    return Array.from(this.map.entries())
1,815✔
20
  }
21

22
  public keys() {
23
    return new Set(this.map.keys())
×
24
  }
25
}
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