home/natto/ags: init
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
5
home/natto/ags/utils/text.js
Normal file
5
home/natto/ags/utils/text.js
Normal file
@@ -0,0 +1,5 @@
|
||||
export const shrinkText = (str, n) => {
|
||||
let newStr = str.substring(0, n);
|
||||
if (str.length > n) newStr = newStr + "...";
|
||||
return newStr;
|
||||
};
|
||||
Reference in New Issue
Block a user