diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-01-29 11:24:41 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-01-29 11:24:41 +0000 |
| commit | 12b17703df082b259e55e1ec36a4fbd49d356f61 (patch) | |
| tree | b089a8240987e9b255ba1d841e1df14966ee2e52 /README.md | |
| parent | 61d1492d46d58913db4607aed5b6dc9d0c88f3a9 (diff) | |
Remove use of .done() in README
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 |
