view src/lib/Shared.luan @ 2:81c73ce6541c default tip

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 20 Sep 2022 20:19:52 -0600
parents bd2abcd7190a
children
line wrap: on
line source

local Luan = require "luan:Luan.luan"
local error = Luan.error
local type = Luan.type or error()


local Shared = {}

function Shared.to_list(input)
	if input == nil then
		return {}
	elseif type(input) == "table" then
		return input
	else
		return {input}
	end
end

return Shared