(startRev: any, count: any)
| 102 | return newAText; |
| 103 | } |
| 104 | async _getChangesetsInBulk(startRev: any, count: any) { |
| 105 | // find out which revisions we need |
| 106 | const revisions = []; |
| 107 | for (let i = startRev; i < (startRev + count) && i <= this._pad.head; i++) { |
| 108 | revisions.push(i); |
| 109 | } |
| 110 | |
| 111 | // get all needed revisions (in parallel) |
| 112 | const changesets:any[] = []; |
| 113 | const authors: any[] = []; |
| 114 | await Promise.all(revisions.map((rev) => this._pad.getRevision(rev).then((revision) => { |
| 115 | const arrayNum = rev - startRev; |
| 116 | changesets[arrayNum] = revision.changeset; |
| 117 | authors[arrayNum] = revision.meta.author; |
| 118 | }))); |
| 119 | |
| 120 | return {changesets, authors}; |
| 121 | } |
| 122 | _addAuthors(authors: PadAuthor[]){ |
| 123 | // add to array if not in the array |
| 124 | authors.forEach((author) => { |
no test coverage detected