-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: show complex object interactions in npm pkg #4847
Conversation
e4ef186
to
9fd3699
Compare
with the exports object: | ||
|
||
```bash | ||
npm pkg get "exports[.].require" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"text indices" suggests like, 0, 1, 2, etc. is .
special?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No '.' is a valid ascii character hence "text"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right but "indices" are only numeric. if it's object properties then "properties" might be a better word?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds great to me, thanks!
9fd3699
to
378e3a5
Compare
No description provided.