src/classes/name.js
function(type, i) {
    return maybe(utils.find(maybe(this.getNameForm(i)).parts, {type: type})).value;
  }
function(type, i) {
    return maybe(utils.find(maybe(this.getNameForm(i)).parts, {type: type})).value;
  }
@ngdoc function
@name name.types:constructor.Name#getNamePart
@methodOf name.types:constructor.Name

@description you can call getGivenName, getSurname, getPrefix, or getSuffix instead of this function
@param {String} type http://gedcomx.org/Given or http://gedcomx.org/Surname
@param {Number=} i name form to read; defaults to 0
@return {String} get the specified part of the `i`'th name form