Browse Source

Define `stripNewline` function

Damian Tarnawski 1 year ago
parent
commit
ea8d3d4531
1 changed files with 4 additions and 0 deletions
  1. 4 0
      vendor/wasm/js/runtime.js

+ 4 - 0
vendor/wasm/js/runtime.js

@@ -9,6 +9,10 @@ function getElement(name) {
 	return undefined;
 }
 
+function stripNewline(str) {
+    return str.replace(/\n$/, ' ')
+}
+
 class WasmMemoryInterface {
 	constructor() {
 		this.memory = null;