mihneadb / node-directory-tree

Convert a directory tree to a JS object.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

onEachDirectory callbacks only top level directory

hados99 opened this issue · comments

Hi, really thanks for good library.

When testing onEachDirectory callback, it only returns top level directory.
I tested on nodejs v10, directory-tree v2.2.0, installed via npm.

I think onEachDirectory callback parameter is missing when calling directoryTree recursively.

.map(child => directoryTree(PATH.join(path, child), options, onEachFile))

Hi, good find! Feel free to submit a PR :).