helpers/ddata.js
function descendants (options) {
  var min = typeof options.hash.min !== 'undefined' ? options.hash.min : 2
  delete options.hash.min
  options.hash.memberof = this.id
  var output = []
  function iterate (childrenList) {
    if (childrenList.length) {
      childrenList.forEach(function (child) {
        output.push(child)
        iterate(_children.call(child, options))
      })
    }
  }
  iterate(_children.call(this, options))
  if (output.length >= (min || 0)) return output
}
function descendants (options) {
  var min = typeof options.hash.min !== 'undefined' ? options.hash.min : 2
  delete options.hash.min
  options.hash.memberof = this.id
  var output = []
  function iterate (childrenList) {
    if (childrenList.length) {
      childrenList.forEach(function (child) {
        output.push(child)
        iterate(_children.call(child, options))
      })
    }
  }
  iterate(_children.call(this, options))
  if (output.length >= (min || 0)) return output
}
function descendants ( options ) { var min = typeof options . hash . min !== 'undefined' ? options . hash . min : 2 delete options . hash . min options . hash . memberof = this . id var output = [ ] function iterate ( childrenList ) { if ( childrenList . length ) { childrenList . forEach ( function ( child ) { output . push ( child ) iterate ( _children . call ( child , options ) ) } ) } } iterate ( _children . call ( this , options ) ) if ( output . length >= ( min || 0 ) ) return output }
return a flat list containing all decendants
@param [sortBy] {string} - "kind"
@param [min] {number} - only returns if there are `min` children
@this {identifier}
@returns {identifier[]}
@static
return a flat list containing all decendants