UNPKG

@lobehub/chat

Version:

Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.

24 lines (22 loc) 449 B
/** * Build a path string from a path and a hash/search object * @param path * @param hash * @param search */ export const pathString = ( path: string, { hash = '', search = '', }: { hash?: string; search?: string; } = {}, ) => { const tempBase = 'https://a.com'; const url = new URL(path, tempBase); if (hash) url.hash = hash; if (search) url.search = search; return url.toString().replace(tempBase, ''); };