Skip to content

Commit

Permalink
docs: show complex object interactions in npm pkg (#4847)
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar authored May 3, 2022
1 parent 8fd7eec commit 5f59f80
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/content/commands/npm-pkg.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ Returned values are always in **json** format.
npm pkg get contributors[0].email
```
For complex fields you can also name a property in square brackets
to specifically select a child field. This is especially helpful
with the exports object:
```bash
npm pkg get "exports[.].require"
```
* `npm pkg set <field>=<value>`
Sets a `value` in your `package.json` based on the `field` value. When
Expand Down

0 comments on commit 5f59f80

Please # to comment.