You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Name::toArray() returns every part under a fixed key set (empty string when absent), a machine-readable shape that is safe to consume without existence checks, unlike getAll().
Name::getConfidence() exposes the advisory confidence signal on the parsed result, derived from the same input the parser saw. Parser::parse() output is unchanged; the check is opt-in.
Confidence now flags all-caps tokens that collide with Census surnames (II, III, IV, MBA) in uniform-case input, in addition to the existing name-leaning keys.
Two-letter given names in all-caps input are kept as names instead of being split into initials; "JO ANDERSON" keeps first name Jo. Mixed-case combined initials like "JM Walker" still split.
Comma input keeps a middle name after a second comma; "Smith, John, Robert" keeps Robert, while trailing and credential-only segments like "Smith, MD, PhD" still strip to suffixes.
Changed
Config setters (setMaxCombinedInitials, setMaxSalutationIndex, setNicknameDelimiters) take effect on a reused parser even when called after the first parse(), instead of using configuration cached on that first call.
getFullName() and toArray()['full_name'] no longer pad with a stray space when the first or last name is absent; "John" alone returns "John", not "John ".
Fixed
A lone bracket or quote token no longer crashes parse() with a TypeError; inputs like "(" or "Smith, (" return an empty Name instead of aborting the row.
Multi-word salutation matching no longer accepts a partial tail, so "Smith, Her" keeps Her as the given name instead of reading it as "Her Honour", and no longer reads past the token list when a match shrinks it.