diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-03-06 11:06:43 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-03-06 11:06:43 +0000 |
| commit | f5b9b1c8632de9f2066bc45ded336d1e04e64aab (patch) | |
| tree | c2351d3052b1bb3fc0f0d470be1786100303113e /lib/docx-reader.js | |
| parent | 85e30f452001b5d02a617da21c72e12b206dfdb4 (diff) | |
Use bluebird instead of q for better performance
Diffstat (limited to 'lib/docx-reader.js')
| -rw-r--r-- | lib/docx-reader.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/docx-reader.js b/lib/docx-reader.js index a020ec8..e36ab10 100644 --- a/lib/docx-reader.js +++ b/lib/docx-reader.js @@ -1,6 +1,6 @@ exports.read = read; -var q = require("q"); +var promises = require("./promises"); var unzip = require("./unzip"); var readXmlFromZipFile = require("./office-xml-reader").readXmlFromZipFile; @@ -13,8 +13,8 @@ var readNumberingFromZipFile = require("./numbering-xml").readNumberingFromZipFi function read(options) { var docxFile = unzip.openZip(options); - return q.when(docxFile, function(docxFile) { - return q.all([ + return promises.when(docxFile).then(function(docxFile) { + return promises.all([ readRelationshipsFromZipFile(docxFile), readContentTypesFromZipFile(docxFile), readNumberingFromZipFile(docxFile), |
