New stuff
diff --git a/units-impl-wasm.js b/units-impl-wasm.js
index bf562e1..105f51e 100644
--- a/units-impl-wasm.js
+++ b/units-impl-wasm.js
@@ -1,6 +1,12 @@
-const units = require("./units.js");
+const units = require("./units.lib.js");
-units().then((Module) => {
+globalThis.printBuffer = "";
+
+units({
+ "print": function(out) {
+ globalThis.printBuffer += out + "\n";
+ }
+}).then((Module) => {
let _do_a_conversion = Module.cwrap("do_a_conversion", "number", [
"number",
"number",
@@ -17,4 +23,4 @@
}
window.convert = convert;
-});
\ No newline at end of file
+});