From 12b17703df082b259e55e1ec36a4fbd49d356f61 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 29 Jan 2023 11:24:41 +0000 Subject: Remove use of .done() in README --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'README.md') 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 -- cgit v1.2.3