code: function username(value, fromIndex) {
    var index = fromIndex
    var length = value.length
    var size
  
    /* First character of username cannot be a dash. */
    if (value.charCodeAt(index) === CC_DASH) {
      return -1
    }
  
    while (index < length) {
      if (!usernameCharacter(value.charCodeAt(index))) {
        break
      }
  
      index++
    }
  
    size = index - fromIndex
  
    /* Last character of username can no longer be a dash, but could be (GH-13). */
    if (!size || size > MAX_USER_LENGTH) {
      return -1
    }
  
    return index
  }
docs: /* Get the end of a username which starts at character
  `fromIndex` in `value`.