🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@stll/docx-core

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stll/docx-core

Typed OOXML/DOCX document model with parsing, validation, and serialization, plus a legal-source compiler that produces DOCX packages.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@stll/docx-core

A typed OOXML/DOCX document model with parsing, validation, and serialization.

The package exposes a structured document model (paragraphs, runs, tables, styles, section properties) together with the tools to produce and check DOCX packages, plus a legal-source compiler that turns a plain legal draft into that model or a finished DOCX file.

import { compileLegalSourceToDocx, validateDocxPackage } from "@stll/docx-core";

const { docx } = await compileLegalSourceToDocx(source);
const result = await validateDocxPackage(docx);

The document model types are also available from a dedicated subpath:

import type { Document, Paragraph, Run } from "@stll/docx-core/model";

Install

bun add @stll/docx-core

Exports

  • . — the document model types, the legal-source compiler (parseLegalSource, compileLegalSourceToDocument, compileLegalSourceToDocx, validateLegalDraft), DOCX serialization (serializeDocumentToDocx), and validation (validateDocxPackage, validateDocumentModel, assertValidDocumentModel).
  • ./model — the document model types only.

License

Apache-2.0

Keywords

document-model

FAQs

Package last updated on 29 Jun 2026

Did you know?

Socket

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.

Install

Related posts