autosway 0.5.0

Automation program
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
local M = {}

M.hello = function ()
	return "World"
end

-- Parses `json` into JSON object, throws error on failure.
M.parse_json_ensure_table = function(json)
	local parsed = require("autosway.util").parse_json(json)

	if type(parsed) ~= "table" then
		error("Expected JSON result to be a table")
	end

	return parsed
end

return M