-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.osIssues and PRs related to the os subsystem.Issues and PRs related to the os subsystem.
Description
os.networkInterfaces
currently returns IP addresses and netmasks in the old-fashioned format of separate address and netmask:
{ address: '127.0.0.1',
netmask: '255.0.0.0' }
{ address: '2001:db8::',
netmask: 'ffff:ffff:ffff:ffff::' }
It's very uncommon to specify a IPv6 subnet mask like above. I think it'd generally be easier for users to work with these addresses if they were also available in CIDR form, maybe via a new cidr
property, e.g. '127.0.0.1/8'
and '2001:db8::/64'
.
sindresorhus
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.osIssues and PRs related to the os subsystem.Issues and PRs related to the os subsystem.