truncate
function truncate(text, max): string;Defined in: src/ui/format.ts:91
Truncate with an ellipsis; never longer than max characters (including the ellipsis).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
text |
string |
max |
number |
Returns
Section titled “Returns”string