Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const latinDataFormating = (firstName, lastName) => {
- firstName = firstName.trim();
- lastName = lastName.trim();
- if (firstName.length + lastName.length > 25) {
- firstName = firstName[0];
- }
- if (lastName.indexOf('-') && firstName.length + lastName.length > 25) {
- lastName = lastName.slice(0, lastName.indexOf('-'));
- }
- if (firstName.length + lastName.length > 25){
- lastName = lastName.slice(0,24);
- }
- return {firstName, lastName};
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement