create modules

A simple example

Method add with two arguments, returns sum

|
| modules
  | math.lua
modules/math.lua
local M = {}

local function add(a, b)
    return a + b
end

rawset(M, 'add', add)

return M

An example:

script.lua
local math = require('math')

local res = math.add(10, 20)

print(res) 

-- 30