6 lines
136 B
JavaScript
6 lines
136 B
JavaScript
|
export function renderText(text, limit) {
|
||
|
if (text.length > limit) {
|
||
|
return text.slice(0, limit - 3) + '...';
|
||
|
}
|
||
|
return text;
|
||
|
}
|