* Create a new Node whose children are the results of calling the * provided callback function for each child of the original node. * @param {function(child: Node, path: string, parent: Node): Node} callback * @returns {OperatorNode} Returns a transformed copy of the node
(callback)
| 92 | * @returns {OperatorNode} Returns a transformed copy of the node |
| 93 | */ |
| 94 | map (callback) { |
| 95 | // must be implemented by each of the Node implementations |
| 96 | throw new Error('Cannot run map on a Node interface') |
| 97 | } |
| 98 | |
| 99 | /** |
| 100 | * Validate whether an object is a Node, for use with map |