UNPKG

ip-utils

Version:

Library of useful functions related to IP

8 lines (7 loc) 264 B
import { fromLong } from './FromLong'; import { broadcastAddress } from './BroadcastAddress'; import { toLong } from './ToLong'; export function lastHost(subnet) { let broadcastLong = broadcastAddress(subnet); return fromLong(toLong(broadcastLong) - 1); }