Given a long string, abbreviates it with ...
abbreviate(`This is something`, 7); // `This is...` Copy
abbreviate(`This is something`, 7); // `This is...`
If source is under maxLength the original is returned.
source
maxLength
Maximum length. Defaults to 20
Given a long string, abbreviates it with ...
If
source
is undermaxLength
the original is returned.