()
| 318 | } |
| 319 | |
| 320 | flush() { |
| 321 | const remaining: TrackHandlerPayload[] = []; |
| 322 | for (const item of this.queue) { |
| 323 | if (this.shouldQueue(item)) { |
| 324 | remaining.push(item); |
| 325 | continue; |
| 326 | } |
| 327 | const payload = this.buildFlushPayload(item); |
| 328 | this.send({ ...item, payload } as TrackHandlerPayload); |
| 329 | } |
| 330 | this.queue = remaining; |
| 331 | } |
| 332 | |
| 333 | log(...args: any[]) { |
| 334 | if (this.options.debug) { |
no test coverage detected