lua4fe

0.0.2 • Public • Published

Lua4FE

Install

npm install lua4fe

Import

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 json
  • toLua() javascript object to lua table
  • toAST() AST json
  • toCSV() lua table to csv

Readme

Keywords

none

Package Sidebar

Install

npm i lua4fe

Weekly Downloads

9

Version

0.0.2

License

MIT

Unpacked Size

3.5 kB

Total Files

3

Last publish

Collaborators

  • rx6