mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 10:58:56 +00:00
* fix valid status code range * update path * highwatermark option * throw DOMException * remove extra transpiler output * more transpiler tests * comment * get index not quickly * replace with `getDirectIndex` * update abort test * throw out of range status code * promisify test fix * move stdio test instance files * working crypto tests * allow duplicate set-cookie headers * different formatting * revert, fix will be in different pr * it is called * use min buffer size * fix url tests * null origin for other protocols * remove overload * add very large file test * await * coerce to int64 * 64 * no cast * add todo blob url tests * use `tryConvertToInt52`
20 lines
537 B
JavaScript
20 lines
537 B
JavaScript
import { ArrayBufferSink } from "bun";
|
|
|
|
const sink = new ArrayBufferSink();
|
|
|
|
sink.write("hello");
|
|
sink.write(" ");
|
|
sink.write("world");
|
|
sink.write(new TextEncoder().encode("hello again|"));
|
|
sink.write(new TextEncoder().encode("😋 Get Emoji — All Emojis to ✂️ Copy and 📋 Paste 👌"));
|
|
|
|
const string = Buffer.from(sink.end()).toString().repeat(9999);
|
|
|
|
if (process.env.TEST_STDIO_STRING) {
|
|
const result = string;
|
|
process.stdout.write(result);
|
|
} else {
|
|
const result = Buffer.from(string);
|
|
process.stdout.write(result);
|
|
}
|