Skip to content

Commit 57d27ff

Browse files
docs(index): tidy JSDoc comments in index.js
1 parent 598f9eb commit 57d27ff

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

index.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ var domParserOptions = { decodeEntities: true, lowerCaseAttributeNames: false };
77
/**
88
* Converts HTML string to React elements.
99
*
10-
* @param {String} html - The HTML string to parse to React.
11-
* @param {Object} [options] - The parser options.
12-
* @param {Function} [options.replace] - The replace method.
13-
* @return {ReactElement|Array|String} - When parsed with HTML string, returns React elements; otherwise, returns string or empty array.
10+
* @param {String} html - The HTML string to parse to React.
11+
* @param {Object} [options] - The parser options.
12+
* @param {Function} [options.replace] - The replace method.
13+
* @return {JSX.Element|JSX.Element[]|String} - Returns React element(s), string, or empty array.
1414
*/
1515
function HTMLReactParser(html, options) {
1616
if (typeof html !== 'string') {
@@ -22,5 +22,6 @@ function HTMLReactParser(html, options) {
2222
HTMLReactParser.domToReact = domToReact;
2323
HTMLReactParser.htmlToDOM = htmlToDOM;
2424

25+
// support CommonJS and ES Modules
2526
module.exports = HTMLReactParser;
2627
module.exports.default = HTMLReactParser;

0 commit comments

Comments
 (0)