Chore: use Bun.nanoseconds() over performance.now()

This commit is contained in:
SukkaW
2023-12-03 04:00:56 +08:00
parent d4ff4c5b2d
commit 17d69a975a
5 changed files with 20 additions and 23 deletions

View File

@@ -28,9 +28,7 @@ export class PolyfillTextDecoderStream extends TransformStream<Uint8Array, strin
super({
transform(chunk: Uint8Array, controller: TransformStreamDefaultController<string>) {
const decoded = decoder.decode(chunk);
if (decoded.length > 0) {
controller.enqueue(decoded);
}
controller.enqueue(decoded);
},
flush(controller: TransformStreamDefaultController<string>) {
// If {fatal: false} is in options (the default), then the final call to