Advertisement
Guest User

Untitled

a guest
Feb 1st, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const latinDataReplace = (firstName, lastName) => {
  2.     firstName = firstName.trim();
  3.     lastName = lastName.trim();
  4.     if (firstName.length + lastName.length > 25) {
  5.         firstName = firstName[0];
  6.         if (lastName.indexOf('-') && firstName.length + lastName.length > 25) {
  7.             lastName = lastName.slice(0, lastName.indexOf('-'));
  8.             if (firstName.length + lastName.length > 25){
  9.                 lastName = lastName.slice(0,24);
  10.             }
  11.         }
  12.     }    
  13.     return {firstName, lastName};
  14. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement