* Create a new RelationalNode 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 {RelationalNode} Returns a transformed copy of the node
(callback)
| 98 | * @returns {RelationalNode} Returns a transformed copy of the node |
| 99 | */ |
| 100 | map (callback) { |
| 101 | return new RelationalNode( |
| 102 | this.conditionals.slice(), |
| 103 | this.params.map( |
| 104 | (n, i) => this._ifNode(callback(n, 'params[' + i + ']', this)), this)) |
| 105 | } |
| 106 | |
| 107 | /** |
| 108 | * Create a clone of this node, a shallow copy |