Closed dennwc closed 5 years ago
@bzz Friendly ping.
Merging, since it hits the review deadline of one week. @bzz let me know if you have any comments on this one.
Sorry for somehow letting it slip - this is a great improvement! I was just thinking what would it take to surface it in all the clients..
This issue came up multiple times recently. Some client functions want to list all children nodes exactly one level deep. This code is not a one-liner since it requires the user to check the type of the node and indirect, if necessary. It also requires to flatten arrays for object fields.
Thus, it seems we need to add some helper to expose this functionality to clients. The best way, in my opinion, is to make a new iteration order.
This PR adds a new
Children
iteration order that does all required checks and indirections.Also, while here, add documentation for types and methods in the package.
Signed-off-by: Denys Smirnov denys@sourced.tech
This change is