From 7cb1a69b2a1a9a46565ba06f94ac1ea3906d6360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kurowski?= Date: Sat, 17 Sep 2022 02:07:20 +0200 Subject: [PATCH 1/2] add instruction to query objects with npm view --- docs/content/commands/npm-view.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/content/commands/npm-view.md b/docs/content/commands/npm-view.md index d9d1daac0cda7..60b879f3539b4 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'[14.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: From 4445aecc28aa387b59398bdd8936a86744e56c92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kurowski?= Date: Thu, 22 Sep 2022 01:14:02 +0200 Subject: [PATCH 2/2] fix package version in example command in npm-view docs --- docs/content/commands/npm-view.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/commands/npm-view.md b/docs/content/commands/npm-view.md index 60b879f3539b4..9e07619c204cf 100644 --- a/docs/content/commands/npm-view.md +++ b/docs/content/commands/npm-view.md @@ -75,7 +75,7 @@ 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'[14.8.0]' +npm view express time'[4.8.0]' ``` Multiple fields may be specified, and will be printed one after another.