dschnelldavis / parse-full-name

A function that accepts the full name of a person in any format, parses it, and returns its parts { title, first name, middle name, last name, nickname, suffix, [and any parsing errors] }.
74 stars 15 forks source link

Not parsing properly if there is no "space" after a "comma" #18

Open angel-rs opened 3 years ago

angel-rs commented 3 years ago

Parsing Smith,John Results in {error: [], first: "John", last: "Smith", middle: "", nick: "", suffix: "", title: ""}

While parsing Smith,John Results in {error: [], first: "", last: "Smith,John", middle: "", nick: "", suffix: "", title: ""}

The latter fails consistently regardless of the name if there is a "space" missing after the "comma" .

Just filing my discovery here, if anyone haves a clue if this is by design, or an actual bug - that would be pretty helpful. Thanks.