Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/easyts/net/ip.ts>IPNet

js library written with ts, use select and chan like golang in js.
Latest
class IPNet
import { IPNet } from "https://deno.land/x/easyts@0.1.3/net/ip.ts";

An IPNet represents an IP network.

Constructors

new
IPNet(ip: IP, mask: IPMask)

Properties

readonly
network: string

returns the address's network name, "ip+net".

Methods

contains(ip: IP): boolean

reports whether the network includes ip.

toString(): string

returns the CIDR notation of n like "192.0.2.0/24" or "2001:db8::/48" as defined in RFC 4632 and RFC 4291.