Socket
Socket
Sign inDemoInstall

luacodegen

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

luacodegen

Generate Lua Code from the an ast


Version published
Weekly downloads
1
decreased by-85.71%
Maintainers
1
Weekly downloads
 
Created
Source

luacodegen

luacodegen generates lua code from an ast. It is intended to be used with the tree produced by luaparse but this is not a hard requirement. The code generated is intended to have exactly the same ast as the initial input except with better formatting.

Example

const luaparse = require("luaparse");
const luacodegen = require("luacodegen");

const tree = luaparse.parse("local function a(b) if (b) then return 1 else return 2 end end");
const code = luacodegen(tree);
/*
local function a (b)
	if (b) then
		return 1;
	else
		return 2;
	end
end
*/

FAQs

Package last updated on 20 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc