MCPcopy Create free account
hub / github.com/ceifa/wasmoon / doStringSync

Method doStringSync

src/engine.ts:82–86  ·  view source on GitHub ↗

* Executes Lua code from a string synchronously. * @param script - Lua script to execute. * @returns - The result returned by the Lua script.

(script: string)

Source from the content-addressed store, hash-verified

80 * @returns - The result returned by the Lua script.
81 */
82 public doStringSync(script: string): any {
83 this.global.loadString(script)
84 const result = this.global.runSync()
85 return result[0]
86 }
87
88 /**
89 * Executes Lua code from a file synchronously.

Callers 3

engine.test.jsFile · 0.80
promises.test.jsFile · 0.80
debug.jsFile · 0.80

Calls 2

loadStringMethod · 0.80
runSyncMethod · 0.80

Tested by

no test coverage detected