How can I detect all dependencies of a function in Node.js?

前端 未结 4 925
你的背包
你的背包 2021-02-01 07:19

I\'m trying to give a broad picture of my problem. I need to write a program with Node.js that should be able to detect all dependencies a function.

E.g.



        
4条回答
  •  时光取名叫无心
    2021-02-01 07:39

    You can use statistical profiler log (node --prof yourprogram, v8.log) to calculate 'statistical' call graph. Take a look at log processor source code here and here

提交回复
热议问题