🔽Shorten

shorten ⇒ string

Shorten text to a specific length and add ellipses if necessary.

Kind: global variable Returns: string - Original or shortened text

ParamTypeDescription

text

string

Text to be shortened

len

number

Maximum length of text before shortening

Last updated