From db350eaf0eb4cefe86f19e553b5637bce442c3c2 Mon Sep 17 00:00:00 2001 From: brettkolodny Date: Fri, 17 Feb 2023 10:05:58 -0500 Subject: fix: deno println to match node implementation --- src/gleam_stdlib.mjs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/gleam_stdlib.mjs b/src/gleam_stdlib.mjs index 1fa2563..8532821 100644 --- a/src/gleam_stdlib.mjs +++ b/src/gleam_stdlib.mjs @@ -275,6 +275,8 @@ export function bit_string_to_string(bit_string) { export function print(string) { if (typeof process === "object") { process.stdout.write(string); // We can write without a trailing newline + } else if (typeof Deno === "object") { + Deno.stdout.writeSync(new TextEncoder().encode(string)); } else { console.log(string); // We're in a browser. Newlines are mandated } -- cgit v1.2.3