* Validate whether an object is a Node, for use with map * @param {Node} node * @returns {Node} Returns the input if it's a node, else throws an Error * @protected
(node)
| 103 | * @protected |
| 104 | */ |
| 105 | _ifNode (node) { |
| 106 | if (!isNode(node)) { |
| 107 | throw new TypeError('Callback function must return a Node') |
| 108 | } |
| 109 | return node |
| 110 | } |
| 111 | |
| 112 | /** |
| 113 | * Recursively traverse all nodes in a node tree. Executes given callback for |