Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cases with a single name throws an exception #10

Open
gabrielalack opened this issue Dec 12, 2014 · 1 comment
Open

Cases with a single name throws an exception #10

gabrielalack opened this issue Dec 12, 2014 · 1 comment

Comments

@gabrielalack
Copy link

Hi,

So I tried using your library to parse customer names coming in from an online ordering system.

Some names tend to just be one word, like "Henry". Your library throws an exception and halts execution if I try to get a last name from cases where there is only a single word. Why not just return ""? Or maybe an option for how strict it should be when returning name parts?

Like
level 1, halt for all missing pieces
level 2, just return empty string for missing pieces with no errors

@gabeguz
Copy link

gabeguz commented Apr 2, 2015

I created a pull request to deal with this issue, not sure if it's the correct approach or if it's even something you'd be interested in @jasonpriem Feel free to review and let me know if you'd like me to change anything. PR is here for reference: #12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants