splitName
Splits a full name into firstName and lastName
Object with firstName and lastName
splitName('Mary Jane Smith') // { firstName: 'Mary Jane', lastName: 'Smith' }splitName('Alice') // { firstName: 'Alice', lastName: '' }splitName('John Doe') // { firstName: 'John', lastName: 'Doe' }splitName('') // { firstName: '', lastName: '' }
Generated using TypeDoc
Name
splitName
Description
Splits a full name into firstName and lastName
Returns
Object with firstName and lastName
Example