Skip to content

Commit 625e181

Browse files
committed
Use snakeCase
1 parent 264d218 commit 625e181

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

wasm/demo/src/main.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const term = new Terminal();
8080
term.open(document.getElementById('terminal'));
8181
term.write(prompt);
8282

83-
function remove_non_ascii(str) {
83+
function removeNonAscii(str) {
8484
if ((str===null) || (str===''))
8585
return false;
8686
else
@@ -89,12 +89,12 @@ function remove_non_ascii(str) {
8989
return str.replace(/[^\x20-\x7E]/g, '');
9090
}
9191

92-
function print_to_console(data) {
93-
term.write(remove_non_ascii(data) + "\r\n");
92+
function printToConsole(data) {
93+
term.write(removeNonAscii(data) + "\r\n");
9494
}
9595

9696
const terminalVM = rp.vmStore.init("term_vm");
97-
terminalVM.setStdout(print_to_console);
97+
terminalVM.setStdout(printToConsole);
9898

9999
var input = "";
100100
term.on("data", (data) => {
@@ -111,7 +111,7 @@ term.on("data", (data) => {
111111
if (err instanceof WebAssembly.RuntimeError) {
112112
err = window.__RUSTPYTHON_ERROR || err;
113113
}
114-
print_to_console(err);
114+
printToConsole(err);
115115
}
116116
term.write(prompt);
117117
input = "";

0 commit comments

Comments
 (0)