Skip to content

Commit

Permalink
docs(lib): update JSDoc in dom-to-react
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Feb 7, 2020
1 parent ccba051 commit 98baf39
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions lib/dom-to-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ var utilities = require('./utilities');
/**
* Converts DOM nodes to React elements.
*
* @param {Array} nodes - The DOM nodes.
* @param {Object} [options] - The additional options.
* @param {Function} [options.replace] - The replace method.
* @return {ReactElement|Array}
* @param {DomElement[]} nodes - The DOM nodes.
* @param {Object} [options={}] - The additional options.
* @param {Function} [options.replace] - The replacer.
* @param {Object} [options.library] - The library (React, Preact, etc.).
* @return {String|ReactElement|ReactElement[]}
*/
function domToReact(nodes, options) {
options = options || {};
Expand Down Expand Up @@ -95,6 +96,10 @@ function domToReact(nodes, options) {
return result.length === 1 ? result[0] : result;
}

/**
* @param {React.ReactElement} node
* @return {Boolean}
*/
function shouldPassAttributesUnaltered(node) {
return (
utilities.PRESERVE_CUSTOM_ATTRIBUTES &&
Expand Down

0 comments on commit 98baf39

Please sign in to comment.