Skip to content

Commit b88d406

Browse files
committed
chore: suggested changes
1 parent 3347e36 commit b88d406

File tree

2 files changed

+8
-27
lines changed

2 files changed

+8
-27
lines changed

doc/api/os.md

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -524,32 +524,13 @@ is invalid.
524524

525525
Currently, the following types for a handle can be returned:
526526

527-
<table>
528-
<tr>
529-
<th>Constant</th>
530-
</tr>
531-
<tr>
532-
<td><code>TCP</code></td>
533-
</tr>
534-
<tr>
535-
<td><code>TTY</code></td>
536-
</tr>
537-
<tr>
538-
<td><code>UDP</code></td>
539-
</tr>
540-
<tr>
541-
<td><code>FILE</code></td>
542-
</tr>
543-
<tr>
544-
<td><code>PIPE</code></td>
545-
</tr>
546-
<tr>
547-
<td><code>UNKNOWN</code></td>
548-
</tr>
549-
<tr>
550-
<td><code>INVALID</code></td>
551-
</tr>
552-
</table>
527+
* `'TCP'`
528+
* `'TTY'`
529+
* `'UDP'`
530+
* `'FILE'`
531+
* `'PIPE'`
532+
* `'UNKNOWN'`
533+
* `'INVALID'`
553534

554535
## OS constants
555536

lib/internal/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ function getCIDR(address, netmask, family) {
865865
}
866866

867867
const handleTypes = ['TCP', 'TTY', 'UDP', 'FILE', 'PIPE', 'UNKNOWN'];
868-
handleTypes[-1] = 'INVALID';
868+
setOwnProperty(handleTypes, -1, 'INVALID');
869869

870870
function guessHandleType(fd) {
871871
if (!NumberIsInteger(fd)) {

0 commit comments

Comments
 (0)