dist/treenode.js
function find(data) {
                if (data === this.data) {
                    return this;
                }

                if (this.children) {
                    for (var i = 0, _length = this.children.length, target = null; i < _length; i++) {
                        target = this.children[i].find(data);
                        if (target) {
                            return target;
                        }
                    }
                }

                return null;
            }
function find(data) {
                if (data === this.data) {
                    return this;
                }

                if (this.children) {
                    for (var i = 0, _length = this.children.length, target = null; i < _length; i++) {
                        target = this.children[i].find(data);
                        if (target) {
                            return target;
                        }
                    }
                }

                return null;
            }
function find ( data ) { if ( data === this . data ) { return this ; } if ( this . children ) { for ( var i = 0 , _length = this . children . length , target = null ; i < _length ; i ++ ) { target = this . children [ i ] . find ( data ) ; if ( target ) { return target ; } } } return null ; }
Given a data object, returns the tree node containing it, if any. If not found, returns null.
@param data
@returns {TreeNode} || null
Given a data object returns the tree node containing it if any . If not found returns null .