mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
doc: Update docs for os.platform()
Specifies origin and includes a list of possible values PR-URL: https://github.com/joyent/node/pull/25777 Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
15030f26fd
commit
4a91fa11a3
1 file changed
+19
-1
+19
-1
@@ -24,7 +24,25 @@ Returns the operating system name.
|
||||
|
||||
## os.platform()
|
||||
|
||||
Returns the operating system platform.
|
||||
Returns the operating system platform. 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/+/HEAD/docs/InputFormatReference.md#Predefined-Variables)
|
||||
, but with exceptions in case of Mac OS X, Windows and Solaris.
|
||||
|
||||
On Windows its value is always `"win32"`, on Mac OS X its `"darwin"` and on
|
||||
Solaris its `"sunos"`.
|
||||
|
||||
Heres 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"`
|
||||
|
||||
## os.arch()
|
||||
|
||||
|
||||
Reference in new issue
Block a user