code-wasm 2.16.0 → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/code_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ import init, { run } from "code-wasm";
|
|
|
28
28
|
await init();
|
|
29
29
|
|
|
30
30
|
console.log(run("a = 5\nassert a = 5\n"));
|
|
31
|
-
// "
|
|
31
|
+
// "" (success)
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
### Directly in a browser, no bundler
|
|
@@ -37,7 +37,7 @@ console.log(run("a = 5\nassert a = 5\n"));
|
|
|
37
37
|
<script type="module">
|
|
38
38
|
import init, { run } from "https://esm.sh/code-wasm";
|
|
39
39
|
await init();
|
|
40
|
-
console.log(run("
|
|
40
|
+
console.log(run("x = 1 + 1\nassert x = 2\n"));
|
|
41
41
|
</script>
|
|
42
42
|
```
|
|
43
43
|
|
|
@@ -56,7 +56,7 @@ import init, { run } from "code-wasm";
|
|
|
56
56
|
const wasmUrl = import.meta.resolve("code-wasm/dist/code_wasm_bg.wasm");
|
|
57
57
|
await init({ module_or_path: readFileSync(new URL(wasmUrl)) });
|
|
58
58
|
|
|
59
|
-
console.log(run("
|
|
59
|
+
console.log(run("a = 1\n"));
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
## `run(src)`
|
package/dist/code_wasm_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "code-wasm",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.18.0",
|
|
4
4
|
"description": "Run Code — a language with no user-defined functions, particle emission for behavior, and browser-embeddable third-party modules — in any browser or JS host. A small WASM bridge around the language's real parser and interpreter.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/code_wasm.js",
|