Skip to content

Function: strWords() ​

strWords(value, words?, end?): string

Defined in: src/formatters.ts:254

Limit the number of words in a string.

Parameters ​

value ​

string

The string to limit

words? ​

number = 100

The maximum number of words

end? ​

string = '...'

The string to append if truncated

Returns ​

string

The limited string

Documentation of 1.0.13 , built from cf61d3b on 1.0.13 by pipeline #2985011498 on 2026-10-21.