MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / extract_directive

Function extract_directive

examples/js/repl.js:1079–1088  ·  view source on GitHub ↗
(a)

Source from the content-addressed store, hash-verified

1077 }
1078
1079 function extract_directive(a) {
1080 var pos;
1081 if (a[0] !== '\\')
1082 return "";
1083 for (pos = 1; pos < a.length; pos++) {
1084 if (!is_alpha(a[pos]))
1085 break;
1086 }
1087 return a.substring(1, pos);
1088 }
1089
1090 /* return true if the string after cmd can be evaluated as JS */
1091 function handle_directive(cmd, expr) {

Callers 1

handle_cmdFunction · 0.85

Calls 1

is_alphaFunction · 0.85

Tested by

no test coverage detected