Reputation: 26192
Is there some way to get list of files there where required (with require("...")) by node process?
UPD, solution: module object itself contains links to all required children modules.
Upvotes: 1
Views: 72
Reputation: 362850
The loaded modules are stored in require.cache object. You should be able to check that to see whats been loaded with require().
http://nodejs.org/docs/latest/api/globals.html#require.cache
Upvotes: 1