"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/socket.ts" between
socket.io-client-4.5.1.tar.gz and socket.io-client-4.5.2.tar.gz

About: Socket.IO client is a Javascript client library for the browser (or a Node.js client) that enables real-time communication with an Socket.IO server.

socket.ts  (socket.io-client-4.5.1):socket.ts  (socket.io-client-4.5.2)
skipping to change at line 171 skipping to change at line 171
* If the event is in `events`, it's emitted normally. * If the event is in `events`, it's emitted normally.
* *
* @return self * @return self
* @public * @public
*/ */
public emit<Ev extends EventNames<EmitEvents>>( public emit<Ev extends EventNames<EmitEvents>>(
ev: Ev, ev: Ev,
...args: EventParams<EmitEvents, Ev> ...args: EventParams<EmitEvents, Ev>
): this { ): this {
if (RESERVED_EVENTS.hasOwnProperty(ev)) { if (RESERVED_EVENTS.hasOwnProperty(ev)) {
throw new Error('"' + ev + '" is a reserved event name'); throw new Error('"' + ev.toString() + '" is a reserved event name');
} }
args.unshift(ev); args.unshift(ev);
const packet: any = { const packet: any = {
type: PacketType.EVENT, type: PacketType.EVENT,
data: args, data: args,
}; };
packet.options = {}; packet.options = {};
packet.options.compress = this.flags.compress !== false; packet.options.compress = this.flags.compress !== false;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)