diff --git a/src/utils/validator.ts b/src/utils/validator.ts new file mode 100644 index 0000000..b740659 --- /dev/null +++ b/src/utils/validator.ts @@ -0,0 +1,6 @@ +export const validateCookie = (cookie: string | any[]): boolean => { + if (!cookie) return false + if (typeof cookie === "string") return cookie.length > 0 + if (Array.isArray(cookie)) return cookie.length > 0 + return false +}