(node, path)
| 2025 | var Handlers = require('./handlers'); |
| 2026 | |
| 2027 | var get = function(node, path){ |
| 2028 | var result = []; |
| 2029 | if(path.length === 0){ |
| 2030 | return node; |
| 2031 | } |
| 2032 | node.children.forEach(function(child){ |
| 2033 | if(child.name === path[0] && path.length > 1) { |
| 2034 | result = get(child, path.slice(1)); |
| 2035 | } else if(child.name === path[0]) { |
| 2036 | result.push(child); |
| 2037 | } |
| 2038 | }); |
| 2039 | return result; |
| 2040 | }; |
| 2041 | |
| 2042 | var markers = []; |
| 2043 | this.apply = function(fn) { |