summaryrefslogtreecommitdiff
path: root/server/src/utils/Utils.ts
diff options
context:
space:
mode:
author8cy <[email protected]>2020-07-23 23:24:17 -0700
committer8cy <[email protected]>2020-07-23 23:24:17 -0700
commitbb511abc03bb66848947e37a999502b813c77269 (patch)
tree612c010fc8317e1cdf11471a18aad0270819d33e /server/src/utils/Utils.ts
parentfix: if clear amount equal or over 100, round down to 99 (diff)
downloaddep-core-bb511abc03bb66848947e37a999502b813c77269.tar.xz
dep-core-bb511abc03bb66848947e37a999502b813c77269.zip
goodbye old uwufier :cry:
Diffstat (limited to 'server/src/utils/Utils.ts')
-rw-r--r--server/src/utils/Utils.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/src/utils/Utils.ts b/server/src/utils/Utils.ts
new file mode 100644
index 0000000..454840e
--- /dev/null
+++ b/server/src/utils/Utils.ts
@@ -0,0 +1,5 @@
+export default class Util {
+ static shorten(text: string, maxLen = 2000) {
+ return text.length > maxLen ? `${text.substr(0, maxLen - 3)}...` : text;
+ }
+} \ No newline at end of file