1.1.2 • Published 9 years ago

lua2json v1.1.2

Weekly downloads
4
License
MIT
Repository
-
Last release
9 years ago

lua2json

What is this?

With this module, you'll be able to convert LUA tables to JSON.

Install

Execute npm i lua2json in console

How to use

getVariable(filePath, variableName, callback)

Extract LUA table by it's variable name.

var lua2json = require('lua2json');

// Get specific variable from Lua file
lua2json.getVariable('./table.lua', 'VariableName', function(err, result) {
	console.log(err, result);
});

// Get specific variable from Lua file and ignore any unknown types and operators
lua2json.getVariable('./table.lua', 'VariableName', function(err, result) {
	console.log(err, result);
}, {
    ignoreUnknownOperators: true,
    ignoreUnknownTypes: true
});

License

lua2json is licensed under MIT License

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.0

9 years ago