πŸ”½Shorten

shorten β‡’ string

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

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

Param
Type
Description

text

string

Text to be shortened

len

number

Maximum length of text before shortening

Last updated