Skip to content

Commit

Permalink
doc: improve process.platform
Browse files Browse the repository at this point in the history
PR-URL: #18057
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
marswong authored and BridgeAR committed Jan 19, 2018
1 parent 3815f0c commit 36b13eb
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -1439,13 +1439,26 @@ added: v0.1.16
* {string}

The `process.platform` property returns a string identifying the operating
system platform on which the Node.js process is running. For instance
`'darwin'`, `'freebsd'`, `'linux'`, `'sunos'` or `'win32'`
system platform on which the Node.js process is running.

Currently possible values are:

* `'aix'`
* `'darwin'`
* `'freebsd'`
* `'linux'`
* `'openbsd'`
* `'sunos'`
* `'win32'`

```js
console.log(`This platform is ${process.platform}`);
```

The value `'android'` may also be returned if the Node.js is built on the
Android operating system. However, Android support in Node.js
[is experimental][Supported platforms].

## process.ppid
<!-- YAML
added: v9.2.0
Expand Down Expand Up @@ -2017,5 +2030,6 @@ cases:
[Readable]: stream.html#stream_readable_streams
[Signal Events]: #process_signal_events
[Stream compatibility]: stream.html#stream_compatibility_with_older_node_js_versions
[Supported platforms]: https://github.com/nodejs/node/blob/master/BUILDING.md#supported-platforms-1

This comment has been minimized.

Copy link
@richardlau

richardlau Jan 20, 2018

Member

So this link is correct for master but if this commit is backported it will need to be updated to point to the relevant release branch.
Cc @nodejs/release @nodejs/lts

[TTY]: tty.html#tty_tty
[Writable]: stream.html#stream_writable_streams

0 comments on commit 36b13eb

Please sign in to comment.