MCPcopy Create free account
hub / github.com/ether/etherpad / constructor

Method constructor

src/node/utils/padDiff.ts:23–37  ·  view source on GitHub ↗
(pad: PadType, fromRev:string, toRev:string)

Source from the content-addressed store, hash-verified

21 private _html: any;
22 public _authors: any[];
23 constructor(pad: PadType, fromRev:string, toRev:string) {
24 // check parameters
25 if (!pad || !pad.id || !pad.atext || !pad.pool) {
26 throw new Error('Invalid pad');
27 }
28
29 const range = pad.getValidRevisionRange(fromRev, toRev);
30 if (!range) throw new Error(`Invalid revision range. startRev: ${fromRev} endRev: ${toRev}`);
31
32 this._pad = pad;
33 this._fromRev = range.startRev;
34 this._toRev = range.endRev;
35 this._html = null;
36 this._authors = [];
37 }
38 _isClearAuthorship(changeset: any){
39 // unpack
40 const unpacked = unpack(changeset);

Callers

nothing calls this directly

Calls 1

getValidRevisionRangeMethod · 0.80

Tested by

no test coverage detected