Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Enhancing tree() #198

@vmx

Description

@vmx

Currently tree() is quite limited. @Gozala proposes at #191 (comment) a more flexible API:

I find tree to be a confusing name especially since it just returns paths. I think paths or list would have being far more clear.

I also kind of wish there was a way to traverse without following every branch .traverse(cid, path, {follow:path => boolean, order:path[] => path[] }) that way traverse(cid, path) is shallow, and .traverse(cid, path, {follow:Boolean}) is recursive, but it also provides an opportunity to avoid traversing irrelevant paths. As of order it can provide a way to choose traversal scheme e.g. depth-first could be as simple as returning path with most path components first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions