Get an array of modules that a module is using/importing

Hello everyone,
I was wondering if there was a function that could allow me to inspect which modules a module is using. Does anyone know about it? I tried the propertynames and names functions, but they don’t seem to show all the used/imported modules.

It looks like there’s not a good public API for this. The REPL module has the following non-public function:

using REPL
REPL.moduleusings(YourModule)

Feel free to open an issue on github and we could think about making an official API for this.

Thank you for the answer. Is there also an analogous function to find imported modules too? They don’t appear to be shown with REPL.moduleusings.

No, I think you need to deduce that from names(..., imported=true).