I need to access the list of globally installed packages (those installed via npm install -g) so I need to obtain the global prefix.
I already know about npm config get prefix (see How to get the npm global path prefix) But, how can I code it on my node.js program?