Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

docx-react

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docx-react

A JSX wrapper around docx for creating docx files.

  • 1.0.5
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

docx-react

A JSX wrapper around docx for creating docx files.

Install

npm install docx-react

Built with and Requires ESM

Usage

import docx from 'docx';
import { promises as fs } from 'fs';

const { Document, Packer } = docx;

const DocxDoc = () => (
  <section>
    <p thematicBreak spacing={{ before: 100 }}>
      Hello World!
    </p>

    <p>I just created a docx file using JSX!</p>
  </section>
);

(async function () {
  const doc = new Document({
    sections: [DocxDoc()],
  });

  const buffer = await Packer.toBuffer(doc);
  await fs.writeFile('file.docx', buffer);
})();

License

This project is licensed with the MIT license

Keywords

FAQs

Package last updated on 25 Nov 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc