Closed brunnre8 closed 6 months ago
The comment falsely indicates that malformed IRC messages would be null.
However, since the switch to a proper parser the function always returns an IrcMessage object, no matter how broken the input is.
const parser = require('./src/irclineparser'); console.log(parser('\0')); // IrcMessage { // tags: [Object: null prototype] {}, // prefix: '', // nick: '', // ident: '', // hostname: '', // command: '\x00', // params: [] // }
Hence, remove the comment to avoid misleading readers but keep the guard, should the parser change in the future.
The comment falsely indicates that malformed IRC messages would be null.
However, since the switch to a proper parser the function always returns an IrcMessage object, no matter how broken the input is.
Hence, remove the comment to avoid misleading readers but keep the guard, should the parser change in the future.