Installation
npm install --save @types/netmask
Summary
This package contains type definitions for netmask (https://github.com/rs/node-netmask).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/netmask.
export function long2ip(long: number): string;
export function ip2long(ip: string): number;
export class Netmask {
base: string;
mask: string;
bitmask: number;
hostmask: string;
broadcast: string;
size: number;
first: string;
last: string;
maskLong: number;
netLong: number;
contains(address: string | Netmask | number): boolean;
forEach(cb: (ip: string, long: number, index: number) => void): void;
next(count?: number): Netmask;
toString(): string;
constructor(net: string, mask?: string | number);
}
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: none
Credits
These definitions were written by Matt Frantz, JanST123, and Junxiao Shi.