{"versions":{"0.1.4":{"name":"fengari","version":"0.1.4","description":"A Lua VM written in JS ES6 targeting the browser","main":"src/fengari.js","directories":{"lib":"src","test":"test"},"scripts":{"lint":"eslint src/ test/","prepublishOnly":"git diff-index --quiet --cached HEAD -- && npm run lint && npm run test","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/fengari-lua/fengari.git"},"keywords":["lua","vm"],"contributors":[{"name":"Benoit Giannangeli"},{"name":"Daurnimator","email":"quae@daurnimator.com"}],"license":"MIT","bugs":{"url":"https://github.com/fengari-lua/fengari/issues"},"homepage":"https://github.com/fengari-lua/fengari#readme","devDependencies":{"eslint":"^5.9.0","jest":"^23.6.0"},"dependencies":{"readline-sync":"^1.4.9","sprintf-js":"^1.1.1","tmp":"^0.0.33"},"sideEffects":false,"eslintConfig":{"env":{"browser":true,"es6":true,"node":true,"worker":true},"extends":"eslint:recommended","rules":{"indent":["error",4,{"SwitchCase":1}],"linebreak-style":["error","unix"],"no-console":0,"no-empty":[2,{"allowEmptyCatch":true}],"no-unused-vars":[2,{"args":"none"}],"semi":["error","always"]},"overrides":[{"files":["test/**/*.test.js"],"env":{"jest":true}}]},"gitHead":"750896cb052edac652e5b5af55bed66141d08404","_id":"fengari@0.1.4","_shasum":"72416693cd9e43bd7d809d7829ddc0578b78b0bb","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.14.1","_npmUser":{"name":"anonymous","email":"quae@daurnimator.com"},"dist":{"shasum":"72416693cd9e43bd7d809d7829ddc0578b78b0bb","size":471554,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fengari/-/fengari-0.1.4.tgz","integrity":"sha512-6ujqUuiIYmcgkGz8MGAdERU57EIluGGPSUgGPTsco657EHa+srq0S3/YUl/r9kx1+D+d4rGfYObd+m8K22gB1g=="},"maintainers":[{"name":"anonymous","email":"quae@daurnimator.com"},{"name":"anonymous","email":"giann008@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fengari_0.1.4_1542545925363_0.3123657865517324"},"_hasShrinkwrap":false,"publish_time":1542545925580,"_cnpm_publish_time":1542545925580,"_cnpmcore_publish_time":"2021-12-17T02:15:02.992Z"},"0.1.3":{"name":"fengari","version":"0.1.3","description":"A Lua VM written in JS ES6 targeting the browser","main":"src/fengari.js","directories":{"lib":"src","test":"test"},"scripts":{"lint":"eslint src/ test/","prepublishOnly":"git diff-index --quiet --cached HEAD -- && npm run lint && npm run test","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/fengari-lua/fengari.git"},"keywords":["lua","vm"],"contributors":[{"name":"Benoit Giannangeli"},{"name":"Daurnimator","email":"quae@daurnimator.com"}],"license":"MIT","bugs":{"url":"https://github.com/fengari-lua/fengari/issues"},"homepage":"https://github.com/fengari-lua/fengari#readme","devDependencies":{"eslint":"^5.8.0","jest":"^23.6.0"},"dependencies":{"readline-sync":"^1.4.9","sprintf-js":"^1.1.1","tmp":"^0.0.33"},"sideEffects":false,"eslintConfig":{"env":{"browser":true,"es6":true,"node":true,"worker":true},"extends":"eslint:recommended","rules":{"indent":["error",4,{"SwitchCase":1}],"linebreak-style":["error","unix"],"no-console":0,"no-empty":[2,{"allowEmptyCatch":true}],"no-unused-vars":[2,{"args":"none"}],"semi":["error","always"]},"overrides":[{"files":["test/**/*.test.js"],"env":{"jest":true}}]},"gitHead":"4ec203c68b495c32fc652244fd38380d61fc3174","_id":"fengari@0.1.3","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"anonymous","email":"quae@daurnimator.com"},"dist":{"shasum":"5a49ad31809ebe0e0ea4a0f3be57efd9ed79f60a","size":471626,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fengari/-/fengari-0.1.3.tgz","integrity":"sha512-uqRVUia8opoQyDZNSHjR/oolPaIJAkDZJQP815S9Aqy8hAAGQU9EaXGU0FjLLFgeG+5kIV2z4+1rvlSGFrsUsg=="},"maintainers":[{"name":"anonymous","email":"quae@daurnimator.com"},{"name":"anonymous","email":"giann008@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fengari_0.1.3_1540815323141_0.15637590903769127"},"_hasShrinkwrap":false,"publish_time":1540815323287,"_cnpm_publish_time":1540815323287,"_cnpmcore_publish_time":"2021-12-17T02:15:04.278Z"},"0.1.2":{"name":"fengari","version":"0.1.2","description":"A Lua VM written in JS ES6 targeting the browser","main":"src/fengari.js","directories":{"lib":"src","test":"test"},"scripts":{"lint":"eslint src/ test/","prepublishOnly":"git diff-index --quiet --cached HEAD -- && npm run lint && npm run test","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/fengari-lua/fengari.git"},"keywords":["lua","vm"],"contributors":[{"name":"Benoit Giannangeli"},{"name":"Daurnimator","email":"quae@daurnimator.com"}],"license":"MIT","bugs":{"url":"https://github.com/fengari-lua/fengari/issues"},"homepage":"https://github.com/fengari-lua/fengari#readme","devDependencies":{"eslint":"^4.19.1","jest":"^22.4.3"},"dependencies":{"readline-sync":"^1.4.9","sprintf-js":"^1.1.1","tmp":"^0.0.33"},"sideEffects":false,"eslintConfig":{"env":{"browser":true,"es6":true,"node":true,"worker":true},"extends":"eslint:recommended","rules":{"indent":["error",4,{"SwitchCase":1}],"linebreak-style":["error","unix"],"no-console":0,"no-empty":[2,{"allowEmptyCatch":true}],"no-unused-vars":[2,{"args":"none"}],"semi":["error","always"]},"overrides":[{"files":["test/**/*.test.js"],"env":{"jest":true}}]},"gitHead":"c60a1cbc5f76a147e74135add574a6a5d63eba7b","_id":"fengari@0.1.2","_npmVersion":"5.8.0","_nodeVersion":"9.11.1","_npmUser":{"name":"anonymous","email":"quae@daurnimator.com"},"dist":{"shasum":"b387e2bd9ccd577134f73cf654ab0bcb1bc9bb78","size":446111,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fengari/-/fengari-0.1.2.tgz","integrity":"sha512-NleQtQymPtbjBPnGOQiXfZfKpP3R7si+Sbkke631PWNnZt86eZSlymRJ0qv/KUTcz0fSsWO1iltZYz5/JV1uYQ=="},"maintainers":[{"name":"anonymous","email":"quae@daurnimator.com"},{"name":"anonymous","email":"giann008@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fengari_0.1.2_1524406235543_0.6364004515935797"},"_hasShrinkwrap":false,"publish_time":1524406235653,"_cnpm_publish_time":1524406235653,"_cnpmcore_publish_time":"2021-12-17T02:15:05.254Z"},"0.1.1":{"name":"fengari","version":"0.1.1","description":"A Lua VM written in JS ES6 targeting the browser","main":"src/fengari.js","directories":{"lib":"src","test":"tests"},"scripts":{"lint":"eslint src/ tests/","prepublishOnly":"git diff-index --quiet --cached HEAD -- && npm run lint && npm run test","test":"tape tests/*.js tests/test-suite/*.js | faucet"},"repository":{"type":"git","url":"git+https://github.com/fengari-lua/fengari.git"},"keywords":["lua","vm"],"contributors":[{"name":"Benoit Giannangeli"},{"name":"Daurnimator","email":"quae@daurnimator.com"}],"license":"MIT","bugs":{"url":"https://github.com/fengari-lua/fengari/issues"},"homepage":"https://github.com/fengari-lua/fengari#readme","devDependencies":{"eslint":"^4.19.1","faucet":"^0.0.1","tape":"^4.9.0"},"dependencies":{"readline-sync":"^1.4.9","sprintf-js":"^1.1.1","strftime":"^0.10.0","tmp":"^0.0.33"},"sideEffects":false,"eslintConfig":{"env":{"browser":true,"es6":true,"node":true,"worker":true},"extends":"eslint:recommended","rules":{"indent":["error",4,{"SwitchCase":1}],"linebreak-style":["error","unix"],"no-console":0,"no-empty":[2,{"allowEmptyCatch":true}],"no-unused-vars":[2,{"args":"none"}],"semi":["error","always"]}},"gitHead":"8b2d34d2abde706ce0b7320c95bf2627970f1bdf","_id":"fengari@0.1.1","_npmVersion":"5.7.1","_nodeVersion":"9.10.1","_npmUser":{"name":"anonymous","email":"quae@daurnimator.com"},"dist":{"shasum":"3cb6929851726154a33aec4118c690b78b186b43","size":421293,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fengari/-/fengari-0.1.1.tgz","integrity":"sha512-dq30jk9fdx9qmmxjWr9XG/fTh6UG/ChjN0kvjaT8YlV3bYoa8eTdff7Ag6OSFkQjjOaa2jwTtBbWP2UBUVvx1Q=="},"maintainers":[{"name":"anonymous","email":"quae@daurnimator.com"},{"name":"anonymous","email":"giann008@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fengari_0.1.1_1522757792788_0.32896651705461877"},"_hasShrinkwrap":false,"publish_time":1522757792893,"_cnpm_publish_time":1522757792893,"_cnpmcore_publish_time":"2021-12-17T02:15:06.039Z"},"0.1.0":{"name":"fengari","version":"0.1.0","description":"A Lua VM written in JS ES6 targeting the browser","main":"src/fengari.js","directories":{"lib":"src","test":"tests"},"scripts":{"lint":"eslint src/ tests/","prepublishOnly":"git diff-index --quiet --cached HEAD -- && npm run lint && npm run test","test":"tape tests/*.js tests/test-suite/*.js | faucet"},"repository":{"type":"git","url":"git+https://github.com/fengari-lua/fengari.git"},"keywords":["lua","vm"],"contributors":[{"name":"Benoit Giannangeli"},{"name":"Daurnimator","email":"quae@daurnimator.com"}],"license":"MIT","bugs":{"url":"https://github.com/fengari-lua/fengari/issues"},"homepage":"https://github.com/fengari-lua/fengari#readme","devDependencies":{"eslint":"^4.19.1","faucet":"^0.0.1","tape":"^4.9.0"},"dependencies":{"readline-sync":"^1.4.9","sprintf-js":"^1.1.1","strftime":"^0.10.0","tmp":"^0.0.33"},"sideEffects":false,"eslintConfig":{"env":{"browser":true,"es6":true,"node":true,"worker":true},"extends":"eslint:recommended","rules":{"indent":["error",4,{"SwitchCase":1}],"linebreak-style":["error","unix"],"no-console":0,"no-empty":[2,{"allowEmptyCatch":true}],"no-unused-vars":[2,{"args":"none"}],"semi":["error","always"]}},"gitHead":"cd06f8d388814a1916f2db0814137e519170373c","_id":"fengari@0.1.0","_npmVersion":"5.7.1","_nodeVersion":"9.9.0","_npmUser":{"name":"anonymous","email":"quae@daurnimator.com"},"dist":{"shasum":"fbc7566a43e3c6e2b37d6c4246f87de9b0b31866","size":421095,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fengari/-/fengari-0.1.0.tgz","integrity":"sha512-79gUIs4UfQ3g6gD+f17wZT+s5+7xPDl1U9hNFYEsLOgRqaDAuwPFKAGTkpioVkCsJFJc8wm933AtMv5TsIhNyQ=="},"maintainers":[{"name":"anonymous","email":"quae@daurnimator.com"},{"name":"anonymous","email":"giann008@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fengari_0.1.0_1522461564742_0.7538742870654245"},"_hasShrinkwrap":false,"publish_time":1522461564860,"_cnpm_publish_time":1522461564860,"_cnpmcore_publish_time":"2021-12-17T02:15:07.213Z"},"0.0.1-rc.1":{"name":"fengari","version":"0.0.1-rc.1","description":"A Lua VM written in JS ES6 targeting the browser","main":"src/fengari.js","directories":{"lib":"src","test":"tests"},"scripts":{"build":"webpack","lint":"eslint src/ tests/","test":"tape tests/*.js tests/test-suite/*.js | faucet"},"repository":{"type":"git","url":"git+https://github.com/fengari-lua/fengari.git"},"keywords":["lua","vm"],"contributors":[{"name":"Benoit Giannangeli"},{"name":"Daurnimator","email":"quae@daurnimator.com"}],"license":"MIT","bugs":{"url":"https://github.com/fengari-lua/fengari/issues"},"homepage":"https://github.com/fengari-lua/fengari#readme","devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.1","babel-preset-env":"^1.6.1","eslint":"^4.17.0","faucet":"^0.0.1","tape":"^4.8.0","webpack":"^3.10.0"},"dependencies":{"readline-sync":"^1.4.7","sprintf-js":"^1.1.1","strftime":"^0.10.0","tmp":"^0.0.33"},"sideEffects":false,"eslintConfig":{"env":{"browser":true,"es6":true,"node":true,"worker":true},"extends":"eslint:recommended","rules":{"indent":["error",4,{"SwitchCase":1}],"linebreak-style":["error","unix"],"no-console":0,"no-empty":[2,{"allowEmptyCatch":true}],"no-unused-vars":[2,{"args":"none"}],"semi":["error","always"]}},"gitHead":"07c8936f4e94ec608c4b2ae12d1b4c8a221b1aa0","_id":"fengari@0.0.1-rc.1","_npmVersion":"5.6.0","_nodeVersion":"9.5.0","_npmUser":{"name":"anonymous","email":"quae@daurnimator.com"},"dist":{"shasum":"ec2733ea334d0eaf629e05eed669e91e1bd6d6c5","size":442160,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fengari/-/fengari-0.0.1-rc.1.tgz","integrity":"sha512-akrDtwP+EUCKU8auSIO8jo82b5tQh5ImxMwmYe4dRnZlC3voC3oGOjfeBiMM3FsufIcAPxkv34nzhJNj9x2qeQ=="},"maintainers":[{"name":"anonymous","email":"quae@daurnimator.com"},{"name":"anonymous","email":"giann008@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fengari-0.0.1-rc.1.tgz_1517807778964_0.2670519258826971"},"publish_time":1517807779059,"_hasShrinkwrap":false,"_cnpm_publish_time":1517807779059,"_cnpmcore_publish_time":"2021-12-17T02:15:08.721Z"},"0.1.5":{"name":"fengari","version":"0.1.5","description":"A Lua VM written in JS ES6 targeting the browser","main":"src/fengari.js","directories":{"lib":"src","test":"test"},"scripts":{"lint":"eslint src/ test/","prepublishOnly":"git diff-index --quiet --cached HEAD -- && npm run lint && npm run test","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/fengari-lua/fengari.git"},"keywords":["lua","vm"],"contributors":[{"name":"Benoit Giannangeli"},{"name":"Daurnimator","email":"quae@daurnimator.com"}],"license":"MIT","bugs":{"url":"https://github.com/fengari-lua/fengari/issues"},"homepage":"https://github.com/fengari-lua/fengari#readme","devDependencies":{"eslint":"^9.39.2","jest":"^30.2.0"},"dependencies":{"readline-sync":"^1.4.10","sprintf-js":"^1.1.3","tmp":"^0.2.5"},"sideEffects":false,"gitHead":"ac8c3872509a56fb4bd9c1ef853de01f391c058b","_id":"fengari@0.1.5","_nodeVersion":"25.2.1","_npmVersion":"11.6.4","dist":{"integrity":"sha512-0DS4Nn4rV8qyFlQCpKK8brT61EUtswynrpfFTcgLErcilBIBskSMQ86fO2WVuybr14ywyKdRjv91FiRZwnEuvQ==","shasum":"d10aa980044c47d5b019b10979adc6e703dc5cb8","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fengari/-/fengari-0.1.5.tgz","fileCount":95,"unpackedSize":1640659,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICifys2ANnoFnhQFBu9bOjBzB6Yu5k0S83KLRV68Kg/tAiBlTv0cc9RIerx+OUCfc2yof/QjePL3SrQb6RBmfyHpdQ=="}],"size":412093},"_npmUser":{"name":"anonymous","email":"quae@daurnimator.com"},"maintainers":[{"name":"anonymous","email":"giann008@gmail.com"},{"name":"anonymous","email":"quae@daurnimator.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/fengari_0.1.5_1766750666238_0.1122907878333066"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-12-26T12:04:26.408Z","publish_time":1766750666408,"_source_registry_name":"default"}},"dist-tags":{"latest":"0.1.5"},"name":"fengari","time":{"created":"2022-01-26T20:55:38.256Z","modified":"2025-12-26T12:04:40.169Z","0.1.4":"2018-11-18T12:58:45.580Z","0.1.3":"2018-10-29T12:15:23.287Z","0.1.2":"2018-04-22T14:10:35.653Z","0.1.1":"2018-04-03T12:16:32.893Z","0.1.0":"2018-03-31T01:59:24.860Z","0.0.1-rc.1":"2018-02-05T05:16:19.059Z","0.1.5":"2025-12-26T12:04:26.408Z"},"readme":"[![Build Status](https://github.com/fengari-lua/fengari/actions/workflows/ci.yaml/badge.svg)](https://github.com/fengari-lua/fengari/actions/workflows/ci.yaml?query=event%3Apush)\n[![npm](https://img.shields.io/npm/v/fengari.svg)](https://npmjs.com/package/fengari)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![#fengari on libera.chat](https://img.shields.io/badge/chat-%23fengari-brightgreen)](https://web.libera.chat/?channels=#fengari)\n\n<p align=\"center\">\n    <img src=\"https://github.com/fengari-lua/fengari/raw/master/logo.png\" alt=\"Fengari\" width=\"304\" height=\"304\">\n</p>\n\n\n# Fengari\n\n🌙 φεγγάρι - The Lua VM written in JS ES6 for Node and the browser\n\nThis repository contains the core fengari code (which is a port of the Lua C library) which includes parser, virtual machine and base libraries.\nHowever it is rare to use this repository directly.\n\n- To use fengari in a web browser as easily as you might use JavaScript, see [fengari-web](https://github.com/fengari-lua/fengari-web)\n- [fengari-interop](https://github.com/fengari-lua/fengari-interop) is a lua library that makes interoperating with JavaScript objects simple, it is already included in fengari-web.\n- For a clone of the `lua` command line tool, but running under node.js, see [fengari-node-cli](https://github.com/fengari-lua/fengari-node-cli)\n\n### The JS API\n\nOnce you've loaded fengari, you can use the JS API:\n\n```js\nconst luaconf  = fengari.luaconf;\nconst lua      = fengari.lua;\nconst lauxlib  = fengari.lauxlib;\nconst lualib   = fengari.lualib;\n\nconst L = lauxlib.luaL_newstate();\n\nlualib.luaL_openlibs(L);\n\nlua.lua_pushliteral(L, \"hello world!\");\n```\n\nThe JS API is exactly the same as the C API so `fengari.lua` exposes the same constants and functions as `lua.h`, `fengari.lauxlib` the same as `lauxlib.h` and `fengari.lualib` the same as `lualib.h`. If you're unfamiliar with the C API, you can take a look at [the manual](http://www.lua.org/manual/5.3/manual.html#4).\n\n\n## Semantics\n\nFengari implements Lua 5.3 semantics and will hopefully follow future Lua releases. If you find any noticeable difference between Fengari and Lua's behaviours, please [report it](https://github.com/fengari-lua/fengari/issues).\n\n### Strings\n\nLua strings are 8-bits clean and can embed `\\0`. Which means that invalid UTF-8/16 strings are valid Lua strings. Lua functions like `string.dump` even use strings as a way of storing binary data.\n\nTo address that issue, Fengari uses [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) objects containing the raw bytes to implement lua strings. To push a JS string on the stack you can use `lua_pushliteral` which will convert it to an array of bytes before pushing it. To get a Lua string on the stack as a JS string you can use `lua_tojsstring` which will attempt to convert it to a UTF-16 JS string. The latter won't give you what you expect if the Lua string is not a valid UTF-16 sequence. You can also convert strings with `luastring_of`, `to_luastring`, `to_jsstring` and `to_uristring`.\n\n\n### Integers\n\nThe JS number type is always a double, and hence cannot accurately represent integers with more than 53 bits. As such, we've taken the route of a rarely used define (`LUA_INT_TYPE=LUA_INT_LONG`) in the PUC-Rio sources, where floats are doubles, but integers are 32 bits.\n\n\n### `require` and `package.loadlib`\n\nIn the browser `require` and `package.loadlib` try to find a file by making synchronous XHR requests.\n\n`require` has been extended to allow searchers to yield.\n\n\n### _Missing_ features\n\n- `lua_gc`/`collectgarbage`: Fengari relies on the JS garbage collector and does not implement its own.\n- The following functions are only available in Node:\n    - The entire `io` lib\n    - `os.remove`\n    - `os.rename`\n    - `os.tmpname`\n    - `os.execute`\n- `debug.debug()` doesn't work from web workers due to lack of a method to get synchronous user input\n- [Weak tables](http://www.lua.org/manual/5.3/manual.html#2.5.2)\n- `__gc` metamethods\n\n\n### _Differences_\n\n- `package.jspath` instead of `package.cpath`\n- `LUA_JSPATH_DEFAULT` instead of `LUA_CPATH_DEFAULT` (and contains .js extensions rather than .so or .dll extensions)\n- `lua_tointegerx` and `lua_tonumberx` do not have out-parameters indicating conversion success. Instead, ``false`` is returned when conversion fails.\n- `luaL_execresult` takes an extra argument: an error object. The error object should have fields `status`, `signal` and `errno`.\n- `luaL_fileresult` takes an extra argument: an error object. The error object should have a field `errno`.\n\n\n### Configuring\n\nSome luaconf options can be chosen at library load time. Fengari looks for `process.env.FENGARICONF` and if it exists, parses it as a JSON string.\n\n\n## Extensions\n\n### `dv = lua_todataview(L, idx)`\n\nEquivalent to `lua_tolstring` but returns a [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) instead of a string.\n\n\n### `lua_pushjsfunction(L, func)`\n\nAlias for `lua_pushcfunction`.\n\n\n### `lua_pushjsclosure(L, func, n)`\n\nAlias for `lua_pushcclosure`.\n\n\n### `lua_atnativeerror(L, func)`\n\nSets a function to be called if a native JavaScript error is thrown across a lua pcall.\nThe function will be run as if it were a message handler (see https://www.lua.org/manual/5.3/manual.html#2.3).\nThe current message handler will be run after the native error handler returns.\n\n\n### `b = lua_isproxy(p, L)`\n\nReturns a boolean `b` indicating whether `p` is a proxy (See `lua_toproxy`).\nIf `L` is non-null, only returns `true` if `p` belongs to the same global state.\n\n\n### `p = lua_toproxy(L, idx)`\n\nReturns a JavaScript object `p` that holds a reference to the lua value at the stack index `idx`.\nThis object can be called with a lua_State to push the value onto that state's stack.\n\nThis example would be an inefficient way to write `lua_pushvalue(L, 1)`:\n\n```js\nvar p = lua_toproxy(L, 1);\np(L);\n```\n\n\n### `fengari` library\n\nA library containing metadata about the fengari release.\n\n  - `AUTHORS`\n  - `COPYRIGHT`\n  - `RELEASE`\n  - `VERSION`\n  - `VERSION_MAJOR`\n  - `VERSION_MINOR`\n  - `VERSION_NUM`\n  - `VERSION_RELEASE`\n\nThis library is automatically loaded by `luaL_openlibs` into the global `\"fengari\"`.\n\n\n## NYI\n\n- `io.input()`: partially implemented\n- `io.lines()`\n- `io.open()`\n- `io.output()`: partially implemented\n- `io.popen()`\n- `io.read()`\n- `io.tmpfile()`\n- `file:lines()`\n- `file:read()`\n- `file:setvbuf()`\n- `file:__gc()`\n\n\n## References\n\n- [Source code for Lua 5.3](lua.org/source/5.3/)\n- [Lua 5.2 Bytecode and Virtual Machine](http://files.catwell.info/misc/mirror/lua-5.2-bytecode-vm-dirk-laurie/lua52vm.html)\n- [Lua 5.3 Bytecode Reference](http://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html)\n- [A No-Frills Introduction to Lua 5.1 VM Instructions](http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf)","users":{}}