-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
doc: add more details to process.env #4924
Conversation
@@ -424,6 +424,29 @@ process.env.foo = 'bar'; | |||
console.log(process.env.foo); | |||
``` | |||
|
|||
Assigning a property on `process.env` will implicitly call `toString()` |
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.
Maybe just say "implicitly convert the value to a string"
LGTM |
750d206
to
d9d7aa9
Compare
Nits addressed |
LGTM |
Assigning a property on `process.env` will implicitly convert the value | ||
to a string. | ||
|
||
Example: |
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.
Maybe scrap that Example:
and end the sentence above in a :
?
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.
I'm personally a fan of explicitly marking it as an example, but either way. It seems to be split pretty evenly in that file.
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.
Yeah, there's a few example markers already in that file, so I guess it's fine.
LGTM. |
LGTM |
process.env has a few quirks that deserve documenting. The commit documents: - How assigning to process.env will implicitly call `toString()` - How to remove an environment variable from process.env PR-URL: nodejs#4924 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Landed in 8ff9b56. Thanks! |
process.env has a few quirks that deserve documenting. The commit documents: - How assigning to process.env will implicitly call `toString()` - How to remove an environment variable from process.env PR-URL: #4924 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
process.env has a few quirks that deserve documenting. The commit documents: - How assigning to process.env will implicitly call `toString()` - How to remove an environment variable from process.env PR-URL: #4924 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
process.env has a few quirks that deserve documenting. The commit documents: - How assigning to process.env will implicitly call `toString()` - How to remove an environment variable from process.env PR-URL: #4924 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
process.env has a few quirks that deserve documenting. The commit documents: - How assigning to process.env will implicitly call `toString()` - How to remove an environment variable from process.env PR-URL: #4924 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
process.env has a few quirks that deserve documenting. The commit documents: - How assigning to process.env will implicitly call `toString()` - How to remove an environment variable from process.env PR-URL: nodejs#4924 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
process.env has a few quirks that deserve documenting.
The commit documents:
toString()
/cc @cjihrig