The npm docs state that npm install by default installs both dependencies and devDependencies listed in your package.json. If you want to only install dependencies then use the --production flag.
When you install a package then the docs state
NOTE: The --production flag has no particular meaning when adding a dependency to a project.
My question is regarding the package your installing's dependencies. Does its devDependencies get installed?
What about when you install a package globally using npm install -g <package_name>?
This question discusses devDepedencies when installing your own dependencies from package.json, but not about what occurs when installing a specific package.