From f78920f014e2e2b3d512bd5703902bbdba68eb4f Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Sat, 31 Jul 2021 11:26:38 +0100 Subject: Move atom module to gleam_erlang library --- src/gleam_stdlib.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/gleam_stdlib.js') diff --git a/src/gleam_stdlib.js b/src/gleam_stdlib.js index 68ab895..1e93901 100644 --- a/src/gleam_stdlib.js +++ b/src/gleam_stdlib.js @@ -199,3 +199,11 @@ export function bit_string_to_string(bit_string) { return gleam_error(undefined); } } + +export function print(string) { + if (typeof process === "object") { + process.stdout.write(string); // We can write without a trailing newline + } else { + console.log(string); // We're in a browser. Newlines are mandated + } +} -- cgit v1.2.3