# @forthlaw/docx

> ## Environment Variables ``` ``` ## Methods ``` generateDocument({ inputFilepath, contents, outputFilepath, dataset }) allDocumentFields({ inputFilepath, contents }) ``` ```inputFilepath``` and ```outputFilepath``` are both local filepaths to docx files,

Latest version **1.1.0** (published 2022-04-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @forthlaw/docx
pnpm add @forthlaw/docx
yarn add @forthlaw/docx
bun add @forthlaw/docx
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2022-04-11 |
| First published | 2022-03-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 18 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Haseeb Qureshi |
| Maintainers | hq |

## Links

- npm: https://www.npmjs.com/package/@forthlaw/docx
- Repository: https://github.com/forthlaw/forthlaw-docx
- Homepage: https://github.com/forthlaw/forthlaw-docx#readme
- Issues: https://github.com/forthlaw/forthlaw-docx/issues
- npm.io page: https://npm.io/package/@forthlaw/docx

## Dependencies (6)

- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [pizzip](https://npm.io/package/pizzip.md) ^3.1.1
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.0.1
- [mustache](https://npm.io/package/mustache.md) ^4.2.0
- [docxtemplater](https://npm.io/package/docxtemplater.md) ^3.29.0
- [angular-expressions](https://npm.io/package/angular-expressions.md) ^1.1.5

## Recent versions

- 1.1.0 (latest) — 2022-04-11
- 1.0.1 — 2022-03-18
- 1.0.0 — 2022-03-18

## README

# @forthlaw/docx

## Environment Variables
```
```
## Methods
```
generateDocument({ inputFilepath, contents, outputFilepath, dataset })
allDocumentFields({ inputFilepath, contents })
```
```inputFilepath``` and ```outputFilepath``` are both local filepaths to docx files, which both include the file extension. ```allDocumentFields``` provides a list of fields available in the input docx file, while ```generateDocument``` actually generates the new document with your provided dataset. ```dataset``` is a JS object of data. The existence of ```inputFilepath``` will force the script to load that filepath and override any ```contents``` that may be provided. Optionally, can simply provide ```contents```, for instance via S3 downloaded object, to simply use what's in memory, instead of keeping a tmp copy locally.

---
_Source: https://npm.io/package/@forthlaw/docx · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
