{
  "id": "task_libraries:docx/javascript",
  "path": "/exapedia/javascript-docx-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "JavaScript Word document libraries",
  "answer": [
    {
      "t": "text",
      "text": "JavaScript Word document libraries read, create, and fill in .docx files from code. A template library fills placeholders in a document authored in Word rather than building each paragraph in code. These libraries generate the contracts, invoices, and reports that apps export as Word files."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "JavaScript Word document libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#mammoth",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F122"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F123"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F126"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F124"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#docx",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F139"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F140"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F141"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#docx-preview",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F156"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F157"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F160"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F158"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#docxtemplater",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F171"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F175"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#html-to-docx",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F187"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F191"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#turbodocx-html-to-docx",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F203"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F204"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F207"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#docx-templates",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F222"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#easy-template-x",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F236"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F240"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "npm"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#mammoth",
          "label": [
            {
              "t": "fact",
              "fact": "F122"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F123"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Create DOCX content",
            "Word template input"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#mammoth",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F122"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F130"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F131"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#docx",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F139"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F147"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F148"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#docx-preview",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F156"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F166"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#docxtemplater",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F171"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#html-to-docx",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F187"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F196"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#turbodocx-html-to-docx",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F203"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F213"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#docx-templates",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F222"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F232"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F233"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#easy-template-x",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F236"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F246"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F247"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "mammoth",
          "name": [
            {
              "t": "fact",
              "fact": "F122"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/mwilliamson/mammoth.js"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/mammoth"
            },
            {
              "label": "Docs",
              "href": "https://cdn.jsdelivr.net/npm/mammoth@1.13.0/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F8"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F123"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F125"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F124"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://cdn.jsdelivr.net/npm/mammoth@1.13.0/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F122"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F9"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F10"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F11"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F12"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F138"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/LibreChat-AI/LibreChat",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F137"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "async function wordDocToText(file: Express.Multer.File): Promise<string> {\n  const buffer = await fs.promises.readFile(file.path);\n  /* Reject zip-bomb DOCX before mammoth's internal extractor runs.\n   * mammoth has no decompressed-size cap of its own; without this, a\n   * sub-1MB compressed bomb (~200x ratio) would block the event loop\n   * and spike RSS to ~1GB. See SEC review on PR #12934. */\n  await assertSafeZipSize(buffer, { name: file.originalname ?? 'docx' });\n  const { extractRawText } = await import('mammoth');\n  const rawText = await extractRawText({ buffer });\n  return rawText.value;\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/LibreChat-AI/LibreChat/blob/9363db541ecd4e23ab6a41dca47ca48ee2bd418e/packages/api/src/files/documents/crud.ts#L103-L113",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F136"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20TypeScript%20projects%20using%20mammoth%20to%20export%20Word%20reports%2C%20fill%20templates%2C%20convert%20HTML%20or%20extract%20uploaded%20document%20text&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F122"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "var mammoth = require(\"mammoth\");\n\nmammoth.convertToHtml({path: \"path/to/document.docx\"})\n    .then(function(result){\n        var html = result.value; // The generated HTML\n        var messages = result.messages; // Any messages, such as warnings during conversion\n    })\n    .catch(function(error) {\n        console.error(error);\n    });\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/mwilliamson/mammoth.js/blob/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F127"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "docx",
          "name": [
            {
              "t": "fact",
              "fact": "F139"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/dolanmiu/docx"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/docx"
            },
            {
              "label": "Docs",
              "href": "https://docx.js.org/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F33"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F140"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F142"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F141"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docx.js.org/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F139"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F34"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F35"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F36"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F37"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F38"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F155"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/CherryHQ/cherry-studio",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F154"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "public exportToWord = async (markdown: string, fileName: string, senderId?: string | null): Promise<boolean> => {\n    try {\n      // Dialog-first is perf-driven: canceling costs zero conversion, and the dialog\n      // opens without waiting on the markdown→docx conversion.\n      const dialogOptions = {\n        title: t('dialog.save_file'),\n        filters: [{ name: t('dialog.word_document'), extensions: ['docx'] }],\n        defaultPath: fileName\n      }\n      // Parented dialog avoids the unparented-save crash with Unicode names.\n      // Missing or destroyed caller window falls back to the unparented overload.\n      const candidate: BrowserWindow | undefined = senderId\n        ? application.get('WindowManager').getWindow(senderId)\n        : undefined\n      const parent = candidate && !candidate.isDestroyed() ? candidate : undefined\n      const { canceled, filePath } = parent\n        ? await dialog.showSaveDialog(parent, dialogOptions)\n        : await dialog.showSaveDialog(dialogOptions)\n      if (canceled || !filePath) {\n        return false\n      }\n\n      const [{ default: MarkdownIt }, docx] = await Promise.all([import('markdown-it'), import('docx')])\n      const elements = this.convertMarkdownToDocxElements(markdown, new MarkdownIt(), docx)\n\n      const doc = new docx.Document({\n        styles: {\n          paragraphStyles: [\n            {\n              id: 'Normal',\n              name: 'Normal',\n              run: {\n                size: 24,\n                font: 'Arial'\n              }\n            }\n          ]\n        },\n        sections: [\n          {\n            properties: {},\n            children: elements\n          }\n        ]\n      })\n\n      const buffer = await docx.Packer.toBuffer(doc)\n\n      await fs.promises.writeFile(filePath, buffer)\n      logger.debug('Document exported successfully')\n      return true\n    } catch (error) {\n      logger.error('Export to Word failed:', error as Error)\n      throw error\n    }\n  }\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/CherryHQ/cherry-studio/blob/b8241ecaac3ee0e33711c67592e24ab1b23152cc/src/main/services/ExportService.ts#L378-L433",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F153"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20TypeScript%20projects%20using%20docx%20to%20export%20Word%20reports%2C%20fill%20templates%2C%20convert%20HTML%20or%20extract%20uploaded%20document%20text&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F139"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import { Document, Packer, Paragraph, TextRun } from \"docx\";\nimport * as fs from \"fs\";\n\nconst doc = new Document({\n    sections: [\n        {\n            // Documents are organized into sections\n            children: [\n                new Paragraph({\n                    children: [new TextRun(\"Hello World!\")],\n                }),\n            ],\n        },\n    ],\n});\n\nPacker.toBuffer(doc).then((buffer) => {\n    fs.writeFileSync(\"My Document.docx\", buffer);\n});\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/dolanmiu/docx/blob/master/docs/quickstart.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "quickstart.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F144"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "docx-preview",
          "name": [
            {
              "t": "fact",
              "fact": "F156"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/VolodymyrBaydalka/docxjs"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/docx-preview"
            },
            {
              "label": "Docs",
              "href": "https://api.github.com/repos/VolodymyrBaydalka/docxjs/contents/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F254"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F157"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F159"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F158"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://api.github.com/repos/VolodymyrBaydalka/docxjs/contents/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F156"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F255"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F256"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F257"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F258"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F259"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F260"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "<!--lib uses jszip-->\n<script src=\"https://unpkg.com/jszip/dist/jszip.min.js\"></script>\n<script src=\"docx-preview.min.js\"></script>\n<body>\n    <div id=\"container\"></div>\n\n<script>\n\n</script>\n</body>\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://api.github.com/repos/VolodymyrBaydalka/docxjs/contents/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=docx-preview%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F156"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F161"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "docxtemplater",
          "name": [
            {
              "t": "fact",
              "fact": "F171"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/open-xml-templating/docxtemplater"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/docxtemplater"
            },
            {
              "label": "Docs",
              "href": "https://docxtemplater.com/docs/get-started-node/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F60"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F174"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docxtemplater.com/docs/get-started-node/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F171"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F61"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F62"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F63"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F64"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F67"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F68"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F185"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/pwndoc/pwndoc",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F185"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "async function generateDoc(audit) {\n    var templatePath = `${__basedir}/../report-templates/${audit.template.name}.${audit.template.ext || 'docx'}`\n    var content = fs.readFileSync(templatePath, \"binary\");\n    \n    var zip = new PizZip(content);\n    \n    translate.setLocale(audit.language)\n    $t = translate.translate\n\n    var settings = await Settings.getAll();\n    var preppedAudit = await prepAuditData(audit, settings)\n\n    var opts = {};\n    // opts.centered = true;\n    opts.getImage = function(tagValue, tagName) {\n        if (tagValue !== \"undefined\") {\n            tagValue = tagValue.split(\",\")[1];\n            return Buffer.from(tagValue, 'base64');\n        }\n        // return fs.readFileSync(tagValue, {encoding: 'base64'});\n    }\n    opts.getSize = function(img, tagValue, tagName) {\n        if (img) {\n            var sizeObj = sizeOf.default(img);\n            var width = sizeObj.width;\n            var height = sizeObj.height;\n            if (tagName === \"company.logo_small\") {\n                var divider = sizeObj.height / 37;\n                height = 37;\n                width = Math.floor(sizeObj.width / divider);\n            }\n            else if (tagName === \"company.logo\") {\n                var divider = sizeObj.height / 250;\n                height = 250;\n                width = Math.floor(sizeObj.width / divider);\n                if (width > 400) {\n                    divider = sizeObj.width / 400;\n                    height = Math.floor(sizeObj.height / divider);\n                    width = 400;\n                }\n            }\n            else if (sizeObj.width > 600) {\n                var divider = sizeObj.width / 600;\n                width = 600;\n                height = Math.floor(sizeObj.height / divider);\n            }\n            return [width,height];\n        }\n        return [0,0];\n    }\n\n    if (settings.report.private.imageBorder && settings.report.private.imageBorderColor)\n        opts.border = settings.report.private.imageBorderColor.replace('#', '')\n\n    try {\n        var imageModule = new ImageModule(opts);\n    }\n    catch(err) {\n        console.log(err)\n    }\n    expressionParser.filters = {...reportFilters.expressions, ...reportFiltersCustom.expressions}   \n    var doc = new Docxtemplater(zip, {\n        parser: parser,\n        paragraphLoop: true,\n        modules: [imageModule],\n    });\n    try {\n        doc.render(preppedAudit);\n    }\n    catch (error) {\n        if (error.properties.id === 'multi_error') {\n            error.properties.errors.forEach(function(err) {\n                console.log(err);\n            });\n        }\n        else\n            console.log(error)\n        if (error.properties && error.properties.errors instanceof Array) {\n            const errorMessages = error.properties.errors.map(function (error) {\n                return `Explanation: ${error.properties.explanation}\\nScope: ${JSON.stringify(error.properties.scope).substring(0,142)}...`\n            }).join(\"\\n\\n\");\n            // errorMessages is a humanly readable message looking like this :\n            // 'The tag beginning with \"foobar\" is unopened'\n            throw `Template Error:\\n${errorMessages}`;\n        }\n        else {\n            throw error\n        }\n    }\n    var buf = doc.getZip().generate({type:\"nodebuffer\"});\n\n    if (shouldApplyDraftWatermark(audit, settings)) {\n        var watermarkText = resolveDraftWatermarkText(settings.reviews.public.draftWatermark, audit.language);\n        buf = applyDraftExport(buf, watermarkText);\n    }\n\n    return buf;\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/pwndoc/pwndoc/blob/3be29ba9557bde8d36324f3b0d6b94b8afc7dc61/backend/src/lib/report-generator.js#L37-L134",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F184"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20TypeScript%20projects%20using%20docxtemplater%20to%20export%20Word%20reports%2C%20fill%20templates%2C%20convert%20HTML%20or%20extract%20uploaded%20document%20text&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F171"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "const Docxtemplater = require(\"docxtemplater\");\nconst PizZip = require(\"pizzip\");\nconst fs = require(\"fs\");\nconst path = require(\"path\");\nconst content = fs.readFileSync(\n    path.resolve(__dirname, \"input.docx\"),\n    \"binary\"\n);\nconst zip = new PizZip(content);\nconst doc = new Docxtemplater(zip, {\n    paragraphLoop: true,\n    linebreaks: true,\n});\ndoc.render({\n    first_name: \"John\",\n    last_name: \"Doe\",\n    phone: \"+33666666\",\n    description: \"The Acme Product\",\n});\nconst buf = doc.toBuffer();\nfs.writeFileSync(path.resolve(__dirname, \"output.docx\"), buf);\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://docxtemplater.com/docs/get-started-node/",
                  "label": [
                    {
                      "t": "text",
                      "text": "Get started docs"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F176"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "html-to-docx",
          "name": [
            {
              "t": "fact",
              "fact": "F187"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/privateOmega/html-to-docx"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/html-to-docx"
            },
            {
              "label": "Docs",
              "href": "https://api.github.com/repos/privateOmega/html-to-docx/contents/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F84"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F190"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://api.github.com/repos/privateOmega/html-to-docx/contents/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F187"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F85"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F86"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F87"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F88"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F89"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F90"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F91"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F92"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F201"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/jnMetaCode/agency-orchestrator",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F201"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "async function toDocx(md: string): Promise<ExportResult> {\n  const viaPandoc = pandocConvert(md, 'docx');\n  if (viaPandoc) return { buffer: viaPandoc, ext: 'docx', mime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', engine: 'pandoc' };\n  // JS 兜底:marked → html → html-to-docx\n  // @ts-expect-error html-to-docx 无类型声明文件\n  const HTMLtoDOCX = (await import('html-to-docx')).default as (html: string, header?: string | null, opts?: unknown) => Promise<Buffer | ArrayBuffer>;\n  const out = await HTMLtoDOCX(mdToHtml(md), null, { table: { row: { cantSplit: true } } });\n  const buffer = Buffer.isBuffer(out) ? out : Buffer.from(out as ArrayBuffer);\n  return { buffer, ext: 'docx', mime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', engine: 'html-to-docx' };\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/jnMetaCode/agency-orchestrator/blob/8fa9963e4f835efeb5e4481a861689dc99d5ce8d/src/export/convert.ts#L42-L51",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F200"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20TypeScript%20projects%20using%20html-to-docx%20to%20export%20Word%20reports%2C%20fill%20templates%2C%20convert%20HTML%20or%20extract%20uploaded%20document%20text&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F187"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import HTMLtoDOCX from 'html-to-docx';\nimport { saveAs } from 'file-saver';\n\nconst fileBuffer = await HTMLtoDOCX(htmlString, null, {\n  table: { row: { cantSplit: true } },\n  footer: true,\n  pageNumber: true,\n});\n\nsaveAs(fileBuffer, 'html-to-docx.docx');\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://api.github.com/repos/privateOmega/html-to-docx/git/blobs/9b2ecae247f2cad1a2670b65a06452a79b5f6ecd",
                  "label": [
                    {
                      "t": "text",
                      "text": "example-node.js"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F192"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "turbodocx-html-to-docx",
          "name": [
            {
              "t": "fact",
              "fact": "F203"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/TurboDocx/html-to-docx"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/@turbodocx/html-to-docx"
            },
            {
              "label": "Docs",
              "href": "https://api.github.com/repos/TurboDocx/html-to-docx/git/blobs/c51d3af521c33e06b940912de9255aadbc6336e4"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F261"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F204"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://api.github.com/repos/TurboDocx/html-to-docx/git/blobs/c51d3af521c33e06b940912de9255aadbc6336e4",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F203"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F262"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F263"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F264"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F265"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F221"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/FuturixAI-and-Quantum-Works/Prism-Legal-OS",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F220"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "export async function createInitialDocxBuffer(\n  filename: string,\n  content?: InitialDocxContent,\n): Promise<Buffer> {\n  if (!content?.value.trim()) return createBlankDocxBuffer(filename);\n  if (content.kind === \"plain-text\") return createPlainTextDocx(filename, content.value);\n  const title = filename.replace(/\\.[^.]+$/, \"\") || \"Untitled Document\";\n  const html = `<!DOCTYPE html>\n<html>\n<head><meta charset=\"UTF-8\"><title>${title}</title></head>\n<body>${content.value}</body>\n</html>`;\n  try {\n    const output = await HTMLtoDOCX(html, null, {\n      title,\n      creator: \"Prism\",\n      font: \"Calibri\",\n      fontSize: 22,\n      table: { row: { cantSplit: true } },\n      footer: true,\n      pageNumber: true,\n    });\n    const buffer = await outputBuffer(output);\n    if (!buffer) throw new Error(\"Document conversion returned no bytes\");\n    return buffer;\n  } catch (error) {\n    throw new DocxConversionError({ cause: error });\n  }\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/FuturixAI-and-Quantum-Works/Prism-Legal-OS/blob/fdb81bc0e66b3a8cfbe4437eab07287b769def8a/backend/src/modules/documents/documents.docx.ts#L77-L105",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F219"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=%40turbodocx/html-to-docx%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F203"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import HtmlToDocx from \"@turbodocx/html-to-docx\";\n\nconst htmlString = `<!DOCTYPE html>\n    <html lang=\"en\">\n        <head>\n            <meta charset=\"UTF-8\" />\n            <title>Document</title>\n        </head>\n        <body>\n            <h1>Hello world</h1>\n        </body>\n    </html>`;\n\nconst docx = await HtmlToDocx(htmlString);\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://api.github.com/repos/TurboDocx/html-to-docx/git/blobs/c51d3af521c33e06b940912de9255aadbc6336e4",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F208"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "docx-templates",
          "name": [
            {
              "t": "fact",
              "fact": "F222"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/guigrpa/docx-templates"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/docx-templates"
            },
            {
              "label": "Docs",
              "href": "https://api.github.com/repos/guigrpa/docx-templates/git/blobs/a0a84128fcdb6e7514f8b8ff329bf0d5db4c93dc"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F266"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://api.github.com/repos/guigrpa/docx-templates/git/blobs/a0a84128fcdb6e7514f8b8ff329bf0d5db4c93dc",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F222"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F267"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F268"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F269"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F270"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F271"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F272"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import createReport from 'docx-templates';\nimport fs from 'fs';\n\nconst template = fs.readFileSync('myTemplate.docx');\n\nconst buffer = await createReport({\n  template,\n  data: {\n    name: 'John',\n    surname: 'Appleseed',\n  },\n});\n\nfs.writeFileSync('report.docx', buffer)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://api.github.com/repos/guigrpa/docx-templates/git/blobs/a0a84128fcdb6e7514f8b8ff329bf0d5db4c93dc",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=docx-templates%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F222"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F227"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "easy-template-x",
          "name": [
            {
              "t": "fact",
              "fact": "F236"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/alonrbar/easy-template-x"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/easy-template-x"
            },
            {
              "label": "Docs",
              "href": "https://api.github.com/repos/alonrbar/easy-template-x/git/blobs/0feeeb2ab921d8afc350723fbc6a7470fd283357"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F273"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F239"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://api.github.com/repos/alonrbar/easy-template-x/git/blobs/0feeeb2ab921d8afc350723fbc6a7470fd283357",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F236"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F274"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F275"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F276"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F277"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F278"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F279"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F252"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F253"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/rwilson504/PCFControls",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F252"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "public async DocxTemplateFill(\n  pcfContext: ComponentFramework.Context<IInputs>\n): Promise<string> {\n  var params = pcfContext.parameters;\n  var dataSet = pcfContext.parameters.templateData?.raw || \"{}\";\n  var dataSetObject = JSON.parse(dataSet);    \n  await this.updateImagesToArrayBuffer(dataSetObject);\n\n  const handler = new TemplateHandler();    \n  const docxFilled = await handler.process(\n    this.convertStringToArray(params.docxTemplate.raw!),\n    dataSetObject\n  );\n\n  return encode(docxFilled);\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/rwilson504/PCFControls/blob/4c782af7df3cce9303263ddb226910368eac4953/DocxTemplatesCanvas/DocxTemplatesCanvas/index.ts#L82-L97",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F251"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=easy-template-x%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F236"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import * as fs from \"fs\";\nimport { TemplateHandler } from \"easy-template-x\";\n\n// 1. read template file\nconst templateFile = fs.readFileSync(\"myTemplate.docx\");\n\n// 2. process the template\nconst data = {\n    posts: [\n        { author: \"Anakin\", text: \"Luke, I am\\nyour father.\" },\n        { author: \"Luke\", text: \"No! That's impossible!\" }\n    ]\n};\n\nconst handler = new TemplateHandler();\nconst doc = await handler.process(templateFile, data);\n\n// 3. save output\nfs.writeFileSync(\"myTemplate - output.docx\", doc);\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://api.github.com/repos/alonrbar/easy-template-x/git/blobs/0feeeb2ab921d8afc350723fbc6a7470fd283357",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F241"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "What is docx.js?",
      "a": [
        {
          "t": "link",
          "href": "#docx",
          "label": [
            {
              "t": "text",
              "text": "docx"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a TypeScript and JavaScript library that generates Word documents through a declarative API. It runs in Node.js and in the browser."
        }
      ]
    },
    {
      "q": "What is docx-preview?",
      "a": [
        {
          "t": "link",
          "href": "#docx-preview",
          "label": [
            {
              "t": "text",
              "text": "docx-preview"
            }
          ]
        },
        {
          "t": "text",
          "text": " renders a Word document into HTML inside a web page. Its output follows what HTML can display rather than the exact Word layout."
        }
      ]
    },
    {
      "q": "What is Docxtemplater?",
      "a": [
        {
          "t": "link",
          "href": "#docxtemplater",
          "label": [
            {
              "t": "text",
              "text": "Docxtemplater"
            }
          ]
        },
        {
          "t": "text",
          "text": " generates Word documents from a template by replacing placeholders with data. Its templates support loops and conditions, and people without programming skills can edit them in Word."
        }
      ]
    },
    {
      "q": "What is Mammoth.js?",
      "a": [
        {
          "t": "link",
          "href": "#mammoth",
          "label": [
            {
              "t": "text",
              "text": "Mammoth"
            }
          ]
        },
        {
          "t": "text",
          "text": " converts a Word document into HTML built from the document's semantic styles. Its extractRawText function returns the plain text without formatting."
        }
      ]
    },
    {
      "q": "Can html-to-docx run directly in a browser?",
      "a": [
        {
          "t": "fact",
          "fact": "F117"
        }
      ]
    },
    {
      "q": "Does Mammoth preserve Word table borders?",
      "a": [
        {
          "t": "fact",
          "fact": "F119"
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, mammoth",
      "display": "Mammoth",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, mammoth",
      "display": "58.4M",
      "asOf": "2026-11-15"
    },
    "F3": {
      "label": "License, mammoth",
      "display": "BSD-2-Clause",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, mammoth",
      "display": "1.13.0",
      "asOf": "2026-11-17"
    },
    "F5": {
      "label": "Undated package release, mammoth",
      "display": "v1.13.0",
      "asOf": "2026-11-17"
    },
    "F6": {
      "label": "Repository stars, mammoth",
      "display": "6.3K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Install, mammoth",
      "display": "npm install mammoth",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "What it does, mammoth",
      "display": "Converts Word content into semantic HTML or extracts plain text for indexing and processing.",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "strengths lead, mammoth",
      "display": "Extracts text for downstream processing",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "strengths, mammoth",
      "display": "extractRawText returns document text without formatting.",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "strengths lead, mammoth",
      "display": "Maps Word styles into HTML",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "strengths, mammoth",
      "display": "Map named paragraph styles to headings and other HTML elements.",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "limitations lead, mammoth",
      "display": "Table borders are discarded",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "limitations, mammoth",
      "display": "Table content survives conversion, while table border formatting is ignored.",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "limitations lead, mammoth",
      "display": "Untrusted HTML needs separate sanitization",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "limitations, mammoth",
      "display": "Sanitize converted content before embedding it into a website.",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "Quickstart, mammoth",
      "display": "var mammoth = require(\"mammoth\");\n\nmammoth.convertToHtml({path: \"path/to/document.docx\"})\n    .then(function(result){\n        var html = result.value; // The generated HTML\n        var messages = result.messages; // Any messages, such as warnings during conversion\n    })\n    .catch(function(error) {\n        console.error(error);\n    });\n",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "Project function, mammoth",
      "display": "async function wordDocToText(file: Express.Multer.File): Promise<string> {\n  const buffer = await fs.promises.readFile(file.path);\n  /* Reject zip-bomb DOCX before mammoth's internal extractor runs.\n   * mammoth has no decompressed-size cap of its own; without this, a\n   * sub-1MB compressed bomb (~200x ratio) would block the event loop\n   * and spike RSS to ~1GB. See SEC review on PR #12934. */\n  await assertSafeZipSize(buffer, { name: file.originalname ?? 'docx' });\n  const { extractRawText } = await import('mammoth');\n  const rawText = await extractRawText({ buffer });\n  return rawText.value;\n}\n",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "Project function reference, mammoth",
      "display": "crud.ts · wordDocToText()",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "Project repository, mammoth",
      "display": "LibreChat-AI/LibreChat",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Project stars, LibreChat-AI/LibreChat",
      "display": "47.2K",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project push date, LibreChat-AI/LibreChat",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F23": {
      "label": "Library name, docx",
      "display": "docx",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Monthly downloads, docx",
      "display": "42.3M",
      "asOf": "2026-11-15"
    },
    "F25": {
      "label": "License, docx",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Package release, docx",
      "display": "9.15.4",
      "asOf": "2026-11-17"
    },
    "F27": {
      "label": "Undated package release, docx",
      "display": "v9.15.4",
      "asOf": "2026-11-17"
    },
    "F28": {
      "label": "Repository stars, docx",
      "display": "6.0K",
      "asOf": "2026-11-17"
    },
    "F29": {
      "label": "Creates Word documents, docx",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F30": {
      "label": "Fills Word templates, docx",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F31": {
      "label": "Converts HTML to Word, docx",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F32": {
      "label": "Install, docx",
      "display": "npm install --save docx",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "What it does, docx",
      "display": "Generates Word documents in JavaScript or TypeScript for Node.js and browser applications.",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "strengths lead, docx",
      "display": "Builds rich Word documents",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "strengths, docx",
      "display": "Add tables, images, charts, headers, and footers with the document API.",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "strengths lead, docx",
      "display": "Updates existing Word templates",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "strengths, docx",
      "display": "patchDocument replaces placeholders while preserving the surrounding document structure.",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "strengths lead, docx",
      "display": "Converts rich HTML into content",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths, docx",
      "display": "htmlToContent turns HTML into native Word paragraphs and tables.",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "limitations lead, docx",
      "display": "PDF export needs another tool",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "limitations, docx",
      "display": "Generate Word files here, then convert them separately for PDF delivery.",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "limitations lead, docx",
      "display": "HTML images need supplied data",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations, docx",
      "display": "Pass image data explicitly; htmlToContent does not download remote images.",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "Quickstart, docx",
      "display": "import { Document, Packer, Paragraph, TextRun } from \"docx\";\nimport * as fs from \"fs\";\n\nconst doc = new Document({\n    sections: [\n        {\n            // Documents are organized into sections\n            children: [\n                new Paragraph({\n                    children: [new TextRun(\"Hello World!\")],\n                }),\n            ],\n        },\n    ],\n});\n\nPacker.toBuffer(doc).then((buffer) => {\n    fs.writeFileSync(\"My Document.docx\", buffer);\n});\n",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "Project function, docx",
      "display": "async (markdown: string, fileName: string, senderId?: string | null): Promise<boolean> => {\n    try {\n      // Dialog-first is perf-driven: canceling costs zero conversion, and the dialog\n      // opens without waiting on the markdown→docx conversion.\n      const dialogOptions = {\n        title: t('dialog.save_file'),\n        filters: [{ name: t('dialog.word_document'), extensions: ['docx'] }],\n        defaultPath: fileName\n      }\n      // Parented dialog avoids the unparented-save crash with Unicode names.\n      // Missing or destroyed caller window falls back to the unparented overload.\n      const candidate: BrowserWindow | undefined = senderId\n        ? application.get('WindowManager').getWindow(senderId)\n        : undefined\n      const parent = candidate && !candidate.isDestroyed() ? candidate : undefined\n      const { canceled, filePath } = parent\n        ? await dialog.showSaveDialog(parent, dialogOptions)\n        : await dialog.showSaveDialog(dialogOptions)\n      if (canceled || !filePath) {\n        return false\n      }\n\n      const [{ default: MarkdownIt }, docx] = await Promise.all([import('markdown-it'), import('docx')])\n      const elements = this.convertMarkdownToDocxElements(markdown, new MarkdownIt(), docx)\n\n      const doc = new docx.Document({\n        styles: {\n          paragraphStyles: [\n            {\n              id: 'Normal',\n              name: 'Normal',\n              run: {\n                size: 24,\n                font: 'Arial'\n              }\n            }\n          ]\n        },\n        sections: [\n          {\n            properties: {},\n            children: elements\n          }\n        ]\n      })\n\n      const buffer = await docx.Packer.toBuffer(doc)\n\n      await fs.promises.writeFile(filePath, buffer)\n      logger.debug('Document exported successfully')\n      return true\n    } catch (error) {\n      logger.error('Export to Word failed:', error as Error)\n      throw error\n    }\n  }\n",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "Project function reference, docx",
      "display": "ExportService.ts · exportToWord()",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Project repository, docx",
      "display": "CherryHQ/cherry-studio",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project stars, CherryHQ/cherry-studio",
      "display": "53.6K",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project push date, CherryHQ/cherry-studio",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F50": {
      "label": "Library name, docxtemplater",
      "display": "Docxtemplater",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Monthly downloads, docxtemplater",
      "display": "6.3M",
      "asOf": "2026-11-15"
    },
    "F52": {
      "label": "License, docxtemplater",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F53": {
      "label": "Package release, docxtemplater",
      "display": "3.71.1",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Undated package release, docxtemplater",
      "display": "v3.71.1",
      "asOf": "2026-11-17"
    },
    "F55": {
      "label": "Repository stars, docxtemplater",
      "display": "3.7K",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "Creates Word documents, docxtemplater",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F57": {
      "label": "Fills Word templates, docxtemplater",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "Converts HTML to Word, docxtemplater",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Install, docxtemplater",
      "display": "npm install --save docxtemplater pizzip",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "What it does, docxtemplater",
      "display": "Generates documents by replacing placeholders, loops, and conditions inside existing Word templates.",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "strengths lead, docxtemplater",
      "display": "Templates stay editable in Word",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "strengths, docxtemplater",
      "display": "Non-programmers can edit the source templates before generation.",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "strengths lead, docxtemplater",
      "display": "Repeats sections from structured data",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "strengths, docxtemplater",
      "display": "Use loops and conditions to generate repeated or conditional template content.",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "limitations lead, docxtemplater",
      "display": "Images and HTML need modules",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "limitations, docxtemplater",
      "display": "Add paid modules to insert images or formatted HTML.",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "limitations lead, docxtemplater",
      "display": "Starts with an existing template",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "limitations, docxtemplater",
      "display": "Supply a Word template containing the placeholders to replace.",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "Quickstart, docxtemplater",
      "display": "// Load our library that generates the document\nconst Docxtemplater = require(\"docxtemplater\");\n// Load PizZip library to load the docx/pptx/xlsx file in memory\nconst PizZip = require(\"pizzip\");\n\n// Builtin file system utilities\nconst fs = require(\"fs\");\nconst path = require(\"path\");\n\n// Load the docx file as binary content\nconst content = fs.readFileSync(\n    path.resolve(__dirname, \"input.docx\"),\n    \"binary\"\n);\n\n// Unzip the content of the file\nconst zip = new PizZip(content);\n\n/*\n * Parse the template.\n * This function throws an error if the template is invalid,\n * for example, if the template is \"Hello {user\" (missing closing tag)\n */\nconst doc = new Docxtemplater(zip, {\n    paragraphLoop: true,\n    linebreaks: true,\n});\n\n/*\n * Render the document : Replaces :\n * - {first_name} with John\n * - {last_name} with Doe,\n * ...\n */\ndoc.render({\n    first_name: \"John\",\n    last_name: \"Doe\",\n    phone: \"+33666666\",\n    description: \"The Acme Product\",\n});\n\n/*\n * Get the output document and export it as a Node.js buffer\n * This method is available since docxtemplater@3.62.0\n */\nconst buf = doc.toBuffer();\n\n// Write the Buffer to a file\nfs.writeFileSync(path.resolve(__dirname, \"output.docx\"), buf);\n/*\n * Instead of writing it to a file, you could also\n * let the user download it, store it in a database,\n * on AWS S3, ...\n */\n\n",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "Project function, docxtemplater",
      "display": "async function generateDoc(audit) {\n    var templatePath = `${__basedir}/../report-templates/${audit.template.name}.${audit.template.ext || 'docx'}`\n    var content = fs.readFileSync(templatePath, \"binary\");\n    \n    var zip = new PizZip(content);\n    \n    translate.setLocale(audit.language)\n    $t = translate.translate\n\n    var settings = await Settings.getAll();\n    var preppedAudit = await prepAuditData(audit, settings)\n\n    var opts = {};\n    // opts.centered = true;\n    opts.getImage = function(tagValue, tagName) {\n        if (tagValue !== \"undefined\") {\n            tagValue = tagValue.split(\",\")[1];\n            return Buffer.from(tagValue, 'base64');\n        }\n        // return fs.readFileSync(tagValue, {encoding: 'base64'});\n    }\n    opts.getSize = function(img, tagValue, tagName) {\n        if (img) {\n            var sizeObj = sizeOf.default(img);\n            var width = sizeObj.width;\n            var height = sizeObj.height;\n            if (tagName === \"company.logo_small\") {\n                var divider = sizeObj.height / 37;\n                height = 37;\n                width = Math.floor(sizeObj.width / divider);\n            }\n            else if (tagName === \"company.logo\") {\n                var divider = sizeObj.height / 250;\n                height = 250;\n                width = Math.floor(sizeObj.width / divider);\n                if (width > 400) {\n                    divider = sizeObj.width / 400;\n                    height = Math.floor(sizeObj.height / divider);\n                    width = 400;\n                }\n            }\n            else if (sizeObj.width > 600) {\n                var divider = sizeObj.width / 600;\n                width = 600;\n                height = Math.floor(sizeObj.height / divider);\n            }\n            return [width,height];\n        }\n        return [0,0];\n    }\n\n    if (settings.report.private.imageBorder && settings.report.private.imageBorderColor)\n        opts.border = settings.report.private.imageBorderColor.replace('#', '')\n\n    try {\n        var imageModule = new ImageModule(opts);\n    }\n    catch(err) {\n        console.log(err)\n    }\n    expressionParser.filters = {...reportFilters.expressions, ...reportFiltersCustom.expressions}   \n    var doc = new Docxtemplater(zip, {\n        parser: parser,\n        paragraphLoop: true,\n        modules: [imageModule],\n    });\n    try {\n        doc.render(preppedAudit);\n    }\n    catch (error) {\n        if (error.properties.id === 'multi_error') {\n            error.properties.errors.forEach(function(err) {\n                console.log(err);\n            });\n        }\n        else\n            console.log(error)\n        if (error.properties && error.properties.errors instanceof Array) {\n            const errorMessages = error.properties.errors.map(function (error) {\n                return `Explanation: ${error.properties.explanation}\\nScope: ${JSON.stringify(error.properties.scope).substring(0,142)}...`\n            }).join(\"\\n\\n\");\n            // errorMessages is a humanly readable message looking like this :\n            // 'The tag beginning with \"foobar\" is unopened'\n            throw `Template Error:\\n${errorMessages}`;\n        }\n        else {\n            throw error\n        }\n    }\n    var buf = doc.getZip().generate({type:\"nodebuffer\"});\n\n    if (shouldApplyDraftWatermark(audit, settings)) {\n        var watermarkText = resolveDraftWatermarkText(settings.reviews.public.draftWatermark, audit.language);\n        buf = applyDraftExport(buf, watermarkText);\n    }\n\n    return buf;\n}\n",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "Project function reference, docxtemplater",
      "display": "report-generator.js · generateDoc()",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Project repository, docxtemplater",
      "display": "pwndoc/pwndoc",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Project stars, pwndoc/pwndoc",
      "display": "2.9K",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Project push date, pwndoc/pwndoc",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F75": {
      "label": "Library name, html-to-docx",
      "display": "html-to-docx",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Monthly downloads, html-to-docx",
      "display": "1.2M",
      "asOf": "2026-11-15"
    },
    "F77": {
      "label": "License, html-to-docx",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Package release, html-to-docx",
      "display": "1.8.0",
      "asOf": "2026-11-17"
    },
    "F79": {
      "label": "Undated package release, html-to-docx",
      "display": "v1.8.0",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Repository stars, html-to-docx",
      "display": "484",
      "asOf": "2026-11-17"
    },
    "F81": {
      "label": "Creates Word documents, html-to-docx",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "Converts HTML to Word, html-to-docx",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Install, html-to-docx",
      "display": "npm install html-to-docx",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "What it does, html-to-docx",
      "display": "Converts HTML strings into Word documents with configurable page layout, headers, footers, and tables.",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "strengths lead, html-to-docx",
      "display": "Converts existing HTML into Word",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "strengths, html-to-docx",
      "display": "Reuse HTML content as the input for document generation.",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "strengths lead, html-to-docx",
      "display": "Adds page numbers to footers",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "strengths, html-to-docx",
      "display": "Enable footer page numbers with the pageNumber option.",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "limitations lead, html-to-docx",
      "display": "Runs outside the browser directly",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "limitations, html-to-docx",
      "display": "Use a server-side conversion step for browser applications.",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "limitations lead, html-to-docx",
      "display": "Fonts vary between Word processors",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "limitations, html-to-docx",
      "display": "LibreOffice and Word Online choose replacement fonts themselves.",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "Quickstart, html-to-docx",
      "display": "/* eslint-disable no-console */\nconst fs = require('fs');\n// FIXME: Incase you have the npm package\n// const HTMLtoDOCX = require('html-to-docx');\nconst HTMLtoDOCX = require('../dist/html-to-docx.umd');\n\nconst filePath = './example.docx';\n\nconst htmlString = `<!DOCTYPE html>\n<html lang=\"en\">\n    <head>\n        <meta charset=\"UTF-8\" />\n        <title>Document</title>\n    </head>\n    <body>\n        <div>\n            <p>Taken from wikipedia</p>\n            <img\n                src=\"data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\"\n                alt=\"Red dot\"\n            />\n            <img\n                src=\"https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png\"\n                alt=\"Red dot\"\n            />\n        </div>\n        <div>\n            <h1>This is heading 1</h1>\n            <p>Content</p>\n            <h2>This is heading 2</h2>\n            <p>Content</p>\n            <h3>This is heading 3</h3>\n            <p>Content</p>\n            <h4>This is heading 4</h4>\n            <p>Content</p>\n            <h5>This is heading 5</h5>\n            <p>Content</p>\n            <h6>This is heading 6</h6>\n            <p>Content</p>\n        </div>\n        <p>\n            <strong>\n                Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make\n                a type specimen book.\n            </strong>\n            <i>It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</i>\n            <u>It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages,</u>and more recently with desktop publishing software\n            <span style=\"color: hsl(0, 75%, 60%);\"> like Aldus PageMaker </span>including versions of Lorem Ipsum.\n            <span style=\"background-color: hsl(0, 75%, 60%);\">Where does it come from? Contrary to popular belief, Lorem Ipsum is not simply random text.</span>\n            It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.\n        </p>\n        <p style=\"font-family: 'Courier New', Courier, monospace;\">Look at me, i'm a paragraph in Courier New!</p>\n        <p style=\"font-family: SerifTestFont, serif;\">Look at me, i'm a paragraph in SerifTestFont!</p>\n        <p style=\"font-family: SansTestFont, sans-serif;\">Look at me, i'm a paragraph in SansTestFont!</p>\n        <p style=\"font-family: MonoTestFont, monospace;\">Look at me, i'm a paragraph in MonoTestFont!</p>\n        <blockquote>\n            For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally.\n        </blockquote>\n        <p>\n            <strong>\n                Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make\n                a type specimen book.\n            </strong>\n        </p>\n        <p style=\"margin-left: 40px;\">\n            <strong>Left indented paragraph:</strong>\n            <span>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</span>\n        </p>\n        <p style=\"margin-right: 40px;\">\n            <strong>Right indented paragraph:</strong>\n            <span>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</span>\n        </p>\n        <p style=\"margin-left: 40px; margin-right: 40px;\">\n            <strong>Left and right indented paragraph:</strong>\n            <span>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</span>\n        </p>\n        <ul style=\"list-style-type: circle;\">\n            <li>Unordered list element</li>\n        </ul>\n        <br>\n        <ol style=\"list-style-type: decimal;\">\n            <li>Ordered list element</li>\n        </ol>\n        <div class=\"page-break\" style=\"page-break-after: always\"></div>\n        <ul>\n            <li><span style=\"font-size:10pt\"><span style=\"color:##e28743\">I am a teacup <strong><span style=\"color:#595959\">A strong teacup</span></strong></span></span></li>\n            <li><span style=\"font-size:10pt\"><span style=\"color:#4d4f53\">I am another teacup <strong><span style=\"color:#2596be\">A blue</span></strong> Teacup</span></span></li>\n            <li><span style=\"font-size:10pt\"><span style=\"color:#cc1177\">Stonks only go up if you turn the chart sometimes</span></span></li>\n        </ul>\n        <div class=\"page-break\" style=\"page-break-after: always\"></div>\n        <ul>\n            <li>\n                <a href=\"https://en.wikipedia.org/wiki/Coffee\">\n                    <strong>\n                        <u>Coffee</u>\n                    </strong>\n                </a>\n            </li>\n            <li>Tea\n                <ol>\n                    <li>Black tea\n                        <ol style=\"list-style-type:lower-alpha-bracket-end;\" data-start=\"2\">\n                            <li>Srilankan <strong>Tea</strong>\n                                <ul>\n                                    <li>Uva <b>Tea</b></li>\n                                </ul>\n                            </li>\n                            <li>Assam Tea</li>\n                        </ol>\n                    </li>\n                    <li>Green tea</li>\n                </ol>\n            </li>\n            <li>Milk\n                <ol>\n                    <li>Cow Milk</li>\n                    <li>Soy Milk</li>\n                </ol>\n            </li>\n        </ul>\n        <br>\n        <table>\n            <tr>\n                <th>Country</th>\n                <th>Capital</th>\n            </tr>\n            <tr>\n                <td>India</td>\n                <td>New Delhi</td>\n            </tr>\n            <tr>\n                <td>United States of America</td>\n                <td>Washington DC</td>\n            </tr>\n            <tr>\n                <td>Bolivia</td>\n                <td>\n                    <ol>\n                        <li>Sucre</li>\n                        <li>La Paz</li>\n                    </ol>\n                </td>\n            </tr>\n        </table>\n\n        <div class=\"page-break\" style=\"page-break-after: always\"></div>\n        <table align=\"center\" class=\"Table\">\n          <tbody>\n            <tr>\n              <td colspan=\"2\" rowspan=\"2\" style=\"border-bottom:none; width:249px; padding:5px 11px 5px 11px; border-top:none; border-right:1px solid black; border-left:none\" valign=\"top\">\n              <p style=\"margin-bottom:8px\"><span style=\"font-family:Arial,Helvetica,sans-serif;\"><span style=\"font-size:11pt\"><span style=\"line-height:12pt\">&nbsp;</span></span></span></p>\n              </td>\n              <td colspan=\"3\" style=\"border-bottom:1px solid black; width:374px; padding:5px 11px 5px 11px; background-color:gray; border-top:1px solid black; border-right:1px solid black; border-left:none\" valign=\"top\">\n              <p style=\"margin-bottom:8px\"><span style=\"font-family:Arial,Helvetica,sans-serif;\"><span style=\"font-size:11pt\"><span style=\"line-height:12pt\"><span style=\"color:black\">Example Header</span></span></span></span></p>\n              </td>\n            </tr>\n            <tr>\n              <td style=\"border-bottom:1px solid black; width:125px; padding:5px 11px 5px 11px; background-color:#d9d9d9; border-top:none; border-right:1px solid black; border-left:none\" valign=\"top\">\n              <p style=\"margin-bottom:8px\"><span style=\"font-family:Arial,Helvetica,sans-serif;\"><span style=\"font-size:11pt\"><span style=\"line-height:12pt\"><b><span style=\"font-size:10.0pt\"><span style=\"color:black\">Financial</span></span></b></span></span></span></p>\n              </td>\n              <td style=\"border-bottom:1px solid black; width:125px; padding:5px 11px 5px 11px; background-color:#d9d9d9; border-top:none; border-right:1px solid black; border-left:none\" valign=\"top\">\n              <p style=\"margin-bottom:8px\"><span style=\"font-family:Arial,Helvetica,sans-serif;\"><span style=\"font-size:11pt\"><span style=\"line-height:12pt\"><b><span style=\"font-size:10.0pt\"><span style=\"color:black\">Tech</span></span></b></span></span></span></p>\n              </td>\n              <td style=\"border-bottom:1px solid black; width:125px; padding:5px 11px 5px 11px; background-color:#d9d9d9; border-top:none; border-right:1px solid black; border-left:none\" valign=\"top\">\n              <p style=\"margin-bottom:8px\"><span style=\"font-family:Arial,Helvetica,sans-serif;\"><span style=\"font-size:11pt\"><span style=\"line-height:12pt\"><b><span style=\"font-size:10.0pt\"><span style=\"color:black\">Total Market</span></span></b></span></span></span></p>\n              </td>\n            </tr>\n            <tr>\n              <td rowspan=\"3\" style=\"border-bottom:none; width:125px; padding:5px 11px 5px 11px; background-color:gray; border-top:none; border-right:1px solid black; border-left:1px solid black\" valign=\"top\">\n              <p style=\"margin-bottom:8px\"><span style=\"font-family:Arial,Helvetica,sans-serif;\"><span style=\"font-size:11pt\"><span style=\"line-height:12pt\"><b><span style=\"font-size:10.0pt\"><span style=\"color:black\">Level of Meme</span></span></b></span></span></span></p>\n              </td>\n              <td style=\"border-bottom:1px solid black; width:125px; padding:5px 11px 5px 11px; background-color:#d9d9d9; border-top:none; border-right:1px solid black; border-left:none\" valign=\"top\">\n              <p style=\"margin-bottom:8px\"><span style=\"font-family:Arial,Helvetica,sans-serif;\"><span style=\"font-size:11pt\"><span style=\"line-height:12pt\"><b><span style=\"font-size:10.0pt\"><span style=\"color:black\">High</span></span></b></span></span></span></p>\n              </td>\n              <td style=\"border-bottom:1px solid black; width:125px; padding:5px 11px 5px 11px; background-color:red; border-top:none; border-right:1px solid black; border-left:none\" valign=\"top\">\n              <p style=\"margin-bottom:8px\"><span style=\"font-family:Arial,Helvetica,sans-serif;\"><span style=\"font-size:11pt\"><span style=\"line-height:12pt\"><span style=\"color:black\">GUSH</span></span></span></span></p>\n              </td>\n              <td style=\"border-bottom:1px solid black; width:125px; padding:5px 11px 5px 11px; background-color:#ffc000; border-top:none; border-right:1px solid black; border-left:none\" valign=\"top\">\n              <p style=\"margin-bottom:8px\"><span style=\"font-family:Arial,Helvetica,sans-serif;\"><span style=\"font-size:11pt\"><span style=\"line-height:12pt\"><span style=\"color:black\">ARKK</span></span></span></span></p>\n              </td>\n              <td style=\"border-bottom:1px solid black; width:125px; padding:5px 11px 5px 11px; background-color:yellow; border-top:none; border-right:1px solid black; border-left:none\" valign=\"top\">\n              <p style=\"margin-bottom:8px\"><span style=\"font-family:Arial,Helvetica,sans-serif;\"><span style=\"font-size:11pt\"><span style=\"line-height:12pt\"><span style=\"color:black\">SPLX</span></span></span></span></p>\n              </td>\n            </tr>\n            <tr>\n              <td style=\"border-bottom:1px solid black; width:125px; padding:5px 11px 5px 11px; background-color:#d9d9d9; border-top:none; border-right:1px solid black; border-left:none\" valign=\"top\">\n              <p style=\"margin-bottom:8px\"><span style=\"font-family:Arial,Helvetica,sans-serif;\"><span style=\"font-size:11pt\"><span style=\"line-height:12pt\"><b><span style=\"font-size:10.0pt\"><span style=\"color:black\">Medium</span></span></b></span></span></span></p>\n              </td>\n              <td style=\"border-bottom:1px solid black; width:125px; padding:5px 11px 5px 11px; background-color:#ffc000; border-top:none; border-right:1px solid black; border-left:none\" valign=\"top\">\n              <p style=\"margin-bottom:8px\"><span style=\"font-family:Arial,Helvetica,sans-serif;\"><span style=\"font-size:11pt\"><span style=\"line-height:12pt\"><span style=\"color:black\">[̲̅$̲̅(̲̅ ͡&deg; ͜ʖ ͡&deg;̲̅)̲̅$̲̅]</span></span></span></span></p>\n              </td>\n              <td style=\"border-bottom:1px solid black; width:125px; padding:5px 11px 5px 11px; background-color:yellow; border-top:none; border-right:1px solid black; border-left:none\" valign=\"top\">\n              <p style=\"margin-bottom:8px\"><span style=\"font-family:Arial,Helvetica,sans-serif;\"><span style=\"font-size:11pt\"><span style=\"line-height:12pt\"><span style=\"color:black\">TQQQ</span></span></span></span></p>\n              </td>\n              <td style=\"border-bottom:1px solid black; width:125px; padding:5px 11px 5px 11px; background-color:#92d050; border-top:none; border-right:1px solid black; border-left:none\" valign=\"top\">\n              <p style=\"margin-bottom:8px\"><span style=\"font-family:Arial,Helvetica,sans-serif;\"><span style=\"font-size:11pt\"><span style=\"line-height:12pt\"><span style=\"color:black\">( ͡~ ͜ʖ ͡&deg;)</span></span></span></span></p>\n              </td>\n            </tr>\n            <tr>\n              <td style=\"border-bottom:1px solid black; width:125px; padding:5px 11px 5px 11px; background-color:#d9d9d9; border-top:none; border-right:1px solid black; border-left:none\" valign=\"top\">\n              <p style=\"margin-bottom:8px\"><span style=\"font-family:Arial,Helvetica,sans-serif;\"><span style=\"font-size:11pt\"><span style=\"line-height:12pt\"><b><span style=\"font-size:10.0pt\"><span style=\"color:black\">Low</span></span></b></span></span></span></p>\n              </td>\n              <td style=\"border-bottom:1px solid black; width:125px; padding:5px 11px 5px 11px; background-color:yellow; border-top:none; border-right:1px solid black; border-left:none\" valign=\"top\">\n              <p style=\"margin-bottom:8px\"><span style=\"font-family:Arial,Helvetica,sans-serif;\"><span style=\"font-size:11pt\"><span style=\"line-height:12pt\"><span style=\"color:black\">( ◔ ʖ̯ ◔ )</span></span></span></span></p>\n              </td>\n              <td style=\"border-bottom:1px solid black; width:125px; padding:5px 11px 5px 11px; background-color:#92d050; border-top:none; border-right:1px solid black; border-left:none\" valign=\"top\">\n              <p style=\"margin-bottom:8px\"><span style=\"font-family:Arial,Helvetica,sans-serif;\"><span style=\"font-size:11pt\"><span style=\"line-height:12pt\"><span style=\"color:black\">QQQ</span></span></span></span></p>\n              </td>\n              <td style=\"border-bottom:1px solid black; width:125px; padding:5px 11px 5px 11px; background-color:#00b050; border-top:none; border-right:1px solid black; border-left:none\" valign=\"top\">\n              <p style=\"margin-bottom:8px\"><span style=\"font-family:Arial,Helvetica,sans-serif;\"><span style=\"font-size:11pt\"><span style=\"line-height:12pt\"><span style=\"color:black\">SPY</span></span></span></span></p>\n              </td>\n            </tr>\n          </tbody>\n        </table>\n    </body>\n</html>`;\n\n(async () => {\n  const fileBuffer = await HTMLtoDOCX(htmlString, null, {\n    table: { row: { cantSplit: true } },\n    footer: true,\n    pageNumber: true,\n  });\n\n  fs.writeFile(filePath, fileBuffer, (error) => {\n    if (error) {\n      console.log('Docx file creation failed');\n      return;\n    }\n    console.log('Docx file created successfully');\n  });\n})();\n",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "Developer need",
      "display": "Building Word documents in code",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "Why choose docx",
      "display": "code-defined document sections and content",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "Developer need in introduction",
      "display": "building Word documents in code",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "When to consider docxtemplater",
      "display": "people should edit the source template in Word",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Developer need",
      "display": "Templates edited in Word",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Why choose docxtemplater",
      "display": "templates that non-programmers can edit",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Developer need in introduction",
      "display": "templates edited in Word",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "When to consider docx",
      "display": "application code should define the document structure",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Developer need",
      "display": "Converting existing HTML",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Why choose html-to-docx",
      "display": "HTML strings as document input",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Developer need in introduction",
      "display": "converting existing HTML",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Developer need",
      "display": "Reading Word documents for indexing",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Why choose mammoth",
      "display": "plain-text extraction from existing files",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Developer need in introduction",
      "display": "reading Word documents for indexing",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Page introduction",
      "display": "JavaScript Word document libraries let application developers read or create Word documents.",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "FAQ: Which JavaScript DOCX library should I choose?",
      "display": "docx generates Word documents in JavaScript and TypeScript.",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "FAQ: Which JavaScript DOCX library should I choose?",
      "display": "Docxtemplater fills existing document templates.",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "FAQ: Which JavaScript DOCX library should I choose?",
      "display": "html-to-docx converts HTML strings into Word documents.",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "FAQ: Which JavaScript DOCX library should I choose?",
      "display": "Mammoth extracts text or converts Word documents to HTML.",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "FAQ: Can docx modify an existing Word template?",
      "display": "patchDocument replaces placeholders while preserving the surrounding document structure.",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "FAQ: Can docx convert HTML without a separate converter?",
      "display": "htmlToContent converts HTML into native Word paragraphs and tables.",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "FAQ: Can docx convert HTML without a separate converter?",
      "display": "Supply non-data-URL image data through its images option.",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "FAQ: Does Docxtemplater include images and HTML in its core package?",
      "display": "Its Image and HTML modules are listed among paid modules.",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "FAQ: Can html-to-docx run directly in a browser?",
      "display": "The unscoped html-to-docx package states that direct browser use does not work.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "FAQ: Why do exported Word fonts change in LibreOffice or Word Online?",
      "display": "html-to-docx notes that these editors choose fonts rather than using its font table.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: Does Mammoth preserve Word table borders?",
      "display": "Mammoth ignores formatting of the table itself, including borders.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: Should Mammoth output be sanitized before embedding it?",
      "display": "Mammoth performs no sanitisation of source documents.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: Does docx export PDFs as well as Word files?",
      "display": "docx does not provide PDF export.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "Library name, mammoth",
      "display": "Mammoth",
      "asOf": "2026-11-20"
    },
    "F123": {
      "label": "Monthly downloads, mammoth",
      "display": "59.9M",
      "asOf": "2026-11-20"
    },
    "F124": {
      "label": "License, mammoth",
      "display": "BSD-2-Clause",
      "asOf": "2026-11-20"
    },
    "F125": {
      "label": "Package release, mammoth",
      "display": "1.13.0",
      "asOf": "2026-11-20"
    },
    "F126": {
      "label": "Package release date, mammoth",
      "display": "Sep 2026",
      "asOf": "2026-11-20"
    },
    "F127": {
      "label": "Install, mammoth",
      "display": "npm install mammoth",
      "asOf": "2026-11-20"
    },
    "F128": {
      "label": "Quickstart, mammoth",
      "display": "var mammoth = require(\"mammoth\");\n\nmammoth.convertToHtml({path: \"path/to/document.docx\"})\n    .then(function(result){\n        var html = result.value; // The generated HTML\n        var messages = result.messages; // Any messages, such as warnings during conversion\n    })\n    .catch(function(error) {\n        console.error(error);\n    });\n",
      "asOf": "2026-11-20"
    },
    "F129": {
      "label": "Repository stars, mammoth",
      "display": "6.3K",
      "asOf": "2026-11-20"
    },
    "F130": {
      "label": "Create DOCX content, mammoth",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F131": {
      "label": "Word template input, mammoth",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F132": {
      "label": "Document workflow, mammoth",
      "display": "Read existing Word documents into semantic HTML or raw text using style mappings; the publisher intentionally does not reproduce all visual styling.",
      "asOf": "2026-11-20"
    },
    "F133": {
      "label": "Runtime requirements, mammoth",
      "display": "{\"node\": \">=12.0.0\"}",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "Markdown conversion status, mammoth",
      "display": "The published package description mentions Markdown, but the current README marks Markdown support deprecated and recommends HTML generation followed by a separate converter.",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "Project function, mammoth",
      "display": "async function wordDocToText(file: Express.Multer.File): Promise<string> {\n  const buffer = await fs.promises.readFile(file.path);\n  /* Reject zip-bomb DOCX before mammoth's internal extractor runs.\n   * mammoth has no decompressed-size cap of its own; without this, a\n   * sub-1MB compressed bomb (~200x ratio) would block the event loop\n   * and spike RSS to ~1GB. See SEC review on PR #12934. */\n  await assertSafeZipSize(buffer, { name: file.originalname ?? 'docx' });\n  const { extractRawText } = await import('mammoth');\n  const rawText = await extractRawText({ buffer });\n  return rawText.value;\n}\n",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Project source file, mammoth",
      "display": "packages/api/src/files/documents/crud.ts",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "Project full_name, mammoth",
      "display": "LibreChat-AI/LibreChat",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Project stargazers_count, mammoth",
      "display": "47.2K",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Library name, docx",
      "display": "docx",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Monthly downloads, docx",
      "display": "43.4M",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "License, docx",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Package release, docx",
      "display": "9.15.4",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "Package release date, docx",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "Install, docx",
      "display": "npm install --save docx",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Quickstart, docx",
      "display": "import { Document, Packer, Paragraph, TextRun } from \"docx\";\nimport * as fs from \"fs\";\n\nconst doc = new Document({\n    sections: [\n        {\n            // Documents are organized into sections\n            children: [\n                new Paragraph({\n                    children: [new TextRun(\"Hello World!\")],\n                }),\n            ],\n        },\n    ],\n});\n\nPacker.toBuffer(doc).then((buffer) => {\n    fs.writeFileSync(\"My Document.docx\", buffer);\n});\n",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Repository stars, docx",
      "display": "6.0K",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "Create DOCX content, docx",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Word template input, docx",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Document workflow, docx",
      "display": "Create Word document sections/content/styles in code, then pack a DOCX buffer; patchDocument also supports explicitly mapped replacements in an existing Word file.",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Runtime requirements, docx",
      "display": "{\"node\": \">=16\"}",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Existing-document replacement, docx",
      "display": "patchDocument exposes explicit patch mappings for existing Word input; this is distinct from code-defined Document construction and dedicated template command languages.",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Project function, docx",
      "display": "public exportToWord = async (markdown: string, fileName: string, senderId?: string | null): Promise<boolean> => {\n    try {\n      // Dialog-first is perf-driven: canceling costs zero conversion, and the dialog\n      // opens without waiting on the markdown→docx conversion.\n      const dialogOptions = {\n        title: t('dialog.save_file'),\n        filters: [{ name: t('dialog.word_document'), extensions: ['docx'] }],\n        defaultPath: fileName\n      }\n      // Parented dialog avoids the unparented-save crash with Unicode names.\n      // Missing or destroyed caller window falls back to the unparented overload.\n      const candidate: BrowserWindow | undefined = senderId\n        ? application.get('WindowManager').getWindow(senderId)\n        : undefined\n      const parent = candidate && !candidate.isDestroyed() ? candidate : undefined\n      const { canceled, filePath } = parent\n        ? await dialog.showSaveDialog(parent, dialogOptions)\n        : await dialog.showSaveDialog(dialogOptions)\n      if (canceled || !filePath) {\n        return false\n      }\n\n      const [{ default: MarkdownIt }, docx] = await Promise.all([import('markdown-it'), import('docx')])\n      const elements = this.convertMarkdownToDocxElements(markdown, new MarkdownIt(), docx)\n\n      const doc = new docx.Document({\n        styles: {\n          paragraphStyles: [\n            {\n              id: 'Normal',\n              name: 'Normal',\n              run: {\n                size: 24,\n                font: 'Arial'\n              }\n            }\n          ]\n        },\n        sections: [\n          {\n            properties: {},\n            children: elements\n          }\n        ]\n      })\n\n      const buffer = await docx.Packer.toBuffer(doc)\n\n      await fs.promises.writeFile(filePath, buffer)\n      logger.debug('Document exported successfully')\n      return true\n    } catch (error) {\n      logger.error('Export to Word failed:', error as Error)\n      throw error\n    }\n  }\n",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Project source file, docx",
      "display": "src/main/services/ExportService.ts",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Project full_name, docx",
      "display": "CherryHQ/cherry-studio",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "Project stargazers_count, docx",
      "display": "53.6K",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Library name, docx-preview",
      "display": "docx-preview",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Monthly downloads, docx-preview",
      "display": "14.4M",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "License, docx-preview",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Package release, docx-preview",
      "display": "0.4.1",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Package release date, docx-preview",
      "display": "Sep 2026",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Install, docx-preview",
      "display": "npm install docx-preview",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Quickstart, docx-preview",
      "display": "<!--lib uses jszip-->\n<script src=\"https://unpkg.com/jszip/dist/jszip.min.js\"></script>\n<script src=\"docx-preview.min.js\"></script>\n<body>\n    <div id=\"container\"></div>\n\n<script>\n\n</script>\n</body>\n",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "Official description, docx-preview",
      "display": "Docx rendering library",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Quickstart source file, docx-preview",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Repository stars, docx-preview",
      "display": "2.2K",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Create DOCX content, docx-preview",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Word template input, docx-preview",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Document workflow, docx-preview",
      "display": "Render an existing DOCX into browser HTML, subject to HTML layout limits; not a new-DOCX content generator or template filler.",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Runtime requirements, docx-preview",
      "display": "{}",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Preview layout constraints, docx-preview",
      "display": "Publisher says rendering is limited by HTML capabilities and real-time page breaking is not implemented. Existing/manual document breaks and rendering options are separate from browser recalculation.",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Library name, docxtemplater",
      "display": "Docxtemplater",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Monthly downloads, docxtemplater",
      "display": "6.5M",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "License, docxtemplater",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Package release, docxtemplater",
      "display": "3.71.1",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Package release date, docxtemplater",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Install, docxtemplater",
      "display": "npm install --save docxtemplater pizzip",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "Quickstart, docxtemplater",
      "display": "const Docxtemplater = require(\"docxtemplater\");\nconst PizZip = require(\"pizzip\");\nconst fs = require(\"fs\");\nconst path = require(\"path\");\nconst content = fs.readFileSync(\n    path.resolve(__dirname, \"input.docx\"),\n    \"binary\"\n);\nconst zip = new PizZip(content);\nconst doc = new Docxtemplater(zip, {\n    paragraphLoop: true,\n    linebreaks: true,\n});\ndoc.render({\n    first_name: \"John\",\n    last_name: \"Doe\",\n    phone: \"+33666666\",\n    description: \"The Acme Product\",\n});\nconst buf = doc.toBuffer();\nfs.writeFileSync(path.resolve(__dirname, \"output.docx\"), buf);\n",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Repository stars, docxtemplater",
      "display": "3.7K",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "Create DOCX content, docxtemplater",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Word template input, docxtemplater",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "Document workflow, docxtemplater",
      "display": "Populate Word-authored placeholder/loop templates with data, with explicit parser/module extension points and PizZip packaging.",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Runtime requirements, docxtemplater",
      "display": "{\"node\": \">=0.10\"}",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Project function, docxtemplater",
      "display": "async function generateDoc(audit) {\n    var templatePath = `${__basedir}/../report-templates/${audit.template.name}.${audit.template.ext || 'docx'}`\n    var content = fs.readFileSync(templatePath, \"binary\");\n    \n    var zip = new PizZip(content);\n    \n    translate.setLocale(audit.language)\n    $t = translate.translate\n\n    var settings = await Settings.getAll();\n    var preppedAudit = await prepAuditData(audit, settings)\n\n    var opts = {};\n    // opts.centered = true;\n    opts.getImage = function(tagValue, tagName) {\n        if (tagValue !== \"undefined\") {\n            tagValue = tagValue.split(\",\")[1];\n            return Buffer.from(tagValue, 'base64');\n        }\n        // return fs.readFileSync(tagValue, {encoding: 'base64'});\n    }\n    opts.getSize = function(img, tagValue, tagName) {\n        if (img) {\n            var sizeObj = sizeOf.default(img);\n            var width = sizeObj.width;\n            var height = sizeObj.height;\n            if (tagName === \"company.logo_small\") {\n                var divider = sizeObj.height / 37;\n                height = 37;\n                width = Math.floor(sizeObj.width / divider);\n            }\n            else if (tagName === \"company.logo\") {\n                var divider = sizeObj.height / 250;\n                height = 250;\n                width = Math.floor(sizeObj.width / divider);\n                if (width > 400) {\n                    divider = sizeObj.width / 400;\n                    height = Math.floor(sizeObj.height / divider);\n                    width = 400;\n                }\n            }\n            else if (sizeObj.width > 600) {\n                var divider = sizeObj.width / 600;\n                width = 600;\n                height = Math.floor(sizeObj.height / divider);\n            }\n            return [width,height];\n        }\n        return [0,0];\n    }\n\n    if (settings.report.private.imageBorder && settings.report.private.imageBorderColor)\n        opts.border = settings.report.private.imageBorderColor.replace('#', '')\n\n    try {\n        var imageModule = new ImageModule(opts);\n    }\n    catch(err) {\n        console.log(err)\n    }\n    expressionParser.filters = {...reportFilters.expressions, ...reportFiltersCustom.expressions}   \n    var doc = new Docxtemplater(zip, {\n        parser: parser,\n        paragraphLoop: true,\n        modules: [imageModule],\n    });\n    try {\n        doc.render(preppedAudit);\n    }\n    catch (error) {\n        if (error.properties.id === 'multi_error') {\n            error.properties.errors.forEach(function(err) {\n                console.log(err);\n            });\n        }\n        else\n            console.log(error)\n        if (error.properties && error.properties.errors instanceof Array) {\n            const errorMessages = error.properties.errors.map(function (error) {\n                return `Explanation: ${error.properties.explanation}\\nScope: ${JSON.stringify(error.properties.scope).substring(0,142)}...`\n            }).join(\"\\n\\n\");\n            // errorMessages is a humanly readable message looking like this :\n            // 'The tag beginning with \"foobar\" is unopened'\n            throw `Template Error:\\n${errorMessages}`;\n        }\n        else {\n            throw error\n        }\n    }\n    var buf = doc.getZip().generate({type:\"nodebuffer\"});\n\n    if (shouldApplyDraftWatermark(audit, settings)) {\n        var watermarkText = resolveDraftWatermarkText(settings.reviews.public.draftWatermark, audit.language);\n        buf = applyDraftExport(buf, watermarkText);\n    }\n\n    return buf;\n}\n",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Project source file, docxtemplater",
      "display": "backend/src/lib/report-generator.js",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Project full_name, docxtemplater",
      "display": "pwndoc/pwndoc",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Project stargazers_count, docxtemplater",
      "display": "2.9K",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Library name, html-to-docx",
      "display": "html-to-docx",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Monthly downloads, html-to-docx",
      "display": "1.2M",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "License, html-to-docx",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "Package release, html-to-docx",
      "display": "1.8.0",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Package release date, html-to-docx",
      "display": "Mar 2023",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Install, html-to-docx",
      "display": "npm install html-to-docx file-saver",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Quickstart, html-to-docx",
      "display": "import HTMLtoDOCX from 'html-to-docx';\nimport { saveAs } from 'file-saver';\n\nconst fileBuffer = await HTMLtoDOCX(htmlString, null, {\n  table: { row: { cantSplit: true } },\n  footer: true,\n  pageNumber: true,\n});\n\nsaveAs(fileBuffer, 'html-to-docx.docx');\n",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Repository stars, html-to-docx",
      "display": "484",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "Create DOCX content, html-to-docx",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Word template input, html-to-docx",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Document workflow, html-to-docx",
      "display": "Convert supplied HTML, optional header/footer HTML, and document options into DOCX; public current version remains1.8.0, with browser/bundler prerequisites kept explicit.",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "Runtime requirements, html-to-docx",
      "display": "{}",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "Project function, html-to-docx",
      "display": "async function toDocx(md: string): Promise<ExportResult> {\n  const viaPandoc = pandocConvert(md, 'docx');\n  if (viaPandoc) return { buffer: viaPandoc, ext: 'docx', mime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', engine: 'pandoc' };\n  // JS 兜底:marked → html → html-to-docx\n  // @ts-expect-error html-to-docx 无类型声明文件\n  const HTMLtoDOCX = (await import('html-to-docx')).default as (html: string, header?: string | null, opts?: unknown) => Promise<Buffer | ArrayBuffer>;\n  const out = await HTMLtoDOCX(mdToHtml(md), null, { table: { row: { cantSplit: true } } });\n  const buffer = Buffer.isBuffer(out) ? out : Buffer.from(out as ArrayBuffer);\n  return { buffer, ext: 'docx', mime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', engine: 'html-to-docx' };\n}\n",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Project source file, html-to-docx",
      "display": "src/export/convert.ts",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Project full_name, html-to-docx",
      "display": "jnMetaCode/agency-orchestrator",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Project stargazers_count, html-to-docx",
      "display": "2.5K",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Library name, @turbodocx/html-to-docx",
      "display": "@turbodocx/html-to-docx",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Monthly downloads, @turbodocx/html-to-docx",
      "display": "1.0M",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "License, @turbodocx/html-to-docx",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Package release, @turbodocx/html-to-docx",
      "display": "1.23.3",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "Package release date, @turbodocx/html-to-docx",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Install, @turbodocx/html-to-docx",
      "display": "npm install @turbodocx/html-to-docx",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Quickstart, @turbodocx/html-to-docx",
      "display": "import HtmlToDocx from \"@turbodocx/html-to-docx\";\n\nconst htmlString = `<!DOCTYPE html>\n    <html lang=\"en\">\n        <head>\n            <meta charset=\"UTF-8\" />\n            <title>Document</title>\n        </head>\n        <body>\n            <h1>Hello world</h1>\n        </body>\n    </html>`;\n\nconst docx = await HtmlToDocx(htmlString);\n",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Official description, @turbodocx/html-to-docx",
      "display": "HTML to DOCX converter",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Quickstart source file, @turbodocx/html-to-docx",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Repository stars, @turbodocx/html-to-docx",
      "display": "234",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Create DOCX content, @turbodocx/html-to-docx",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Word template input, @turbodocx/html-to-docx",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "Document workflow, @turbodocx/html-to-docx",
      "display": "A separately maintained HTML-to-DOCX fork with typed conversion, table, header/footer, and image-processing configuration in current1.23.3. It is not a second name for the original package.",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Runtime requirements, @turbodocx/html-to-docx",
      "display": "{\"node\": \">=20.0.0\"}",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Image-processing controls, @turbodocx/html-to-docx",
      "display": "Published DocumentOptions includes retry counts, download timeouts, size/cache limits, and SVG handling modes convert/native/auto.",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Project function, @turbodocx/html-to-docx",
      "display": "export async function createInitialDocxBuffer(\n  filename: string,\n  content?: InitialDocxContent,\n): Promise<Buffer> {\n  if (!content?.value.trim()) return createBlankDocxBuffer(filename);\n  if (content.kind === \"plain-text\") return createPlainTextDocx(filename, content.value);\n  const title = filename.replace(/\\.[^.]+$/, \"\") || \"Untitled Document\";\n  const html = `<!DOCTYPE html>\n<html>\n<head><meta charset=\"UTF-8\"><title>${title}</title></head>\n<body>${content.value}</body>\n</html>`;\n  try {\n    const output = await HTMLtoDOCX(html, null, {\n      title,\n      creator: \"Prism\",\n      font: \"Calibri\",\n      fontSize: 22,\n      table: { row: { cantSplit: true } },\n      footer: true,\n      pageNumber: true,\n    });\n    const buffer = await outputBuffer(output);\n    if (!buffer) throw new Error(\"Document conversion returned no bytes\");\n    return buffer;\n  } catch (error) {\n    throw new DocxConversionError({ cause: error });\n  }\n}\n",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Project source file, @turbodocx/html-to-docx",
      "display": "backend/src/modules/documents/documents.docx.ts",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Project full_name, @turbodocx/html-to-docx",
      "display": "FuturixAI-and-Quantum-Works/Prism-Legal-OS",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Project stargazers_count, @turbodocx/html-to-docx",
      "display": "227",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Library name, docx-templates",
      "display": "docx-templates",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Monthly downloads, docx-templates",
      "display": "555.7K",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "License, docx-templates",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Package release, docx-templates",
      "display": "4.15.0",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Package release date, docx-templates",
      "display": "Dec 2025",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Install, docx-templates",
      "display": "npm install docx-templates",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Quickstart, docx-templates",
      "display": "import createReport from 'docx-templates';\nimport fs from 'fs';\n\nconst template = fs.readFileSync('myTemplate.docx');\n\nconst buffer = await createReport({\n  template,\n  data: {\n    name: 'John',\n    surname: 'Appleseed',\n  },\n});\n\nfs.writeFileSync('report.docx', buffer)\n",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Official description, docx-templates",
      "display": "Template-based docx report creation",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Quickstart source file, docx-templates",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Repository stars, docx-templates",
      "display": "1.1K",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Create DOCX content, docx-templates",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Word template input, docx-templates",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Document workflow, docx-templates",
      "display": "Generate reports from Word templates containing JavaScript-capable commands, data, and additional context; supports both Node and browser binary workflows.",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Runtime requirements, docx-templates",
      "display": "{\"node\": \">=6\"}",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Library name, easy-template-x",
      "display": "easy-template-x",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Monthly downloads, easy-template-x",
      "display": "233.8K",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "License, easy-template-x",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "Package release, easy-template-x",
      "display": "8.1.0",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Package release date, easy-template-x",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Install, easy-template-x",
      "display": "npm install easy-template-x",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Quickstart, easy-template-x",
      "display": "import * as fs from \"fs\";\nimport { TemplateHandler } from \"easy-template-x\";\n\n// 1. read template file\nconst templateFile = fs.readFileSync(\"myTemplate.docx\");\n\n// 2. process the template\nconst data = {\n    posts: [\n        { author: \"Anakin\", text: \"Luke, I am\\nyour father.\" },\n        { author: \"Luke\", text: \"No! That's impossible!\" }\n    ]\n};\n\nconst handler = new TemplateHandler();\nconst doc = await handler.process(templateFile, data);\n\n// 3. save output\nfs.writeFileSync(\"myTemplate - output.docx\", doc);\n",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Official description, easy-template-x",
      "display": "Generate docx documents from templates, in Node or in the browser.",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Quickstart source file, easy-template-x",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "Repository stars, easy-template-x",
      "display": "537",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "Create DOCX content, easy-template-x",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "Word template input, easy-template-x",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "Document workflow, easy-template-x",
      "display": "Process a Word template binary with structured data through TemplateHandler; official Node and browser examples use the same process operation.",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "Runtime requirements, easy-template-x",
      "display": "{\"node\": \">=20\"}",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "Project function, easy-template-x",
      "display": "public async DocxTemplateFill(\n  pcfContext: ComponentFramework.Context<IInputs>\n): Promise<string> {\n  var params = pcfContext.parameters;\n  var dataSet = pcfContext.parameters.templateData?.raw || \"{}\";\n  var dataSetObject = JSON.parse(dataSet);    \n  await this.updateImagesToArrayBuffer(dataSetObject);\n\n  const handler = new TemplateHandler();    \n  const docxFilled = await handler.process(\n    this.convertStringToArray(params.docxTemplate.raw!),\n    dataSetObject\n  );\n\n  return encode(docxFilled);\n}\n",
      "asOf": "2026-11-20"
    },
    "F251": {
      "label": "Project source file, easy-template-x",
      "display": "DocxTemplatesCanvas/DocxTemplatesCanvas/index.ts",
      "asOf": "2026-11-20"
    },
    "F252": {
      "label": "Project full_name, easy-template-x",
      "display": "rwilson504/PCFControls",
      "asOf": "2026-11-20"
    },
    "F253": {
      "label": "Project stargazers_count, easy-template-x",
      "display": "192",
      "asOf": "2026-11-20"
    },
    "F254": {
      "label": "What, docx-preview",
      "display": "Renders a Word document into HTML inside a web page, keeping HTML semantics where it can.",
      "asOf": "2026-11-17"
    },
    "F255": {
      "label": "Strength lead, docx-preview",
      "display": "Renders headers and footers",
      "asOf": "2026-11-17"
    },
    "F256": {
      "label": "Strength body, docx-preview",
      "display": "Options turn the rendering of headers, footers, footnotes, and endnotes on or off.",
      "asOf": "2026-11-17"
    },
    "F257": {
      "label": "Watch out lead, docx-preview",
      "display": "Limited by what HTML can show",
      "asOf": "2026-11-17"
    },
    "F258": {
      "label": "Watch out body, docx-preview",
      "display": "The page renders as HTML rather than as an image of the Word layout.",
      "asOf": "2026-11-17"
    },
    "F259": {
      "label": "Watch out lead, docx-preview breaks",
      "display": "No real-time page breaking",
      "asOf": "2026-11-17"
    },
    "F260": {
      "label": "Watch out body, docx-preview breaks",
      "display": "Insert manual page breaks wherever the pages must split.",
      "asOf": "2026-11-17"
    },
    "F261": {
      "label": "What, turbodocx",
      "display": "Converts HTML into Word documents in Node.js without a headless browser or external binaries.",
      "asOf": "2026-11-17"
    },
    "F262": {
      "label": "Strength lead, turbodocx",
      "display": "Actively maintained fork",
      "asOf": "2026-11-17"
    },
    "F263": {
      "label": "Strength body, turbodocx",
      "display": "TurboDocx continues the original html-to-docx project with the help of its contributors.",
      "asOf": "2026-11-17"
    },
    "F264": {
      "label": "Watch out lead, turbodocx",
      "display": "SVG conversion needs Node.js",
      "asOf": "2026-11-17"
    },
    "F265": {
      "label": "Watch out body, turbodocx",
      "display": "In the browser, SVG images embed natively and need a recent Office release to display.",
      "asOf": "2026-11-17"
    },
    "F266": {
      "label": "What, docx-templates",
      "display": "Creates reports from Word templates that hold commands, in Node.js or the browser.",
      "asOf": "2026-11-17"
    },
    "F267": {
      "label": "Strength lead, docx-templates",
      "display": "Templates run JavaScript",
      "asOf": "2026-11-17"
    },
    "F268": {
      "label": "Strength body, docx-templates",
      "display": "Commands in the template run JavaScript and insert its results into the document.",
      "asOf": "2026-11-17"
    },
    "F269": {
      "label": "Strength lead, docx-templates loops",
      "display": "Repeats table rows",
      "asOf": "2026-11-17"
    },
    "F270": {
      "label": "Strength body, docx-templates loops",
      "display": "FOR and END-FOR commands repeat content for each item, including table rows.",
      "asOf": "2026-11-17"
    },
    "F271": {
      "label": "Watch out lead, docx-templates",
      "display": "Template code runs untranspiled",
      "asOf": "2026-11-17"
    },
    "F272": {
      "label": "Watch out body, docx-templates",
      "display": "Write template code that the target browsers support without a transpiler.",
      "asOf": "2026-11-17"
    },
    "F273": {
      "label": "What, easy-template-x",
      "display": "Fills Word templates with data through tags, in Node.js or the browser.",
      "asOf": "2026-11-17"
    },
    "F274": {
      "label": "Strength lead, easy-template-x",
      "display": "Adds charts, images, and links",
      "asOf": "2026-11-17"
    },
    "F275": {
      "label": "Strength body, easy-template-x",
      "display": "Plugins insert images, hyperlinks, charts, and raw XML into a template.",
      "asOf": "2026-11-17"
    },
    "F276": {
      "label": "Strength lead, easy-template-x loops",
      "display": "Repeats rows and lists",
      "asOf": "2026-11-17"
    },
    "F277": {
      "label": "Strength body, easy-template-x loops",
      "display": "A loop tag repeats text, table rows, table columns, or list items.",
      "asOf": "2026-11-17"
    },
    "F278": {
      "label": "Watch out lead, easy-template-x",
      "display": "Loops need paired tags",
      "asOf": "2026-11-17"
    },
    "F279": {
      "label": "Watch out body, easy-template-x",
      "display": "Mark each loop with an opening tag that starts with # and a closing tag that starts with a slash.",
      "asOf": "2026-11-17"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best JavaScript DOCX libraries docx Docxtemplater html-to-docx Mammoth code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
