Mercurial Hosting > shareasale
annotate src/lib/Shared.luan @ 2:81c73ce6541c default tip
minor
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Tue, 20 Sep 2022 20:19:52 -0600 (2022-09-21) |
| parents | bd2abcd7190a |
| children |
| rev | line source |
|---|---|
| 1 | 1 local Luan = require "luan:Luan.luan" |
| 2 local error = Luan.error | |
| 3 local type = Luan.type or error() | |
| 4 | |
| 5 | |
| 6 local Shared = {} | |
| 7 | |
| 8 function Shared.to_list(input) | |
| 9 if input == nil then | |
| 10 return {} | |
| 11 elseif type(input) == "table" then | |
| 12 return input | |
| 13 else | |
| 14 return {input} | |
| 15 end | |
| 16 end | |
| 17 | |
| 18 return Shared |
