All files / json-crdt-extensions/peritext/slice LocalSlices.ts

83.33% Statements 5/6
100% Branches 1/1
50% Functions 1/2
80% Lines 4/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 1457x     57x   581x 581x              
import {Slices} from './Slices';
import type {ITimestampStruct} from '../../../json-crdt-patch';
 
export class LocalSlices<T = string> extends Slices<T> {
  public del(id: ITimestampStruct): void {
    super.del(id);
    if (Math.random() < 0.1) this.set.removeTombstones();
  }
 
  public toStringName(): string {
    return 'LocalSlices';
  }
}