docx-parser-5c
Advanced tools
Comparing version 1.0.6 to 1.0.7
{ | ||
"name": "docx-parser-5c", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Javascript port of python-docx.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -8,3 +8,4 @@ /* | ||
// import * as fs from 'browserify-fs'; | ||
let AdmZip = require('adm-zip'); | ||
// let AdmZip = require('adm-zip'); | ||
import * as JSZip from 'jszip'; | ||
let {is_string} = require('./compat'); | ||
@@ -93,6 +94,8 @@ let {CONTENT_TYPES_URI} = require('./packuri'); | ||
constructor(pkg_file) { | ||
if(pkg_file instanceof ArrayBuffer){ | ||
pkg_file = Buffer.from(pkg_file); | ||
} | ||
this._zipf = new AdmZip(pkg_file); | ||
this._zipf = new JSZip(); | ||
if (pkg_file instanceof ArrayBuffer) { | ||
this._zipf.loadAsync(pkg_file); | ||
} else { | ||
this._zipf.loadAsync(pkg_file); | ||
} | ||
} | ||
@@ -136,3 +139,3 @@ blob_for(pack_uri, xml=false) { | ||
this.pkg_file = pkg_file; | ||
this._zipf = new AdmZip(); | ||
this._zipf = new JSZip(); | ||
} | ||
@@ -139,0 +142,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1682753
14462