1 .TH "NPM\-VIEW" "1" "October 2016" "" ""
3 \fBnpm-view\fR \- View registry info
8 npm view [@<scope>/]<name>[@<version>] [<field>[\.<subfield>]\.\.\.]
9 npm v [@<scope>/]<name>[@<version>] [<field>[\.<subfield>]\.\.\.]
14 This command shows data about a package and prints it to the stream
15 referenced by the \fBoutfd\fP config, which defaults to stdout\.
17 To show the package registry entry for the \fBconnect\fP package, you can do
26 The default version is "latest" if unspecified\.
28 Field names can be specified after the package descriptor\.
29 For example, to show the dependencies of the \fBronn\fP package at version
30 0\.3\.5, you could do the following:
34 npm view ronn@0\.3\.5 dependencies
38 You can view child fields by separating them with a period\.
39 To view the git repository URL for the latest version of npm, you could
44 npm view npm repository\.url
48 This makes it easy to view information about a dependency with a bit of
49 shell scripting\. For example, to view all the data about the version of
50 opts that ronn depends on, you can do this:
54 npm view opts@$(npm view ronn dependencies\.opts)
58 For fields that are arrays, requesting a non\-numeric field will return
59 all of the values from the objects in the list\. For example, to get all
60 the contributor names for the "express" project, you can do this:
64 npm view express contributors\.email
68 You may also use numeric indices in square braces to specifically select
69 an item in an array field\. To just get the email address of the first
70 contributor in the list, you can do this:
74 npm view express contributors[0]\.email
78 Multiple fields may be specified, and will be printed one after another\.
79 For exampls, to get all the contributor names and email addresses, you
84 npm view express contributors\.name contributors\.email
88 "Person" fields are shown as a string if they would be shown as an
89 object\. So, for example, this will show the list of npm contributors in
90 the shortened string format\. (See npm help 5 \fBpackage\.json\fP for more on this\.)
94 npm view npm contributors
98 If a version range is provided, then data will be printed for every
99 matching version of the package\. This will show which version of jsdom
100 was required by each matching version of yui3:
104 npm view yui3@'>0\.5\.4' dependencies\.jsdom
108 To show the \fBconnect\fP package version history, you can do
113 npm view connect versions
118 If only a single string field for a single version is output, then it
119 will not be colorized or quoted, so as to enable piping the output to
120 another command\. If the field is an object, it will be output as a JavaScript object literal\.
122 If the \-\-json flag is given, the outputted fields will be JSON\.
124 If the version range matches multiple versions, than each printed value
125 will be prefixed with the version it applies to\.
127 If multiple fields are requested, than each of them are prefixed with