@hrefcl/apidoc - v4.0.5
    Preparing search index...
    • Parse

      Parameters

      • content: string

        Raw example content from the

      • source: string

        Source metadata containing type and title information

      Returns { title: string; content: string; type: string }

      Object containing title, content, and type, or null if no content

      tag to extract example code with metadata

      Processes

      tags to extract example code snippets with optional type and title information. Supports various formats including JSON, XML, cURL commands, and other code examples.

      tag

      // Input: "@apiExample {json} Request
      // {
      // "name": "John"
      // }"
      // Output: { title: "Request", content: "{\n \"name\": \"John\"\n}", type: "json" }
      // Input: "@apiExample {curl} Example usage
      // curl -X GET http://api.example.com/users"
      // Output: { title: "Example usage", content: "curl -X GET http://api.example.com/users", type: "curl" }
      // Input: "@apiExample Simple example
      // { "status": "ok" }"
      // Output: { title: "Simple example", content: "{ \"status\": \"ok\" }", type: "json" }

      4.0.0