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

doc: add more details to process.env #4924

Merged
merged 1 commit into from
Jan 30, 2016
Merged

Conversation

evanlucas
Copy link
Contributor

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

/cc @cjihrig

@evanlucas evanlucas added the doc Issues and PRs related to the documentations. label Jan 28, 2016
@@ -424,6 +424,29 @@ process.env.foo = 'bar';
console.log(process.env.foo);
```

Assigning a property on `process.env` will implicitly call `toString()`
Copy link
Contributor

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"

@cjihrig
Copy link
Contributor

cjihrig commented Jan 28, 2016

LGTM

@mscdex mscdex added the process Issues and PRs related to the process subsystem. label Jan 28, 2016
@evanlucas evanlucas force-pushed the nullenv branch 2 times, most recently from 750d206 to d9d7aa9 Compare January 28, 2016 16:30
@evanlucas
Copy link
Contributor Author

Nits addressed

@cjihrig
Copy link
Contributor

cjihrig commented Jan 28, 2016

LGTM

Assigning a property on `process.env` will implicitly convert the value
to a string.

Example:
Copy link
Contributor

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 :?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@jasnell
Copy link
Member

jasnell commented Jan 29, 2016

LGTM.
lts watch label applied

@silverwind
Copy link
Contributor

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>
@evanlucas evanlucas closed this Jan 30, 2016
@evanlucas evanlucas deleted the nullenv branch January 30, 2016 04:09
@evanlucas evanlucas merged commit 8ff9b56 into nodejs:master Jan 30, 2016
@evanlucas
Copy link
Contributor Author

Landed in 8ff9b56. Thanks!

rvagg pushed a commit that referenced this pull request Feb 8, 2016
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>
MylesBorins pushed a commit that referenced this pull request Feb 17, 2016
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>
MylesBorins pushed a commit that referenced this pull request Feb 18, 2016
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>
@MylesBorins MylesBorins mentioned this pull request Feb 18, 2016
MylesBorins pushed a commit that referenced this pull request Mar 2, 2016
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>
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. process Issues and PRs related to the process subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants