Skip to content

Commit f544610

Browse files
committed
chore: suggested changes
1 parent 168bc5c commit f544610

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
@@ -523,32 +523,13 @@ is invalid.
523523

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

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

553534
## OS constants
554535

lib/internal/util.js

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

868868
const handleTypes = ['TCP', 'TTY', 'UDP', 'FILE', 'PIPE', 'UNKNOWN'];
869-
handleTypes[-1] = 'INVALID';
869+
setOwnProperty(handleTypes, -1, 'INVALID');
870870

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

0 commit comments

Comments
 (0)