dist/treenode.js
function leaves() {
                if (!this.children || this.children.length === 0) {
                    // this is a leaf
                    return [this];
                }

                // if not a leaf, return all children's leaves recursively
                var leaves = [];
                if (this.children) {
                    for (var i = 0, _length2 = this.children.length; i < _length2; i++) {
                        leaves.push.apply(leaves, this.children[i].leaves());
                    }
                }
                return leaves;
            }
function leaves() {
                if (!this.children || this.children.length === 0) {
                    // this is a leaf
                    return [this];
                }

                // if not a leaf, return all children's leaves recursively
                var leaves = [];
                if (this.children) {
                    for (var i = 0, _length2 = this.children.length; i < _length2; i++) {
                        leaves.push.apply(leaves, this.children[i].leaves());
                    }
                }
                return leaves;
            }
function leaves ( ) { if ( ! this . children || this . children . length === 0 ) { // this is a leaf return [ this ] ; } // if not a leaf, return all children's leaves recursively var leaves = [ ] ; if ( this . children ) { for ( var i = 0 , _length2 = this . children . length ; i < _length2 ; i ++ ) { leaves . push . apply ( leaves , this . children [ i ] . leaves ( ) ) ; } } return leaves ; }
Returns an array of all leaf nodes below this one.
@returns {Array}
Returns an array of all leaf nodes below this one .