npm: List globally installed packages

Run npm ls -g --depth=0.

Yup:

# -g = --global
npm ls -g --depth=0

# +-- npm@6.14.10
# +-- pnpm@5.2.6
# +-- rimraf@3.0.2
# +-- serve@11.3.2
# `-- sort-package-json@1.48.0

Nope:

npm ls -g

# +-- npm@6.14.10
# | +-- abbrev@1.1.1
# | +-- ansicolors@0.3.2
# | +-- ansistyles@0.1.3
# | +-- aproba@2.0.0
# | +-- archy@1.0.0
# | +-- bin-links@1.1.8
# | | +-- bluebird@3.5.5 deduped
# | | +-- cmd-shim@3.0.3 deduped
# ...