From 39471ad9c2838373b85c6155ee12c648c876c6a9 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 25 Feb 2023 12:06:51 -0500 Subject: [PATCH] *Create on/off event handler aliases --- src/socket.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/socket.ts b/src/socket.ts index 589f30a..99cbe89 100644 --- a/src/socket.ts +++ b/src/socket.ts @@ -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)) {