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

project-slippi / slippi-js / 19535476215

20 Nov 2025 11:34AM UTC coverage: 81.464% (+0.07%) from 81.39%
19535476215

Pull #150

github

web-flow
Merge 8cbb96535 into 02a2c65e6
Pull Request #150: Refactor SlippiGame to be web-compatible by default

693 of 926 branches covered (74.84%)

Branch coverage included in aggregate %.

162 of 181 new or added lines in 14 files covered. (89.5%)

1966 of 2338 relevant lines covered (84.09%)

122860.25 hits per line

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

75.0
/src/common/utils/slpInputRef.ts
1
import type { BinaryLike } from "./bufferHelpers";
2
import { bufferCopy, byteLength } from "./bufferHelpers";
12✔
3

4
export interface SlpInputRef {
5
  read(targetBuffer: Uint8Array, offset: number, length: number, position: number): number;
6
  size(): number;
7
  open(): void;
8
  close(): void;
9
}
10

11
export class SlpBufferInputRef implements SlpInputRef {
12✔
12
  public constructor(private readonly buffer: BinaryLike) {}
4✔
13

14
  public open(): void {
15
    // Do nothing
16
  }
17

18
  public size(): number {
19
    return byteLength(this.buffer);
18,693✔
20
  }
21

22
  public close(): void {
23
    // Do nothing
24
  }
25

26
  public read(targetBuffer: Uint8Array, offset: number, length: number, position: number): number {
27
    if (position >= this.size()) {
18,633!
NEW
28
      return 0;
×
29
    }
30
    return bufferCopy(this.buffer, targetBuffer, offset, position, position + length);
18,633✔
31
  }
32
}
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