{"_id":"@benedicte/docx-merge","_rev":"7-690222b46bb3491fa610193241dd41eb","name":"@benedicte/docx-merge","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0-rc3":{"name":"@benedicte/docx-merge","version":"0.1.0-rc3","keywords":["docx","merge","typescript","nodejs","library","fast","microsoft word","document","office","xml","zip"],"author":{"name":"Benedicte Giraud"},"license":"MIT","_id":"@benedicte/docx-merge@0.1.0-rc3","maintainers":[{"name":"benedicte","email":"benegir@gmail.com"}],"dist":{"shasum":"87d356ea211e1084861c74d4bd3ea278d773c7a8","tarball":"https://registry.npmjs.org/@benedicte/docx-merge/-/docx-merge-0.1.0-rc3.tgz","fileCount":21,"integrity":"sha512-Qk7XAvkOdtsgpdNrGzXiDjmDS4/qK2a4mCj4OOsOOTyQaOMKNf8RAhtPG4eZ2TrK0V7mk9QMYl8iYvBIPgIgEg==","signatures":[{"sig":"MEQCIBQqa2sIPxFDcut8l7KDVWOeXOfZJjPPDGnaBJhrmOFhAiAp75GKwUWOeYzN17q7uEiRTPvTOYjLsbTiLQo0g5YXEg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":61781},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","exports":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"gitHead":"e412fd13febe54aa637cf891b25ce41b22e2b975","scripts":{"dev":"tsup --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","format":"prettier --write \"src/**/*.ts*\" ","lint:fix":"eslint src --ext .ts --fix","test:watch":"vitest","format:check":"prettier --check \"src/**/*.ts*\""},"_npmUser":{"name":"benedicte","email":"benegir@gmail.com"},"_npmVersion":"10.9.2","description":"A fast Node.js library written in TypeScript for merging two Microsoft Word (.docx) documents into one.","directories":{},"_nodeVersion":"22.15.0","dependencies":{"adm-zip":"^0.5.16","fast-xml-parser":"^5.2.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","eslint":"^9.26.0","vitest":"^3.1.2","globals":"^16.0.0","prettier":"^3.5.3","@eslint/js":"^9.26.0","@vitest/ui":"^3.1.2","typescript":"^5.8.3","@types/node":"^22.15.3","@types/adm-zip":"^0.5.7","typescript-eslint":"^8.31.1","eslint-config-prettier":"^10.1.2","eslint-plugin-prettier":"^5.3.1","@typescript-eslint/parser":"^8.31.1","@typescript-eslint/eslint-plugin":"^8.31.1"},"_npmOperationalInternal":{"tmp":"tmp/docx-merge_0.1.0-rc3_1746482049736_0.9661792716990742","host":"s3://npm-registry-packages-npm-production"}},"0.1.0-rc4":{"name":"@benedicte/docx-merge","version":"0.1.0-rc4","keywords":["docx","merge","typescript","nodejs","library","fast","microsoft word","document","office","xml","zip"],"author":{"name":"Benedicte Giraud"},"license":"MIT","_id":"@benedicte/docx-merge@0.1.0-rc4","maintainers":[{"name":"benedicte","email":"benegir@gmail.com"}],"dist":{"shasum":"3ebed94ea4c0fbd10958303e256f55f0a1cb46aa","tarball":"https://registry.npmjs.org/@benedicte/docx-merge/-/docx-merge-0.1.0-rc4.tgz","fileCount":5,"integrity":"sha512-qzeyUHNy3lmWiOsRAmVXkWl/0AeJua00G9uz9LfcGhrMsJt5/rYm+UyKcKbNH3HMW3r7Iz+jsJJAT4EguLfjyQ==","signatures":[{"sig":"MEUCIA0RPgiUy4hgvkhSx8a1p7zjQs9amuwtUn4bnEIaIXYKAiEA3cP7DSRmAEGwwLHt0lKD3TZv/yPtdMVdnq0L2p465qw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17256},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","exports":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"gitHead":"7fe11771126f5062a564a891bed57765fc00af32","scripts":{"dev":"tsup --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","format":"prettier --write \"src/**/*.ts*\" ","lint:fix":"eslint src --ext .ts --fix","test:watch":"vitest","format:check":"prettier --check \"src/**/*.ts*\""},"_npmUser":{"name":"benedicte","email":"benegir@gmail.com"},"_npmVersion":"10.9.2","description":"A fast Node.js library written in TypeScript for merging two Microsoft Word (.docx) documents into one.","directories":{},"_nodeVersion":"22.15.0","dependencies":{"adm-zip":"^0.5.16","fast-xml-parser":"^5.2.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","eslint":"^9.26.0","vitest":"^3.1.2","globals":"^16.0.0","prettier":"^3.5.3","@eslint/js":"^9.26.0","@vitest/ui":"^3.1.2","typescript":"^5.8.3","@types/node":"^22.15.3","@types/adm-zip":"^0.5.7","typescript-eslint":"^8.31.1","eslint-config-prettier":"^10.1.2","eslint-plugin-prettier":"^5.3.1","@typescript-eslint/parser":"^8.31.1","@typescript-eslint/eslint-plugin":"^8.31.1"},"_npmOperationalInternal":{"tmp":"tmp/docx-merge_0.1.0-rc4_1746482595091_0.9542335376092816","host":"s3://npm-registry-packages-npm-production"}},"0.1.0-rc5":{"name":"@benedicte/docx-merge","version":"0.1.0-rc5","keywords":["docx","merge","typescript","nodejs","library","fast","microsoft word","document","office","xml","zip"],"author":{"name":"Benedicte Giraud"},"license":"MIT","_id":"@benedicte/docx-merge@0.1.0-rc5","maintainers":[{"name":"benedicte","email":"benegir@gmail.com"}],"dist":{"shasum":"a8059d2b37502e49cebc80b816fa052a0b9b483b","tarball":"https://registry.npmjs.org/@benedicte/docx-merge/-/docx-merge-0.1.0-rc5.tgz","fileCount":5,"integrity":"sha512-TQAP15mXzECvFKDfI+yg18fZM7JXb+PXJZP9iSP20khDfH8S+l4oMHTzRAZ36SJxva2uqjJwujAFIDHcUwFeCw==","signatures":[{"sig":"MEUCIQD+I/8KNdWkYbh5uJx5APIZT3+DZxBGOxwVevsNCkgrxAIgHJIMKV8EYDzD3cDb+RvbMWki5qcGKpxpmpoYFacZ+D0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17236},"main":"index.cjs","type":"module","types":"index.d.ts","exports":{"import":"./index.cjs","require":"./index.cjs"},"gitHead":"948f9f5d84651516d4d636b5ff128967c991a35b","scripts":{"dev":"tsup --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","format":"prettier --write \"src/**/*.ts*\" ","lint:fix":"eslint src --ext .ts --fix","test:watch":"vitest","format:check":"prettier --check \"src/**/*.ts*\""},"_npmUser":{"name":"benedicte","email":"benegir@gmail.com"},"_npmVersion":"10.9.2","description":"A fast Node.js library written in TypeScript for merging two Microsoft Word (.docx) documents into one.","directories":{},"_nodeVersion":"22.15.0","dependencies":{"adm-zip":"^0.5.16","fast-xml-parser":"^5.2.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","eslint":"^9.26.0","vitest":"^3.1.2","globals":"^16.0.0","prettier":"^3.5.3","@eslint/js":"^9.26.0","@vitest/ui":"^3.1.2","typescript":"^5.8.3","@types/node":"^22.15.3","@types/adm-zip":"^0.5.7","typescript-eslint":"^8.31.1","eslint-config-prettier":"^10.1.2","eslint-plugin-prettier":"^5.3.1","@typescript-eslint/parser":"^8.31.1","@typescript-eslint/eslint-plugin":"^8.31.1"},"_npmOperationalInternal":{"tmp":"tmp/docx-merge_0.1.0-rc5_1746482845843_0.07550079381363539","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@benedicte/docx-merge","version":"0.1.0","keywords":["docx","merge","typescript","nodejs","library","fast","microsoft word","document","office","xml","zip"],"author":{"name":"Benedicte Giraud"},"license":"MIT","_id":"@benedicte/docx-merge@0.1.0","maintainers":[{"name":"benedicte","email":"benegir@gmail.com"}],"dist":{"shasum":"1b87fef39ba2ad61756e74275d057269abe8cb76","tarball":"https://registry.npmjs.org/@benedicte/docx-merge/-/docx-merge-0.1.0.tgz","fileCount":5,"integrity":"sha512-EYCUn6yVyjDXqLqXyXm5FateLxkxCKEn3xBa+dsyIaeEWwJIHTpI79vE52XoMmgq/6XEicNZRcpm3OEfnp+jIQ==","signatures":[{"sig":"MEYCIQCfM2sGo3hU5iCEJAQ+MzAqr2EUptW93kXjGsBmWBxZnAIhAM3KGV/LBN4rWF3XLiQvbgufKxK1OoDzY2AD+XOr644w","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17232},"main":"index.cjs","type":"module","types":"index.d.ts","exports":{"import":"./index.cjs","require":"./index.cjs"},"gitHead":"948f9f5d84651516d4d636b5ff128967c991a35b","scripts":{"dev":"tsup --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","format":"prettier --write \"src/**/*.ts*\" ","lint:fix":"eslint src --ext .ts --fix","test:watch":"vitest","format:check":"prettier --check \"src/**/*.ts*\""},"_npmUser":{"name":"benedicte","email":"benegir@gmail.com"},"_npmVersion":"10.9.2","description":"A fast Node.js library written in TypeScript for merging two Microsoft Word (.docx) documents into one.","directories":{},"_nodeVersion":"22.15.0","dependencies":{"adm-zip":"^0.5.16","fast-xml-parser":"^5.2.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","eslint":"^9.26.0","vitest":"^3.1.2","globals":"^16.0.0","prettier":"^3.5.3","@eslint/js":"^9.26.0","@vitest/ui":"^3.1.2","typescript":"^5.8.3","@types/node":"^22.15.3","@types/adm-zip":"^0.5.7","typescript-eslint":"^8.31.1","eslint-config-prettier":"^10.1.2","eslint-plugin-prettier":"^5.3.1","@typescript-eslint/parser":"^8.31.1","@typescript-eslint/eslint-plugin":"^8.31.1"},"_npmOperationalInternal":{"tmp":"tmp/docx-merge_0.1.0_1746482936673_0.5383343782335763","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@benedicte/docx-merge","version":"0.1.1","keywords":["docx","merge","typescript","nodejs","library","fast","microsoft word","document","office","xml","zip"],"author":{"name":"Benedicte Giraud"},"license":"MIT","_id":"@benedicte/docx-merge@0.1.1","maintainers":[{"name":"benedicte","email":"benegir@gmail.com"}],"dist":{"shasum":"3fe2544e34a78cea49a5417c1c9b411cf3c7cdfc","tarball":"https://registry.npmjs.org/@benedicte/docx-merge/-/docx-merge-0.1.1.tgz","fileCount":6,"integrity":"sha512-y9qNQ798Xn1ryDiGs3OwIWMscvF+Alk/bcWxCGvfmkG8cSUDisex3piEVxu2g3yJSaI5giBd4SFjTNtZ7QtTgg==","signatures":[{"sig":"MEUCIQC22ESXEGMpLu0IG2SoZrJMEp5hIs90uHhvMEWFKomKOQIgR8XrSupSiXwX4e9n5YrXn/sq1tqzTXVyt8Fa8Q7a4Y4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19711},"main":"index.cjs","type":"module","types":"index.d.ts","exports":{"import":"./index.cjs","require":"./index.cjs"},"gitHead":"5f19129b19055f39b349a2f11a93e61feeb87793","scripts":{"dev":"tsup --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","format":"prettier --write \"src/**/*.ts*\" ","lint:fix":"eslint src --ext .ts --fix","test:watch":"vitest","format:check":"prettier --check \"src/**/*.ts*\""},"_npmUser":{"name":"benedicte","email":"benegir@gmail.com"},"_npmVersion":"10.9.2","description":"A fast Node.js library written in TypeScript for merging two Microsoft Word (.docx) documents into one.","directories":{},"_nodeVersion":"22.15.0","dependencies":{"adm-zip":"^0.5.16","fast-xml-parser":"^5.2.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","eslint":"^9.26.0","vitest":"^3.1.2","globals":"^16.0.0","prettier":"^3.5.3","@eslint/js":"^9.26.0","@vitest/ui":"^3.1.2","typescript":"^5.8.3","@types/node":"^22.15.3","@types/adm-zip":"^0.5.7","typescript-eslint":"^8.31.1","eslint-config-prettier":"^10.1.2","eslint-plugin-prettier":"^5.3.1","@typescript-eslint/parser":"^8.31.1","@typescript-eslint/eslint-plugin":"^8.31.1"},"_npmOperationalInternal":{"tmp":"tmp/docx-merge_0.1.1_1746483135994_0.13687273683342416","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@benedicte/docx-merge","version":"0.1.2","keywords":["docx","merge","typescript","nodejs","library","fast","microsoft word","document","office","xml","zip"],"author":{"name":"Benedicte Giraud"},"license":"MIT","_id":"@benedicte/docx-merge@0.1.2","maintainers":[{"name":"benedicte","email":"benegir@gmail.com"}],"homepage":"https://github.com/BenedicteGiraud/docx-merge-js#readme","bugs":{"url":"https://github.com/BenedicteGiraud/docx-merge-js/issues"},"dist":{"shasum":"98654b3f8bbb1e8ddfea8c0803bf29d1f476ed19","tarball":"https://registry.npmjs.org/@benedicte/docx-merge/-/docx-merge-0.1.2.tgz","fileCount":6,"integrity":"sha512-as3801NrGGvPJui433WnhH72ViFw4aIEMWVEAvM0Uyx+ozMtqR+Ub4ct6yR+u37mPnpItmAUJVIL+wMWT9ZPVg==","signatures":[{"sig":"MEQCIHq1txpHV7MYBsJWlzLigC8MQtpiE+L0mQ0ttfzwnXfEAiAIkuk2HFH03/YdevPUMyHqHqGRjwsJsutZHbEaPY/daA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19987},"main":"index.cjs","type":"module","types":"index.d.ts","exports":{"import":"./index.cjs","require":"./index.cjs"},"gitHead":"df52c79c34e47adb47d317f9222ee27a1f8f19cd","scripts":{"dev":"tsup --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup","format":"prettier --write \"src/**/*.ts*\" ","lint:fix":"eslint src --ext .ts --fix","test:watch":"vitest","format:check":"prettier --check \"src/**/*.ts*\""},"_npmUser":{"name":"benedicte","email":"benegir@gmail.com"},"repository":{"url":"git+https://github.com/BenedicteGiraud/docx-merge-js.git","type":"git"},"_npmVersion":"10.9.2","description":"A fast Node.js library written in TypeScript for merging two Microsoft Word (.docx) documents into one.","directories":{},"_nodeVersion":"22.15.0","dependencies":{"adm-zip":"^0.5.16","fast-xml-parser":"^5.2.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","eslint":"^9.26.0","vitest":"^3.1.2","globals":"^16.0.0","prettier":"^3.5.3","@eslint/js":"^9.26.0","@vitest/ui":"^3.1.2","typescript":"^5.8.3","@types/node":"^22.15.3","@types/adm-zip":"^0.5.7","typescript-eslint":"^8.31.1","eslint-config-prettier":"^10.1.2","eslint-plugin-prettier":"^5.3.1","@typescript-eslint/parser":"^8.31.1","@typescript-eslint/eslint-plugin":"^8.31.1"},"_npmOperationalInternal":{"tmp":"tmp/docx-merge_0.1.2_1746552682111_0.851974978098754","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@benedicte/docx-merge","version":"0.1.3","description":"A fast Node.js library written in TypeScript for merging two Microsoft Word (.docx) documents into one.","bugs":{"url":"https://github.com/BenedicteGiraud/docx-merge-js/issues"},"homepage":"https://github.com/BenedicteGiraud/docx-merge-js#readme","repository":{"type":"git","url":"git+https://github.com/BenedicteGiraud/docx-merge-js.git"},"type":"module","main":"index.cjs","exports":{"import":"./index.cjs","require":"./index.cjs"},"types":"index.d.ts","scripts":{"build":"tsup","dev":"tsup --watch","format":"prettier --write \"src/**/*.ts*\" ","format:check":"prettier --check \"src/**/*.ts*\"","lint":"eslint src --ext .ts","lint:fix":"eslint src --ext .ts --fix","test":"vitest run","test:watch":"vitest"},"keywords":["docx","merge","typescript","nodejs","library","fast","microsoft word","document","office","xml","zip"],"author":{"name":"Benedicte Giraud"},"license":"MIT","devDependencies":{"@eslint/js":"^9.26.0","@types/adm-zip":"^0.5.7","@types/node":"^22.15.3","@typescript-eslint/eslint-plugin":"^8.31.1","@typescript-eslint/parser":"^8.31.1","@vitest/ui":"^3.1.2","eslint":"^9.26.0","eslint-config-prettier":"^10.1.2","eslint-plugin-prettier":"^5.3.1","globals":"^16.0.0","prettier":"^3.5.3","tsup":"^8.4.0","typescript":"^5.8.3","typescript-eslint":"^8.31.1","vitest":"^3.1.2"},"dependencies":{"adm-zip":"^0.5.16","fast-xml-parser":"^5.2.1"},"_id":"@benedicte/docx-merge@0.1.3","gitHead":"50a82f7facfc2b542286b215f6cbc22831e9983e","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-RfoOB5ql1S3drNxs1Ikx9yiW6KihyJn+m+8D1TM8pb+0VgHe5pMQ8eF4OnU4Esi1bfnprRITzwVw1j2XJZNUMA==","shasum":"ad7c8e177b97097c9d92978295dd310089efd735","tarball":"https://registry.npmjs.org/@benedicte/docx-merge/-/docx-merge-0.1.3.tgz","fileCount":6,"unpackedSize":21117,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFhVaGBHEhE30wvMl/n7Egv/hUAxFyB6rqtHYTelqy//AiBFEZ1MYja0dU4Es1nzDYfsBGLZ/KFXogCsLKuumzDYzg=="}]},"_npmUser":{"name":"benedicte","email":"benegir@gmail.com"},"directories":{},"maintainers":[{"name":"benedicte","email":"benegir@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/docx-merge_0.1.3_1757408364109_0.4267874559109912"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-05T21:54:09.649Z","modified":"2025-09-09T08:59:24.778Z","0.1.0-rc3":"2025-05-05T21:54:09.936Z","0.1.0-rc4":"2025-05-05T22:03:15.366Z","0.1.0-rc5":"2025-05-05T22:07:26.025Z","0.1.0":"2025-05-05T22:08:56.863Z","0.1.1":"2025-05-05T22:12:16.164Z","0.1.2":"2025-05-06T17:31:22.289Z","0.1.3":"2025-09-09T08:59:24.279Z"},"bugs":{"url":"https://github.com/BenedicteGiraud/docx-merge-js/issues"},"author":{"name":"Benedicte Giraud"},"license":"MIT","homepage":"https://github.com/BenedicteGiraud/docx-merge-js#readme","keywords":["docx","merge","typescript","nodejs","library","fast","microsoft word","document","office","xml","zip"],"repository":{"type":"git","url":"git+https://github.com/BenedicteGiraud/docx-merge-js.git"},"description":"A fast Node.js library written in TypeScript for merging two Microsoft Word (.docx) documents into one.","maintainers":[{"name":"benedicte","email":"benegir@gmail.com"}],"readme":"# 📄 docx-merge\n\nA fast and lightweight Node.js library written in TypeScript for merging two Microsoft Word (`.docx`) documents into one. Easily insert content at specific positions or based on placeholder patterns.\n\n---\n\n## 📦 Installation\n\nInstall via npm:\n\n```bash\nnpm install @benedicte/docx-merge\n```\n\n## 📚 Dependencies\n\nOnly two lightweight dependencies:\n\n- `adm-zip` – for extracting and rebuilding .docx (ZIP) files\n- `fast-xml-parser` – for parsing and modifying the DOCX XML content\n\n## 🛠️ API\n\n```ts\nmergeDocx(\n  sourcePathOrBuffer: string | Buffer,\n  contentPathOrBuffer: string | Buffer,\n  options: {\n    outputPath?: string;\n    pattern?: string;\n    insertStart?: boolean;\n    insertEnd?: boolean;\n  }\n): void | buffer\n```\n\nParameters:\n- `sourcePathOrBuffer` (*required*) – Path to the base `.docx` file or the Buffer\n- `contentPathOrBuffer` (*required*) – Path to the `.docx` file to insert into the base or the Buffer\n- `options`:\n    - `outputPath` – If provided, writes the merged document to this path. If omitted, returns a `Buffer`\n    - `pattern` – String pattern in the source file to replace with the inserted content\n    - `insertStart` – Insert the content at the **beginning** of the source file\n    - `insertEnd` – Insert the content at the **end** of the source file\n\n🔔 Note: You can combine pattern, insertStart, and insertEnd and at least one is required.\n\n## 💡 Examples\n\n### Replace a placeholder in the source DOCX\n\n```ts\nimport { mergeDocx } from \"@benedicte/docx-merge\";\n\nmergeDocx(\"./source.docx\", \"./table.docx\", {\n  outputPath: \"./output.docx\",\n  pattern: \"{{table}}\",\n});\n```\n\n### Get the merged result as a Buffer\n\n```ts\nimport { mergeDocx } from \"@benedicte/docx-merge\";\n\nconst buffer = mergeDocx(\"./source.docx\", \"./table.docx\", {\n  pattern: \"{{table}}\",\n});\n\n// Use buffer (e.g., send as a response in a server)\n```\n\n### Input files as Buffers \n\n```ts\nimport { mergeDocx } from \"@benedicte/docx-merge\";\n\nconst sourceBuffer = readFileSync('./source_file.docx');\nconst contentBuffer = readFileSync('./content_to_insert_in_source_file.docx');\n\nconst buffer = mergeDocx(sourceBuffer, contentBuffer, {\n  outputPath: \"./output.docx\",\n  pattern: \"{{table}}\",\n});\n```\n\n### Insert at the start of the document\n\n```ts\nimport { mergeDocx } from \"@benedicte/docx-merge\";\n\nmergeDocx(\"./source.docx\", \"./table.docx\", {\n  outputPath: \"./output.docx\",\n  insertStart: true,\n});\n```\n\n### Insert at the end of the document\n\n```ts\nimport { mergeDocx } from \"@benedicte/docx-merge\";\n\nmergeDocx(\"./source.docx\", \"./table.docx\", {\n  outputPath: \"./output.docx\",\n  insertEnd: true,\n});\n```\n\n## 🧪 Testing\n\nThis project uses Vitest for unit testing.\n\nTo run tests:\n\n```bash\nnpm run test\n```\n\n## 🔒 License\n\nMIT\n\n## 🤝 Contributing\n\nContributions, bug reports, and feature requests are welcome! Feel free to open an issue or submit a pull request.","readmeFilename":"README.md"}