Type Parameters
- Type extends 4 | 6 = 4 | 6
Constructors
constructor
- new IPAddress<Type>(ip, type?): IPAddress<Type>
Type Parameters
- Type extends 4 | 6 = 4 | 6
Parameters
- ip: string | number | bigint | Uint8Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | IPAddress<4 | 6>
Optional
type: Type
Properties
Readonly
rawData
rawData: Type extends 4 ? Type<Type> extends 6 ? Uint8Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> : Uint8Array<ArrayBufferLike> : Uint16Array<ArrayBufferLike> Methods
Protected
[inspectSymbol]
- [inspectSymbol](): string
Returns string
hex
- hex(): string
Returns string
int
- int(): Type extends 4
? Type<Type> extends 6
? number | bigint
: number
: bigint Returns Type extends 4
? Type<Type> extends 6
? number | bigint
: number
: bigint
long
- long(): string
Returns string
reverse
- reverse(): string
Returns string
short
- short(): string
Returns string
Protected
toString
- toString(): string
Returns string
usual
- usual(): string
Returns string
A Respresentation of an IP Address
Example
Since
1.7.0
Supports
nodejs, browser