doc: improve process.platform

PR-URL: https://github.com/nodejs/node/pull/18057
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Mars Wong authored and Myles Borins committed 2018-02-27 01:03:44 -05:00
1 parent 4c89666bdc
commit bda8355530
1 file changed
+16 -2
+16 -2
View File
@@ -1376,13 +1376,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: REPLACEME
@@ -1919,5 +1932,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
[TTY]: tty.html#tty_tty
[Writable]: stream.html#stream_writable_streams