From 59bb581253f6d1baa308e136dac4ddb034486011 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Tue, 10 Nov 2020 12:44:26 +0000 Subject: [PATCH] docs(index): correct return jsdoc tag for parseoptions function --- API.md | 8 ++++---- src/index.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/API.md b/API.md index 624f5d7..0017f3b 100644 --- a/API.md +++ b/API.md @@ -8,7 +8,7 @@ ## Functions
-
parseOptions(options, acceptedOptions)Promise.<(string|Error)>
+
parseOptions(acceptedOptions, options)Promise.<(Array|Error)>

Check each option provided is valid and of the correct type.

@@ -60,15 +60,15 @@ UnRTF will use the directory of the original file to store embedded pictures. -## parseOptions(options, acceptedOptions) ⇒ Promise.<(string\|Error)> +## parseOptions(acceptedOptions, options) ⇒ Promise.<(Array\|Error)> Check each option provided is valid and of the correct type. **Kind**: global function -**Returns**: Promise.<(string\|Error)> - Promise of stdout string on resolve, or Error object on rejection. +**Returns**: Promise.<(Array\|Error)> - Promise of array of CLI arguments on resolve, or Error object on rejection. **Author**: Frazer Smith | Param | Type | Description | | --------------- | ------------------- | ------------------------------------------------ | -| options | object | Object containing options to pass to binary. | | acceptedOptions | object | Object containing options that a binary accepts. | +| options | object | Object containing options to pass to binary. | diff --git a/src/index.js b/src/index.js index d6f26d6..6d0fd85 100644 --- a/src/index.js +++ b/src/index.js @@ -10,9 +10,9 @@ const platform = os.platform(); /** * @author Frazer Smith * @description Check each option provided is valid and of the correct type. - * @param {object} options - Object containing options to pass to binary. * @param {object} acceptedOptions - Object containing options that a binary accepts. - * @returns {Promise} Promise of stdout string on resolve, or Error object on rejection. + * @param {object} options - Object containing options to pass to binary. + * @returns {Promise} Promise of array of CLI arguments on resolve, or Error object on rejection. */ function parseOptions(acceptedOptions, options) { return new Promise((resolve, reject) => {