
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
@office-open/docx
Advanced tools
Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.
Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.
# Install with npm
$ npm install @office-open/docx
# Install with pnpm
$ pnpm add @office-open/docx
import { Document, Paragraph, TextRun, Packer } from "@office-open/docx";
import { writeFileSync } from "node:fs";
const doc = new Document({
sections: [
{
children: [
new Paragraph({
children: [
new TextRun("Hello World"),
new TextRun({
text: " - Bold text",
bold: true,
}),
],
}),
],
},
],
});
const buffer = await Packer.toBuffer(doc);
writeFileSync("My Document.docx", buffer);
Check the demo folder for 100+ working examples covering every feature.
Performance comparison against original docx (9.6.1) package:
| Scenario | @office-open/docx | docx | Speedup |
|---|---|---|---|
| Simple document (2 paragraphs) | 25.7K ops/s | 5.3K ops/s | 4.84x |
| Styled paragraphs (20 paragraphs) | 24.2K ops/s | 4.4K ops/s | 5.45x |
| Table (10x5 cells) | 15.5K ops/s | 3.3K ops/s | 4.70x |
| Full featured (header/footer/headings/table/paragraphs) | 13.8K ops/s | 2.6K ops/s | 5.30x |
FAQs
Generate, parse, and patch .docx documents with a declarative TypeScript API
The npm package @office-open/docx receives a total of 1,265 weekly downloads. As such, @office-open/docx popularity was classified as popular.
We found that @office-open/docx demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.