Install
npm i @tmi.js/irc-parser@0.4.2
Breaking Changes
- No longer automatically camel casing tags. This behavior can be recreated with the parse tag callback function. c9a1a66
const kebabToCamel = (str: string) => str.replace(/-(\w)/g, (_, match) => match.toUpperCase());
parse(ircString, (key, value, params) => [ kebabToCamel(key), value ]);
- Prefix keys are now optional. They may still be added but
undefined
in certain cases. Mostly backwards compatible. f34b2e4
Additions
- Added tag and message formatting functions. 3c48d03
format({ command: 'PRIVMSG', channel: 'channel_name', params: [ 'hello, world!' ] });
// 'PRIVMSG #channel_name :hello, world!'
Full Changelog: v0.3.0...v0.4.2