Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Revert " Update docs for os.platform()"
This reverts commit a0070b5.
  • Loading branch information
mark hughes
mark hughes committed Dec 1, 2016
commit e7b4ffa2710c63fa93fb6e7e2238e68e23fe7aad
30 changes: 11 additions & 19 deletions doc/api/os.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,25 +293,17 @@ added: v0.5.0
* Returns: {String}

The `os.platform()` method returns a string identifying the operating system
platform as set during compile time of Node.js. Some of the possible values are
`"linux"`, `"darwin"`, `"win32"`, `"sunos"` ...

Its value is based on [`OS` constant of `gyp`](https://chromium.googlesource.com/external/gyp/+/md-pages/docs/InputFormatReference.md#Predefined-Variables)
, but with exceptions in case of Mac OS X, Windows and Solaris.

On Windows it's value is always `"win32"`, on Mac OS X it's `"darwin"` and on
Solaris it is `"sunos"`.

Here is a list of possible values for some platforms:

* Android: `"android"`
* Windows/Cygwin: `"win32"`
* Mac OS X: `"darwin"`
* FreeBSD: `"freebsd"`
* OpenBSD: `"openbsd"`
* IBM AIX: `"aix"`
* Solaris: `"sunos"`
* Linux & Others: `"linux"`
platform as set during compile time of Node.js.

Currently possible values are:

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

Equivalent to [`process.platform`][].

Expand Down