edgeport - v1.0.6
    Preparing search index...

    Function escapeTagValue

    • Escapes a tag value for the wire per the IRCv3 message-tags spec.

      Encodes the five reserved octets so a value stays unambiguous inside the semicolon-separated tag list: ; becomes \:, space becomes \s, backslash becomes \\, CR becomes \r, and LF becomes \n.

      Parameters

      • value: string

        The raw tag value.

      Returns string

      The escaped value safe to place after key=.

      1.0.4

      import { escapeTagValue } from 'edgeport/irc';

      escapeTagValue('a;b c'); // 'a\\:b\\s c' -> on the wire: a\:b\s