Open GregZoeller opened 7 years ago
To fix temporarily you can just do nameStr.trim()
before you put it into the function
.replace(/\s\s+/g, ' ').trim()
@GregZoeller @turbobuilt 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.
a name such as
Ezekiel Johnson
would be fine as is and returns{ title: '', first: 'Ezekiel', middle: '', last: 'Johnson', nick: '', suffix: '', error: [] }
but
Ezekiel Johnson
with a blank space at the end results in{ title: '', first: 'Ezekiel', middle: 'Johnson', last: '', nick: '', suffix: '', error: [] }