From 8c5eda3f356e70db078d6ff99e2d47a75c3e43ed Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 18 Aug 2014 12:58:56 +0100 Subject: Clarify input docs --- README.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6e32dac..1e3a770 100644 --- a/README.md +++ b/README.md @@ -259,10 +259,14 @@ var options = { Converts the source document to HTML. * `input`: an object describing the source document. - While running on node.js, - to read the file found at `path`, pass in `{path: path}`; to read a node.js `Buffer` object, pass in `{buffer: buffer}`. - While running in the browser, - to read the file stored in an array buffer, pass in `{arrayBuffer: arrayBuffer}`. + On node.js, the following inputs are supported: + + * `{path: path}`, where `path` is the path to the .docx file. + * `{buffer: buffer}`, where `buffer` is a node.js Buffer containing a .docx file. + + In the browser, the following inputs are supported: + + * `{arrayBuffer: arrayBuffer}`, where `arrayBuffer` is an array buffer containing a .docx file. * `options` (optional): options for the conversion. May have the following properties: @@ -302,10 +306,14 @@ This will ignore all formatting in the document. Each paragraph is followed by two newlines. * `input`: an object describing the source document. - While running on node.js, - to read the file found at `path`, pass in `{path: path}`; to read a node.js `Buffer` object, pass in `{buffer: buffer}`. - While running in the browser, - to read the file stored in an array buffer, pass in `{arrayBuffer: arrayBuffer}`. + On node.js, the following inputs are supported: + + * `{path: path}`, where `path` is the path to the .docx file. + * `{buffer: buffer}`, where `buffer` is a node.js Buffer containing a .docx file. + + In the browser, the following inputs are supported: + + * `{arrayBuffer: arrayBuffer}`, where `arrayBuffer` is an array buffer containing a .docx file. * Returns a promise containing a result. This result has the following properties: -- cgit v1.2.3