helpers/ddata.js
function parentName (options) {
  function instantiate (input) {
    if (/^[A-Z]{3}/.test(input)) {
      return input.replace(/^([A-Z]+)([A-Z])/, function (str, p1, p2) {
        return p1.toLowerCase() + p2
      })
    } else {
      return input.charAt(0).toLowerCase() + input.slice(1)
    }
  }

  /* don't bother with a parentName for exported identifiers */
  if (this.isExported) return ''

  if (this.memberof && this.kind !== 'constructor') {
    var parent = arrayify(options.data.root).find(where({ id: this.memberof }))
    if (parent) {
      if (this.scope === 'instance') {
        var name = parent.typicalname || parent.name
        return instantiate(name)
      } else if (this.scope === 'static' && !(parent.kind === 'class' || parent.kind === 'constructor')) {
        return parent.typicalname || parent.name
      } else {
        return parent.name
      }
    } else {
      return this.memberof
    }
  }
}
function parentName (options) {
  function instantiate (input) {
    if (/^[A-Z]{3}/.test(input)) {
      return input.replace(/^([A-Z]+)([A-Z])/, function (str, p1, p2) {
        return p1.toLowerCase() + p2
      })
    } else {
      return input.charAt(0).toLowerCase() + input.slice(1)
    }
  }

  /* don't bother with a parentName for exported identifiers */
  if (this.isExported) return ''

  if (this.memberof && this.kind !== 'constructor') {
    var parent = arrayify(options.data.root).find(where({ id: this.memberof }))
    if (parent) {
      if (this.scope === 'instance') {
        var name = parent.typicalname || parent.name
        return instantiate(name)
      } else if (this.scope === 'static' && !(parent.kind === 'class' || parent.kind === 'constructor')) {
        return parent.typicalname || parent.name
      } else {
        return parent.name
      }
    } else {
      return this.memberof
    }
  }
}
function parentName ( options ) { function instantiate ( input ) { if ( / ^[A-Z]{3} / . test ( input ) ) { return input . replace ( / ^([A-Z]+)([A-Z]) / , function ( str , p1 , p2 ) { return p1 . toLowerCase ( ) + p2 } ) } else { return input . charAt ( 0 ) . toLowerCase ( ) + input . slice ( 1 ) } } /* don't bother with a parentName for exported identifiers */ if ( this . isExported ) return '' if ( this . memberof && this . kind !== 'constructor' ) { var parent = arrayify ( options . data . root ) . find ( where ( { id : this . memberof } ) ) if ( parent ) { if ( this . scope === 'instance' ) { var name = parent . typicalname || parent . name return instantiate ( name ) } else if ( this . scope === 'static' && ! ( parent . kind === 'class' || parent . kind === 'constructor' ) ) { return parent . typicalname || parent . name } else { return parent . name } } else { return this . memberof } } }
returns the parent name, instantiated if necessary
@this {identifier}
@returns {string}
@static
returns the parent name instantiated if necessary