mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-02-25 02:22:02 +00:00
refactor: use standard prettier formatting
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
export class LineBreakTransformer {
|
||||
private chunks = ""
|
||||
private chunks = "";
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
transform(chunk: string, controller: TransformStreamDefaultController) {
|
||||
this.chunks += chunk
|
||||
const lines = this.chunks.split("\r\n")
|
||||
this.chunks = lines.pop()!
|
||||
this.chunks += chunk;
|
||||
const lines = this.chunks.split("\r\n");
|
||||
this.chunks = lines.pop()!;
|
||||
for (const line of lines) {
|
||||
controller.enqueue(line)
|
||||
controller.enqueue(line);
|
||||
}
|
||||
}
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
flush(controller: TransformStreamDefaultController) {
|
||||
controller.enqueue(this.chunks)
|
||||
controller.enqueue(this.chunks);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user