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

Conversation

Projects
None yet
6 participants
@evanlucas
Copy link
Member

commented Jan 28, 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

/cc @cjihrig

@evanlucas evanlucas added the doc label Jan 28, 2016

@cjihrig

View changes

doc/api/process.markdown Outdated
@@ -424,6 +424,29 @@ process.env.foo = 'bar';
console.log(process.env.foo);
```

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

This comment has been minimized.

Copy link
@cjihrig

cjihrig Jan 28, 2016

Contributor

Maybe just say "implicitly convert the value to a string"

@cjihrig

View changes

doc/api/process.markdown Outdated
```js
process.env.TEST = 1;
delete process.env.TEST;
```

This comment has been minimized.

Copy link
@cjihrig

cjihrig Jan 28, 2016

Contributor

Maybe add a console.log() like in your previous examples.

@cjihrig

This comment has been minimized.

Copy link
Contributor

commented Jan 28, 2016

LGTM

@mscdex mscdex added the process label Jan 28, 2016

@evanlucas evanlucas force-pushed the evanlucas:nullenv branch 2 times, most recently Jan 28, 2016

@evanlucas

This comment has been minimized.

Copy link
Member Author

commented Jan 28, 2016

Nits addressed

@cjihrig

This comment has been minimized.

Copy link
Contributor

commented Jan 28, 2016

LGTM

@evanlucas evanlucas force-pushed the evanlucas:nullenv branch Jan 28, 2016

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

Example:

This comment has been minimized.

Copy link
@silverwind

silverwind Jan 28, 2016

Contributor

Maybe scrap that Example: and end the sentence above in a :?

This comment has been minimized.

Copy link
@evanlucas

evanlucas Jan 29, 2016

Author Member

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.

This comment has been minimized.

Copy link
@silverwind

silverwind Jan 29, 2016

Contributor

Yeah, there's a few example markers already in that file, so I guess it's fine.


Use `delete` to delete a property from `process.env`.

Example:

This comment has been minimized.

Copy link
@silverwind

silverwind Jan 28, 2016

Contributor

Same here.

@jasnell

This comment has been minimized.

Copy link
Member

commented Jan 29, 2016

LGTM.
lts watch label applied

@silverwind

This comment has been minimized.

Copy link
Contributor

commented Jan 29, 2016

LGTM

@evanlucas evanlucas force-pushed the evanlucas:nullenv branch Jan 30, 2016

doc: add more details to process.env
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>

@evanlucas evanlucas force-pushed the evanlucas:nullenv branch to 8ff9b56 Jan 30, 2016

@evanlucas evanlucas closed this Jan 30, 2016

@evanlucas evanlucas deleted the evanlucas:nullenv branch Jan 30, 2016

@evanlucas evanlucas merged commit 8ff9b56 into nodejs:master Jan 30, 2016

@evanlucas

This comment has been minimized.

Copy link
Member Author

commented Jan 30, 2016

Landed in 8ff9b56. Thanks!

rvagg added a commit that referenced this pull request Feb 8, 2016

doc: add more details to process.env
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 added a commit that referenced this pull request Feb 17, 2016

doc: add more details to process.env
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 added a commit that referenced this pull request Feb 18, 2016

doc: add more details to process.env
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 referenced this pull request Feb 18, 2016

Merged

V4.4.0 proposal #5301

MylesBorins added a commit that referenced this pull request Mar 2, 2016

doc: add more details to process.env
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

doc: add more details to process.env
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
You can’t perform that action at this time.