mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-09-11 21:27:04 +08:00
11 lines
293 B
TypeScript
11 lines
293 B
TypeScript
export const makeBearer = (s: string) => `Bearer ${s.trim()}`;
|
|
export const validString = (x?: string): x is string =>
|
|
Boolean(x && x.length > 0);
|
|
|
|
export function ensureProperEnding(str: string) {
|
|
if (str.startsWith("[") && !str.endsWith("]")) {
|
|
return str + "]";
|
|
}
|
|
return str;
|
|
}
|