(pathname: string, basePath: string)
| 307 | } |
| 308 | |
| 309 | export const removeBasePathFromPathname = (pathname: string, basePath: string): string => { |
| 310 | const updatedPath = pathname.startsWith(basePath) ? pathname.slice(basePath.length) : pathname; |
| 311 | |
| 312 | return !updatedPath.startsWith('/') ? `/${updatedPath}` : updatedPath; |
| 313 | }; |
| 314 | |
| 315 | export const toArrayBuffer = (input: Uint8Array | number[]): ArrayBuffer => { |
| 316 | return input instanceof Uint8Array ? input.buffer : new Uint8Array(input).buffer; |
no outgoing calls
no test coverage detected