MCPcopy Index your code
hub / github.com/ether/etherpad / constructor

Method constructor

src/node/db/Pad.ts:176–186  ·  view source on GitHub ↗

* @param id * @param [database] - Database object to access this pad's records (and only this pad's records; * the shared global Etherpad database object is still used for all other pad accesses, such * as copying the pad). Defaults to the shared global Etherpad database object. Thi

(id:string, database = db)

Source from the content-addressed store, hash-verified

174 * own database table, or to validate imported pad data before it is written to the database.
175 */
176 constructor(id:string, database = db) {
177 this.db = database;
178 this.atext = makeAText('\n');
179 this.pool = new AttributePool();
180 this.head = -1;
181 this.chatHead = -1;
182 this.publicStatus = false;
183 this.id = id;
184 this.savedRevisions = [];
185 this.padSettings = Pad.normalizePadSettings();
186 }
187
188 static normalizePadSettings(rawPadSettings: any = {}): PadSettings {
189 const rawView = rawPadSettings.view ?? {};

Callers

nothing calls this directly

Calls 2

makeATextFunction · 0.90
normalizePadSettingsMethod · 0.80

Tested by

no test coverage detected