Open imerkle opened 7 years ago
Nice! Thanks, we should get this published as an extension and I'll link to it on the README! Thanks for jumping in and helping out.
Note: it is important to understand that arrays have different concurrency implications that are not preserved with gun or this (which is why gun errors, I don't want to mislead users about how their data is being stored), but as you have just done, it is easy to approximate - but I just want to provide ample/sufficient warning about behavior.
If you need more strongly guaranteed arrays, I recommend using a linked list to preserve ordering. Or using .set
if you need table / collection like behavior. However this is perfect for finite arrays that have fixed indices. And many people will find it refreshing to use!
This cannot handle circular graph
I was trying to use Arrays as data for Gun. Since they dont support arrays i made a simple function to convert it.
https://gist.github.com/dsslimshaddy/9ea160838c844473a5f3736d50d1fb19
If there is any other way to do the following please recommend.