We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 39c2f2e commit 9f818e8Copy full SHA for 9f818e8
1 file changed
docs/lib/content/commands/npm-view.md
@@ -70,6 +70,22 @@ If the field value you are querying for is a property of an object, you should r
70
npm view express time'[4.8.0]'
71
```
72
73
+Note: When accessing object properties that contain special characters or numeric keys, you need to use quotes around the key name.
74
+For example, to get the publish time of a specific version:
75
+
76
+```bash
77
+npm view express "time[4.17.1]"
78
+```
79
80
+Without quotes, the shell may interpret the square brackets as glob patterns, causing the command to fail.
81
+You can also access the time field for a specific version by specifying the version in the package descriptor:
82
83
84
+npm view express@4.17.1 time
85
86
87
+This will return all version-time pairs, but the context will be for that specific version.
88
89
Multiple fields may be specified, and will be printed one after another.
90
For example, to get all the contributor names and email addresses, you can do this:
91
0 commit comments