Compare commits

...

2 Commits

Author SHA1 Message Date
Derrick Hammer c90e022795
*Update dist 2023-02-25 12:07:21 -05:00
Derrick Hammer 39471ad9c2
*Create on/off event handler aliases 2023-02-25 12:06:51 -05:00
3 changed files with 6 additions and 0 deletions

2
dist/socket.d.ts vendored
View File

@ -31,7 +31,9 @@ export default class Socket extends Duplex {
family: AddressFamily;
};
addEventListener: <TEvent extends "data" | "end" | "finish" | "pipe" | "readable" | "drain" | keyof import("streamx").StreamEvents | "piping">(event: TEvent, listener: TEvent extends "data" | "end" | "finish" | "pipe" | "readable" | "drain" | keyof import("streamx").StreamEvents | "piping" ? DuplexEvents<any, any>[TEvent] : (...args: any[]) => void) => this;
on: <TEvent extends "data" | "end" | "finish" | "pipe" | "readable" | "drain" | keyof import("streamx").StreamEvents | "piping">(event: TEvent, listener: TEvent extends "data" | "end" | "finish" | "pipe" | "readable" | "drain" | keyof import("streamx").StreamEvents | "piping" ? DuplexEvents<any, any>[TEvent] : (...args: any[]) => void) => this;
removeEventListener: <TEvent extends "data" | "end" | "finish" | "pipe" | "readable" | "drain" | keyof import("streamx").StreamEvents | "piping">(event: TEvent, listener: TEvent extends "data" | "end" | "finish" | "pipe" | "readable" | "drain" | keyof import("streamx").StreamEvents | "piping" ? DuplexEvents<any, any>[TEvent] : (...args: any[]) => void) => this;
off: <TEvent extends "data" | "end" | "finish" | "pipe" | "readable" | "drain" | keyof import("streamx").StreamEvents | "piping">(event: TEvent, listener: TEvent extends "data" | "end" | "finish" | "pipe" | "readable" | "drain" | keyof import("streamx").StreamEvents | "piping" ? DuplexEvents<any, any>[TEvent] : (...args: any[]) => void) => this;
static isIP(input: string): number;
static isIPv4(input: string): boolean;
static isIPv6(input: string): boolean;

2
dist/socket.js vendored
View File

@ -65,7 +65,9 @@ class Socket extends streamx_1.Duplex {
};
}
addEventListener = this.addListener;
on = this.addListener;
removeEventListener = this.removeListener;
off = this.removeListener;
static isIP(input) {
if (Socket.isIPv4(input)) {
return 4;

View File

@ -98,7 +98,9 @@ export default class Socket extends Duplex {
}
addEventListener = this.addListener;
on = this.addListener;
removeEventListener = this.removeListener;
off = this.removeListener;
static isIP(input: string): number {
if (Socket.isIPv4(input)) {