diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-04-24 14:30:48 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-04-24 14:30:48 +0200 |
commit | d7cf341320fb2e1af5d1e40e67c2fed2d65d3a5c (patch) | |
tree | f6767f1668a77dddb51d23bc63b4adc74c57dd11 /src/util | |
parent | :art: String trimSpecial pass string OR undefined (diff) | |
download | server-d7cf341320fb2e1af5d1e40e67c2fed2d65d3a5c.tar.xz |
:bug: fix Webhook model
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/String.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/String.ts b/src/util/String.ts index 161336f1..bac7905f 100644 --- a/src/util/String.ts +++ b/src/util/String.ts @@ -1,6 +1,7 @@ import { DOUBLE_WHITE_SPACE, SPECIAL_CHAR } from "./Regex"; -export function trimSpecial(str?: string) { +export function trimSpecial(str?: string): string { + // @ts-ignore if (!str) return; return str.replace(SPECIAL_CHAR, "").replace(DOUBLE_WHITE_SPACE, " ").trim(); } |