From f802c37559857b0036bc710b2808bb69ed528c28 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Feb 2021 10:09:17 +0100 Subject: moved utils to server-util --- src/util/String.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/util/String.ts') diff --git a/src/util/String.ts b/src/util/String.ts index fa93f1b7..3a8e35a8 100644 --- a/src/util/String.ts +++ b/src/util/String.ts @@ -1,12 +1,5 @@ import { Request } from "express"; -import { FieldError, FieldErrors } from "./instanceOf"; - -export const DOUBLE_WHITE_SPACE = /\s\s+/g; -export const SPECIAL_CHAR = /[@#`:\r\n\t\f\v\p{C}]/gu; - -export function trimSpecial(str: string) { - return str.replace(SPECIAL_CHAR, "").replace(DOUBLE_WHITE_SPACE, " ").trim(); -} +import { FieldErrors } from "./instanceOf"; export function checkLength(str: string, min: number, max: number, key: string, req: Request) { if (str.length < min || str.length > max) { -- cgit 1.5.1