Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function jv_inspect(p, max)
- local max=max or false
- if p==nil then print("nil", "\n") return end
- if type(p)=="userdata" then p=getmetatable(p).__index end
- if type(p)=="table" then
- local n=0
- for k,v in pairs(p) do
- n=n+1
- print(k)
- if(n==max and max) then break end
- end
- print("Keys found:", n)
- else
- print(type(p), p)
- end
- print("\n")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement