Skip to content

Instantly share code, notes, and snippets.

@angeldelacruzdev
Last active August 13, 2020 00:43
Show Gist options
  • Save angeldelacruzdev/23b6bff7f02fc8e31acefc05e54d085b to your computer and use it in GitHub Desktop.
Save angeldelacruzdev/23b6bff7f02fc8e31acefc05e54d085b to your computer and use it in GitHub Desktop.
Short String
export const StrShortString = (str) =>{
return str.length > 25 ? str.substring(0, 50) + "..." : str;
}
@angeldelacruzdev
Copy link
Author

return str.length > 25 ? str.substring(0, 50) + "..." : str;

Para cortar un texto muy largo al momento de mostrarlo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment