From f6d264ea40c3085480e5e27e96d5da34913b4d1f Mon Sep 17 00:00:00 2001 From: Hamza Ali Date: Sun, 21 Mar 2021 10:59:02 +0700 Subject: [PATCH] refactor(js): remove debug calls in bridge.js --- bridge.js | 2 -- example/src/index.js | 2 +- index.js | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/bridge.js b/bridge.js index 2334809..f788c77 100644 --- a/bridge.js +++ b/bridge.js @@ -35,10 +35,8 @@ export default function (getBytes) { return (...args) => { return new Promise(async (res, rej) => { while (bridge.__ready__ !== true) { - console.log("waiting") await sleep() } - console.log("done!") if (typeof bridge[key] !== 'function') { res(bridge[key]); diff --git a/example/src/index.js b/example/src/index.js index 1b6dd89..feb7288 100644 --- a/example/src/index.js +++ b/example/src/index.js @@ -1,5 +1,5 @@ import wasm from './api/main.go'; (async () => { - + console.log(await wasm.__ready__()) })() \ No newline at end of file diff --git a/index.js b/index.js index b388f1b..6a06264 100644 --- a/index.js +++ b/index.js @@ -68,8 +68,7 @@ module.exports = function (source) { if (!(await exists(__dirname, 'wasm_exec.js'))) { fs.copyFileSync(wasmOrigPath, wasmEmitPath) } - - let contents = fs.readFileSync(outFile) + const contents = fs.readFileSync(outFile) fs.unlinkSync(outFile) const emitPath = path.basename(outFile)