Node module for flattening dependency hierarchy
npm install -g npm-flatten
It's recommended you do a rm -rf node_modules and npm install --production for best results.
Navigate to the node_module you wish to flatten (for example npm).
Run npm ls to view dependency tree.
Run npm-flatten
Run npm ls again to see results.