解释 npm list [[@<scope>/]<pkg> ...] 的选项

Explain the options for npm list [[@<scope>/]<pkg> ...]

请使用几个示例解释以下命令中提到的 scope 的选项:

npm list [[@<scope>/]<pkg> ...]

docs for this command没有提供直接的解释。

这里描述得很好: Scoped Packages.

范围基本上有助于将类似的 npm 包分组在一起。每个作用域都有一个目录,其中作用域的名称在 node_modules 下,包在其中。

在您的示例中,如果给定范围,它会列出该特定范围下的包,即 node_modules/<@scope>/.