diff --git a/node_modules/ws/lib/event-target.js b/node_modules/ws/lib/event-target.js index d38e1f2..a6fbe72 100644 --- a/node_modules/ws/lib/event-target.js +++ b/node_modules/ws/lib/event-target.js @@ -10,7 +10,8 @@ class Event { * Create a new `Event`. * * @param {String} type The name of the event - * @param {Object} target A reference to the target to which the event was dispatched + * @param {Object} target A reference to the target to which the event was + * dispatched */ constructor(type, target) { this.target = target; @@ -29,7 +30,8 @@ class MessageEvent extends Event { * Create a new `MessageEvent`. * * @param {(String|Buffer|ArrayBuffer|Buffer[])} data The received data - * @param {WebSocket} target A reference to the target to which the event was dispatched + * @param {WebSocket} target A reference to the target to which the event was + * dispatched */ constructor(data, target) { super('message', target); @@ -48,9 +50,12 @@ class CloseEvent extends Event { /** * Create a new `CloseEvent`. * - * @param {Number} code The status code explaining why the connection is being closed - * @param {String} reason A human-readable string explaining why the connection is closing - * @param {WebSocket} target A reference to the target to which the event was dispatched + * @param {Number} code The status code explaining why the connection is being + * closed + * @param {String} reason A human-readable string explaining why the + * connection is closing + * @param {WebSocket} target A reference to the target to which the event was + * dispatched */ constructor(code, reason, target) { super('close', target); @@ -71,7 +76,8 @@ class OpenEvent extends Event { /** * Create a new `OpenEvent`. * - * @param {WebSocket} target A reference to the target to which the event was dispatched + * @param {WebSocket} target A reference to the target to which the event was + * dispatched */ constructor(target) { super('open', target); @@ -89,7 +95,8 @@ class ErrorEvent extends Event { * Create a new `ErrorEvent`. * * @param {Object} error The error that generated this event - * @param {WebSocket} target A reference to the target to which the event was dispatched + * @param {WebSocket} target A reference to the target to which the event was + * dispatched */ constructor(error, target) { super('error', target); @@ -111,11 +118,11 @@ const EventTarget = { * * @param {String} type A string representing the event type to listen for * @param {Function} listener The listener to add - * @param {Object} options An options object specifies characteristics about + * @param {Object} [options] An options object specifies characteristics about * the event listener - * @param {Boolean} options.once A `Boolean`` indicating that the listener - * should be invoked at most once after being added. If `true`, the - * listener would be automatically removed when invoked. + * @param {Boolean} [options.once=false] A `Boolean`` indicating that the + * listener should be invoked at most once after being added. If `true`, + * the listener would be automatically removed when invoked. * @public */ addEventListener(type, listener, options) {