parent
14bbbdc78f
commit
afb50da598
@ -0,0 +1,26 @@ |
|||||||
|
Copyright (c) 2011, Enrique García Cota |
||||||
|
All rights reserved. |
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification, |
||||||
|
are permitted provided that the following conditions are met: |
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice, |
||||||
|
this list of conditions and the following disclaimer. |
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice, |
||||||
|
this list of conditions and the following disclaimer in the documentation |
||||||
|
and/or other materials provided with the distribution. |
||||||
|
3. Neither the name of MiddleClass nor the names of its contributors |
||||||
|
may be used to endorse or promote products derived from this software |
||||||
|
without specific prior written permission. |
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
||||||
|
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
||||||
|
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
||||||
|
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
||||||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
||||||
|
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
||||||
|
OF THE POSSIBILITY OF SUCH DAMAGE. |
||||||
|
|
@ -0,0 +1,36 @@ |
|||||||
|
h1. inspect.lua |
||||||
|
|
||||||
|
This function transform any Lua table into a human-readable representation of that table. |
||||||
|
|
||||||
|
The objective here is human understanding (i.e. for debugging), not serialization or compactness. |
||||||
|
|
||||||
|
h1. Examples of use |
||||||
|
|
||||||
|
|
||||||
|
h1. Gotchas / Warnings |
||||||
|
|
||||||
|
|
||||||
|
h1. Installation |
||||||
|
|
||||||
|
Just copy the inspect.lua file somewhere in your projects (maybe inside a /lib/ folder) and require it accordingly. |
||||||
|
|
||||||
|
Remember to store the value returned by require somewhere! (I suggest a local variable named inspect, altough others might like table.inspect) |
||||||
|
|
||||||
|
<pre> |
||||||
|
local inspect = require 'inspect' |
||||||
|
-- or -- |
||||||
|
table.inspect = require 'inspect' |
||||||
|
</pre> |
||||||
|
|
||||||
|
Also, make sure to read the license file; the text of that license file must appear somewhere in your projects' files. |
||||||
|
|
||||||
|
h1. Specs |
||||||
|
|
||||||
|
This project uses "telescope":https://github.com/norman/telescope for its specs. If you want to run the specs, you will have to install telescope first. Then just enter the spec folder and execute run.lua: |
||||||
|
|
||||||
|
<pre> |
||||||
|
cd path/to/inspect.lua/specs |
||||||
|
lua run.lua |
||||||
|
</pre> |
||||||
|
|
||||||
|
|
Loading…
Reference in new issue