Table Utilities Module - Helpful on debug

Hey, Devs!!
I’ve made a module to facilitate debug related to tables. Basically, it takes a table and turns it into a string.
It also converts folders with boolValues, IntValues ​​and StringValues ​​to tables.

Brief API:

TableToString( [table] ) - Returns a string

Example

image

FolderToTable( [folder] ) - Returns a table named with folders ValuesName and values

Example using Table to String to print on output

image
TO

image

TableUtilities.lua (2.8 KB)

7 Likes

thats nice, but thats already created

but good job

3 Likes

I am happy and sad at the same time.
Happy because I managed to do something like that and to receive praise like yours. And sad that I wasn’t the first.

2 Likes

you should refrain from posting duplicates.

1 Like

Regarding this, in particular, I do not consider it a duplicate. Since mine has other features built into the module.
However, I will be more cautious when posting. ^^

1 Like

May you elaborate what other feature

This is explained in the post. The script has a function that turns folders whose children are Values ​​(bool, int and string) into tables

1 Like

I would not say a single fairly common function that converts a folder to a table is sufficient enough to be classed as a full resource

I specified that they are useful for handling tables. It’s not a script to change the programming world, lol

1 Like

If you take a look at the source code, which OP linked, there are more functions than just that other one (TableToFolder, FolderToTable, and TableToString) and this can hardly be called a duplicate.

While the other one is perhaps better at converting things such as a metatables (which I do not believe this one has support for), these has different features that are just as useful in other scenarios that avozzo’s does not support (ex: folder to table and table to folder). This is probably best for simple tables, converting folder hierarchies into tables, dealing with instance values, etc. while the other is probably best for tables containing functions and more niche/specialized behavior.

Even if something is a the same idea as something else, the contribution is useful. As long as the methodology isn’t identical, it’s still a valuable contribution and resource - especially given that community resources double as practical resources and learning resources for people to view existing and working code. Who knows, the second iteration of something may prove to be more efficient in all cases, some cases, etc. that can ultimately push things to be better and more creative.

Edit: @avozzo summarizes it really nicely below as well.

2 Likes

I’m unsure why people are linking my source here; the two are two different resources (even though they may share some similarities), and this is clearly visible from the functions this provides.
My module is meant to be a light-weight universal table-to-string conversion module, while this is totally different and can convert instances to tables and back.

I’m afraid I can’t even see where this would come from…

This is a good resource and I don’t see anything wrong with this; thank you for the contribution, @gutoggg.

3 Likes

what advantages does this have over repr by ozzypig?