Home

Awesome

lua-events

Node style events for Lua

Usage

1. Install

Setup lua-loader and then just npm install lua-events

2. Require

local EventEmitter = require("lua-events").EventEmitter

3. Have fun

local myObj = EventEmitter:new({text = "Hello, world!"})
function myObj:talk ()
  self:emit("spoken", self:text)
end
myObj:on("spoken", function (text)
  print("myObj said", text)
end)
myObj:talk()

Limitations

History

License

GNU Lesser General Public License (LGPL)