Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaƂ Kurowski <michalkurowskix@gmail.com>2022-09-22 03:51:46 +0300
committerGitHub <noreply@github.com>2022-09-22 03:51:46 +0300
commit2d756cbb05125dcb769f2ca4c1687e42568d5882 (patch)
tree842fb56ec3867d536024ccbcd99e91e472167582
parenta1ef180380f1b4f55cd3dfe468d23a658b114e6d (diff)
docs: add instruction to query objects with npm view (#5527)
* add instruction to query objects with npm view * fix package version in example command in npm-view docs
-rw-r--r--docs/content/commands/npm-view.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/content/commands/npm-view.md b/docs/content/commands/npm-view.md
index d9d1daac0..9e07619c2 100644
--- a/docs/content/commands/npm-view.md
+++ b/docs/content/commands/npm-view.md
@@ -72,6 +72,12 @@ contributor in the list, you can run:
npm view express contributors[0].email
```
+If the field value you are querying for is a property of an object, you should run:
+
+```bash
+npm view express time'[4.8.0]'
+```
+
Multiple fields may be specified, and will be printed one after another.
For example, to get all the contributor names and email addresses, you
can do this: