Differences From Artifact [3d397d42e6]:
- File common.lua — part of check-in [6f17de4767] at 2020-12-14 14:40:34 on branch trunk — more boilerplate, add template framework (user: lexi, size: 2864) [annotate] [blame] [check-ins using]
To Artifact [e762fc8997]:
- File common.lua — part of check-in [bbfea467bf] at 2020-12-27 02:31:30 on branch trunk — permissions work now (user: lexi, size: 2965) [annotate] [blame] [check-ins using]
94 94 has = function(haystack,needle,eq) 95 95 eq = eq or function(a,b) return a == b end 96 96 for k,v in pairs(haystack) do 97 97 if eq(needle,v) then return k end 98 98 end 99 + end; 100 + keys = function(ary) 101 + local kt = {} 102 + for k,v in pairs(ary) do kt[#kt+1] = k end 103 + return kt 99 104 end; 100 105 ingest = function(f) 101 106 local h = io.open(f, 'r') 102 107 if h == nil then return nil end 103 108 local txt = f:read('*a') f:close()