|
|
|
|
@ -35,12 +35,12 @@ A config object can be passed in for extra functionality
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
const luaEnv = luainjs.createEnv({
|
|
|
|
|
LUA_PATH, // default value of package.path
|
|
|
|
|
LUA_PATH, // default value of package.path
|
|
|
|
|
fileExists, // function that takes in a path and returns a boolean
|
|
|
|
|
loadFile, // function that takes in a path and returns the content of a file
|
|
|
|
|
stdin, // string representing the standard input
|
|
|
|
|
stdout, // function representing the standard output
|
|
|
|
|
osExit // function called by os.exit
|
|
|
|
|
loadFile, // function that takes in a path and returns the content of a file
|
|
|
|
|
stdin, // string representing the standard input
|
|
|
|
|
stdout, // function representing the standard output
|
|
|
|
|
osExit // function called by os.exit
|
|
|
|
|
})
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|