src/classes/name.js
function ensureNameForm(name, i) {
  var pos = i || 0; // just to be clear
  if (!utils.isArray(name.data.nameForms)) {
    name.data.nameForms = [];
  }
  while (pos >= name.data.nameForms.length) {
    name.data.nameForms.push({});
  }
  return name.data.nameForms[pos];
}
function ensureNameForm(name, i) {
  var pos = i || 0; // just to be clear
  if (!utils.isArray(name.data.nameForms)) {
    name.data.nameForms = [];
  }
  while (pos >= name.data.nameForms.length) {
    name.data.nameForms.push({});
  }
  return name.data.nameForms[pos];
}
return the i'th name form; add it if it doesn't exist