parse-full-name icon indicating copy to clipboard operation
parse-full-name copied to clipboard

Assume first name if only 1 word is entered

Open stevenmusumeche opened this issue 8 years ago • 6 comments

Thank you for this library. I really like the case-fixing that it provides.

When I call this library like parseFullName('steven'), the result is that steven is returned as the last name. This seems counterintuitive to me and should be returned as the first name.

stevenmusumeche avatar Mar 31 '17 16:03 stevenmusumeche

I'm also encountering the same behaviour and wanted to see if the author/maintainers can discuss the rationale behind this design decision. The behaviour is easy enough to change, but I don't want to make my special case into the general case, because my case could be domain-specific. We work with student names, so in cases where the person who's providing the identity of the student isn't comfortable doing so, we don't make them supply a surname. Thus, in most cases if only a single name is supplied, we should be assuming that it's a given/first name.

tcchau avatar Nov 28 '17 15:11 tcchau

@stevenmusumeche @tcchau we've taken over ownership of this library I'm moving issues into our fork. Please feel free to comment further on your issue there.

chris-pardy avatar Sep 16 '19 15:09 chris-pardy

@stevenmusumeche @tcchau we've taken over ownership of this library I'm moving issues into our fork. Please feel free to comment further on your issue there.

hm... great... now where is the fork? :)

demiro avatar Oct 13 '19 14:10 demiro

@demiro https://github.com/RateGravity/parse-full-name

stevenmusumeche avatar Oct 13 '19 16:10 stevenmusumeche

@demiro https://github.com/RateGravity/parse-full-name

this is only a github repo, where is the npm package?

demiro avatar Oct 13 '19 20:10 demiro

@demiro we took ownership of the NPM package. I've published a minor version bump with us as owners. If you'd like to open up a PR for this issue, please feel free to do so. Otherwise we'll start to address issues shortly. (Currently on a big push to ship some code at work)

chris-pardy avatar Oct 13 '19 23:10 chris-pardy