Added actor stash.
This commit is contained in:
11
utils/ellipsis.js
Normal file
11
utils/ellipsis.js
Normal file
@@ -0,0 +1,11 @@
|
||||
export default function ellipsis(text, limit = 50, ellipse = '...') {
|
||||
if (!text) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (text.length > limit) {
|
||||
return `${text.slice(0, limit - ellipse.length)}${ellipse}`;
|
||||
}
|
||||
|
||||
return text;
|
||||
}
|
||||
Reference in New Issue
Block a user