diff options
author | Juan José Arboleda <soyjuanarbol@gmail.com> | 2020-02-11 10:38:24 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-03-09 14:44:16 +0300 |
commit | c1e672595f230d7e41ede5a96d778ada1c1e71ac (patch) | |
tree | 87d88e04804ccbc28818cd9c37981d9a308a80f2 /doc/api/os.md | |
parent | 0a539ddc0ad53c609199465dcb85008811e57bd2 (diff) |
src: create a getter for kernel version
PR-URL: https://github.com/nodejs/node/pull/31732
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/os.md')
-rw-r--r-- | doc/api/os.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/api/os.md b/doc/api/os.md index bb5bd612382..d8a75e8c1ee 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -389,6 +389,20 @@ operating system response. Throws a [`SystemError`][] if a user has no `username` or `homedir`. +## `os.version()` +<!-- YAML +added: REPLACEME +--> + +* Returns {string} + +Returns a string identifying the kernel version. + +On POSIX systems, the operating system release is determined by calling +[uname(3)][]. On Windows, `pRtlGetVersion` is used, and if it is not available, +`GetVersionExW()` will be used. See +https://en.wikipedia.org/wiki/Uname#Examples for more information. + ## OS Constants The following constants are exported by `os.constants`. |