Skip to content
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

Merged
merged 1 commit into from May 3, 2022
Merged

Conversation

wraithgar
Copy link
Member

No description provided.

@wraithgar wraithgar requested a review from a team as a code owner May 3, 2022 21:00
@wraithgar wraithgar mentioned this pull request May 3, 2022
2 tasks
with the exports object:

```bash
npm pkg get "exports[.].require"
Copy link
Collaborator

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?

Copy link
Member Author

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"

Copy link
Collaborator

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?

Copy link
Member Author

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:

Copy link
Collaborator

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!

@nlf nlf merged commit 5f59f80 into latest May 3, 2022
@nlf nlf deleted the gar/docs-pkg-complex branch May 3, 2022 23:55
@nlf nlf mentioned this pull request May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants