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

Not parsing properly when name has a dash (-).

Open tahaaslam1 opened this issue 1 year ago • 1 comments

The functions returns only last in case string is passed B05-1005 In my opinion, it should return return

{
  title: '',
  first: 'B05',
  middle: '-',
  last: '1005',
  nick: '',
  suffix: '',
  error: []
}

Also, is there a way we can choose which part to include in which case by passing preferences?

tahaaslam1 avatar Dec 06 '23 11:12 tahaaslam1

IMO it works as expected for double-barrelled names. https://en.wikipedia.org/wiki/Double-barrelled_name

vinser avatar Apr 21 '24 06:04 vinser