@hrefcl/apidoc - v4.0.5
    Preparing search index...
    • Parser for retain tags - defines MQTT retain flag

      This parser handles the retain tag that defines whether MQTT messages should be retained by the broker. It extracts:

      • Retain flag (true or false)
      • Validates boolean value

      Parameters

      • content: string

        Raw content from the retain tag

      Returns { retain: boolean }

      Parsed retain information or null if parsing fails

      // Input: "true"
      // Output: { retain: true }
      // Input: "false"
      // Output: { retain: false }
      // Input: "1" or "yes" or "on"
      // Output: { retain: true }
      // Input: "0" or "no" or "off"
      // Output: { retain: false }

      4.1.0