🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@gzzhanghao/docx

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

@gzzhanghao/docx

A dead simple docx parser.

0.2.0
latest
Source
npm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

docx

A dead simple docx parser.

Usage

import parseDocx from '@gzzhanghao/docx'

parseDocx(buffer).then(async docx => {

  // access jszip object
  docx.zip

  // read file in docx
  // type: string | text | binarystring | base64 | array | uint8array | arraybuffer | nodebuffer
  await docx.readFile(path, type)

  // parse xml file in docx
  await docx.parseFile(path)

  // access to files in docx
  docx.relations // word/_rels/document.xml.rels
  docx.document  // word/document.xml
  docx.numbering // word/numbering.xml
  docx.comments  // word/comments.xml
  docx.styles    // word/styles.xml
})

FAQs

Package last updated on 13 Jul 2017

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