mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
@@ -19,3 +19,4 @@ var buff:any = ip.toBuffer(myIP);
|
||||
ip.toString(buff);
|
||||
ip.subnet('192.168.1.134', '255.255.255.192');
|
||||
ip.cidrSubnet('192.168.1.134/26');
|
||||
ip.cidrSubnet('192.168.1.134/26').contains('192.168.1.134');
|
||||
|
||||
Vendored
+2
-1
@@ -14,6 +14,7 @@ interface SubnetInfo {
|
||||
subnetMaskLength: number;
|
||||
numHosts: number;
|
||||
length: number;
|
||||
contains(ip: string): boolean;
|
||||
}
|
||||
|
||||
declare module "ip" {
|
||||
@@ -112,4 +113,4 @@ declare module "ip" {
|
||||
* @param cidr CIDR address.
|
||||
*/
|
||||
export function cidrSubnet(cidr: string): SubnetInfo;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user