0.0.2 • Published 6 years ago
lua4fe v0.0.2
Lua4FE
Install
npm install lua4feImport
const { LuaReader, LuaData } = require("lua4fe");Usage
for boring loading
⚠️Only works in mordern browser
const { LuaReader } = require("lua4fe");
const luap = new LuaReader();
luap.then((it) => {
it.watch("test", function (data) {
let result = data.toJSON();
console.log(result);
});
}).catch((err) => {
console.error(err)
console.log("not support 浏览器不支持");
});parse data
const { LuaData } = require('lua4fe');
var data = 'some lua table'
const _data = new LuaData(data)
_data.toJSON()toJSON()lua table to jsontoLua()javascript object to lua tabletoAST()AST jsontoCSV()lua table to csv