aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2023-01-29 11:24:41 +0000
committerMichael Williamson <mike@zwobble.org>2023-01-29 11:24:41 +0000
commit12b17703df082b259e55e1ec36a4fbd49d356f61 (patch)
treeb089a8240987e9b255ba1d841e1df14966ee2e52 /README.md
parent61d1492d46d58913db4607aed5b6dc9d0c88f3a9 (diff)
Remove use of .done() in README
Diffstat (limited to 'README.md')
-rw-r--r--README.md8
1 files changed, 6 insertions, 2 deletions
diff --git a/README.md b/README.md
index ad7ad69..c477dad 100644
--- a/README.md
+++ b/README.md
@@ -143,7 +143,9 @@ mammoth.convertToHtml({path: "path/to/document.docx"})
var html = result.value; // The generated HTML
var messages = result.messages; // Any messages, such as warnings during conversion
})
- .done();
+ .catch(function(error) {
+ console.error(error);
+ });
```
Note that `mammoth.convertToHtml` returns a [promise](http://promises-aplus.github.io/promises-spec/).
@@ -158,7 +160,9 @@ mammoth.extractRawText({path: "path/to/document.docx"})
var text = result.value; // The raw text
var messages = result.messages;
})
- .done();
+ .catch(function(error) {
+ console.error(error);
+ });
```
#### Custom style map