dependents / node-dependency-tree

Get the dependency tree of a module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support a filter function that determine whether or not to include a file in the tree

mrjoelkemp opened this issue · comments

Filter is a function that accepts an object containing a few properties of the given file and returns a boolean indicating whether or not to include the file in the tree generation.

  • filepath (all for now but prevents a breaking change in the future)

  • Allows us to solve #37 by omitting files that contain node_modules in their path
  • Allows us to implement dependents/Dependents#224 by parsing the file, sniffing if it's a React component, then returning true/false.