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
Next Next commit
doc: include undefined in os.cpus() return values
Document that `os.cpus()` can return `undefined` if information about
cores is not available. This can happen particularly on unsupported
platforms like Android.

Fixes: #19022
  • Loading branch information
Trott committed Nov 17, 2018
commit e802ae32421f40c7d6434445fa81bb682e69975c
6 changes: 3 additions & 3 deletions doc/api/os.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ defined are described in [OS Constants](#os_os_constants_1).
added: v0.3.3
-->

* Returns: {Object[]}
* Returns: {Object[]|undefined}

The `os.cpus()` method returns an array of objects containing information about
each logical CPU core.
Returns an array of objects containing information about each logical CPU core.
If the information is not available, `os.cpus()` will return `undefined`.

The properties included on each object include:

Expand Down