indutny/node-ip — pull request #6 by wanderview (2013-02-09 15:44:34+00:00)
Title: Add method to convert from prefixlen to netmask.

For example, in the common network notation `'192.168.1.0/24'` you can
create the netmask by passing the trailing `24` to `ip.fromPrefixLen()`.
This would generate the netmask `'255.255.255.0'`.

This is also useful for ipv6 where prefixlen is used more often than
the full netmask.

The protocol family is inferred from the prefixlen value or can be
specified in a second, optional argument.

Includes tests for ipv4 and ipv6.

(Sorry for not issuing this before you published a new version earlier today.)