Socket
Book a DemoInstallSign in
Socket

@forthlaw/docx

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forthlaw/docx

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

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

@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.

FAQs

Package last updated on 11 Apr 2022

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