From 496d39617e461d85c3c1a3ae8965f8188e3d96c9 Mon Sep 17 00:00:00 2001 From: Carl Chen Date: Tue, 26 May 2026 01:09:20 +0800 Subject: [PATCH] feat(request): refactor Request to thenable handle with lifecycle callbacks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - RequestReturn → RequestHandle (thenable + abort()) - Remove .promise — directly awaitable - Remove loading/error/data/aborted fields - Add onSuccess/onError/onAbort/onFinally callbacks - Add timeout, retry, cache, deduplication, download progress - Support Blob/URLSearchParams body, 204/205 response, binary blob - Add 19 new tests, 36 total request tests passing --- README.md | 115 + README_ZH.md | 181 + __test__/lib/request.test.ts | 736 + docs/assets/navigation.js | 2 +- docs/assets/search.js | 2 +- docs/classes/Logger.html | 22 +- docs/classes/Request.html | 27 + docs/documentation.json | 18110 ++++++++++------ docs/functions/_toString.html | 2 +- docs/functions/awaitTo.html | 6 + docs/functions/basename.html | 2 +- docs/functions/capitalize.html | 2 +- docs/functions/compose.html | 2 +- .../convertParamsRouterToRegExp.html | 2 +- docs/functions/defineDebounceFn.html | 2 +- docs/functions/defineOnceFn.html | 2 +- docs/functions/defineSinglePromiseFn.html | 2 +- docs/functions/defineThrottleFn.html | 2 +- docs/functions/executeConcurrency.html | 2 +- docs/functions/executeQueue.html | 2 +- docs/functions/formatDate.html | 2 +- docs/functions/formatDateByArray.html | 2 +- docs/functions/formatDateByTimeStamp.html | 2 +- docs/functions/formatDateTimeByString.html | 2 +- docs/functions/formatErrorToString.html | 2 +- docs/functions/getCurrentTimeISOString.html | 2 +- docs/functions/hasOwn.html | 2 +- .../invokeWithErrorHandlingFactory.html | 2 +- docs/functions/isBool.html | 2 +- docs/functions/isEffectiveNumber.html | 2 +- docs/functions/isFalsy.html | 2 +- docs/functions/isFn.html | 2 +- docs/functions/isMobile.html | 4 + docs/functions/isNil.html | 2 +- docs/functions/isNull.html | 2 +- docs/functions/isNumber.html | 2 +- docs/functions/isObject.html | 2 +- docs/functions/isPrimitive.html | 2 +- docs/functions/isPromise.html | 2 +- docs/functions/isPropertyKey.html | 2 +- docs/functions/isStr.html | 2 +- docs/functions/isSymbol.html | 2 +- docs/functions/isUndef.html | 2 +- docs/functions/isValidArray.html | 2 +- docs/functions/isValidDate.html | 2 +- docs/functions/mulSplit.html | 2 +- docs/functions/noop.html | 2 +- docs/functions/objectToQueryString.html | 2 +- docs/functions/parseKey.html | 2 +- docs/functions/pipe.html | 2 +- docs/functions/queryStringToObject.html | 2 +- docs/functions/random.html | 2 +- docs/functions/setIntervalByTimeout.html | 2 +- docs/functions/setintervalByTimeout-1.html | 2 +- docs/functions/sleep.html | 2 +- docs/functions/unCapitalize.html | 2 +- docs/functions/underlineToHump.html | 2 +- docs/interfaces/RequestConfig.html | 20 + docs/interfaces/RequestReturn.html | 7 + docs/modules.html | 8 + docs/types/ErrorInterceptor.html | 1 + docs/types/RequestInterceptor.html | 1 + docs/types/ResponseInterceptor.html | 1 + docs/variables/HTTP_STATUS.html | 2 +- docs/variables/MIME_TYPES.html | 2 +- docs/variables/REQUEST_METHOD.html | 2 +- lib/error-handler.ts | 3 +- lib/index.ts | 1 + lib/request.ts | 604 + 69 files changed, 12861 insertions(+), 7090 deletions(-) create mode 100644 README_ZH.md create mode 100644 __test__/lib/request.test.ts create mode 100644 docs/classes/Request.html create mode 100644 docs/functions/awaitTo.html create mode 100644 docs/functions/isMobile.html create mode 100644 docs/interfaces/RequestConfig.html create mode 100644 docs/interfaces/RequestReturn.html create mode 100644 docs/types/ErrorInterceptor.html create mode 100644 docs/types/RequestInterceptor.html create mode 100644 docs/types/ResponseInterceptor.html create mode 100644 lib/request.ts diff --git a/README.md b/README.md index 953224f3..45b07595 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,121 @@ import { capitalize } from '@cc-heart/utils' capitalize('string') // String ``` +## Request — composable best practices + +```ts +import { Request } from '@cc-heart/utils' +import type { RequestInterceptor } from '@cc-heart/utils' +``` + +### Principle: small instances + composition + +Prefer small focused instances over one instance with all interceptors. Combine them with factory functions: + +```ts +// ── Building blocks: interceptors are pure functions ── +const addAuth: RequestInterceptor = (config) => ({ + ...config, + headers: { ...config.headers, Authorization: `Bearer ${getToken()}` } +}) + +const addLang: RequestInterceptor = (config) => ({ + ...config, + headers: { ...config.headers, 'Accept-Language': 'zh-CN' } +}) + +const handleError = (err: unknown) => { + toast.error(err) + return err +} + +// ── Compose: each instance handles one concern ── +const authApi = new Request('https://api.example.com') +authApi.useRequestInterceptor(addAuth) +authApi.useRequestInterceptor(addLang) +authApi.useErrorInterceptor(handleError) + +const publicApi = new Request('https://open.api.com') + +// ── Or use helper functions ── +function withInterceptors( + req: Request, + interceptors: RequestInterceptor[] +): Request { + interceptors.forEach((i) => req.useRequestInterceptor(i)) + return req +} +function withBaseUrl(url: string): Request { + return new Request(url) +} + +const api = withInterceptors(withBaseUrl('https://api.example.com'), [ + addAuth, + addLang, +]) +``` + +### Four calling styles + +```ts +const api = new Request('https://api.example.com') + +// Style 1: async/await (recommended) +try { + const user = await api.get('/users/1') + setUser(user) +} catch (e) { + if ((e as Error).name === 'AbortError') return // user cancelled + toast.error(e) +} + +// Style 2: lifecycle callbacks (React setState friendly) +api.get('/users', { + onSuccess: setUsers, + onError: toast.error, + onFinally: () => setLoading(false), +}) + +// Style 3: promise chaining +api.get('/count') + .then(n => n * 2) + .then(setCount) + .catch(toast.error) + +// Style 4: mixed (await + callbacks, non-conflicting) +const data = await api.get('/users', { onFinally: () => setLoading(false) }) +``` + +### Entity — group by domain + +```ts +// entities/user.ts +const api = new Request('/api') + +export const UserApi = { + list: (page: number) => + api.get('/users', { page }), + get: (id: number) => + api.get(`/users/${id}`), + create: (data: CreateUserDto) => + api.post('/users', data, { onSuccess: () => toast.success('created') }), +} + +// Usage +const users = await UserApi.list(1) +``` + +### Cache & dedup — isolated per instance + +```ts +const cachedApi = new Request('/api') +// cache and dedup are instance-level, different Request instances are isolated +const data1 = await cachedApi.get('/users', {}, { cache: { ttl: 5000 } }) +const data2 = await cachedApi.get('/users', {}, { cache: { ttl: 5000 } }) // cache hit + +const otherApi = new Request('/api') // isolated cache +``` + ## LICENSE `@cc-heart/utils` is licensed under the [MIT License](./LICENSE). diff --git a/README_ZH.md b/README_ZH.md new file mode 100644 index 00000000..4aea0159 --- /dev/null +++ b/README_ZH.md @@ -0,0 +1,181 @@ +# @cc-heart/utils + +[Docs](https://cc-hearts.github.io/utils/) + +一个 JavaScript 工具库 + +## 安装 + +```shell +npm install @cc-heart/utils +``` + +## 使用 + +```js +import { capitalize } from '@cc-heart/utils' + +capitalize('string') // String +``` + +## Request — 组合式最佳实践 + +```ts +import { Request } from '@cc-heart/utils' +import type { RequestInterceptor } from '@cc-heart/utils' +``` + +### 原则:小实例 + 组合 + +不要一个实例挂全部拦截器,每个实例只做一件事,需要组合时用工厂函数包装: + +```ts +// ── 构建块:拦截器就是纯函数 ── +const addAuth: RequestInterceptor = (config) => ({ + ...config, + headers: { ...config.headers, Authorization: `Bearer ${getToken()}` } +}) + +const addLang: RequestInterceptor = (config) => ({ + ...config, + headers: { ...config.headers, 'Accept-Language': 'zh-CN' } +}) + +const handleError = (err: unknown) => { + toast.error(err) + return err +} + +// ── 组合:每个实例只关注一个能力 ── +const authApi = new Request('https://api.example.com') +authApi.useRequestInterceptor(addAuth) +authApi.useRequestInterceptor(addLang) +authApi.useErrorInterceptor(handleError) + +const publicApi = new Request('https://open.api.com') + +// ── 或用辅助函数组合 ── +function withInterceptors( + req: Request, + interceptors: RequestInterceptor[] +): Request { + interceptors.forEach((i) => req.useRequestInterceptor(i)) + return req +} +function withBaseUrl(url: string): Request { + return new Request(url) +} + +const api = withInterceptors(withBaseUrl('https://api.example.com'), [ + addAuth, + addLang, +]) +``` + +### 四种调用风格 + +```ts +const api = new Request('https://api.example.com') + +// 风格 1:async/await(推荐) +try { + const user = await api.get('/users/1') + setUser(user) +} catch (e) { + if ((e as Error).name === 'AbortError') return // 用户主动取消 + toast.error(e) +} + +// 风格 2:生命周期回调(React setState 友好) +api.get('/users', { + onSuccess: setUsers, + onError: toast.error, + onFinally: () => setLoading(false), +}) + +// 风格 3:Promise 链式 +api.get('/count') + .then(n => n * 2) + .then(setCount) + .catch(toast.error) + +// 风格 4:混合使用(await + 回调,互不冲突) +const data = await api.get('/users', { onFinally: () => setLoading(false) }) +``` + +### Entity —— 按实体聚合 + +```ts +// entities/user.ts +const api = new Request('/api') + +export const UserApi = { + list: (page: number) => + api.get('/users', { page }), + get: (id: number) => + api.get(`/users/${id}`), + create: (data: CreateUserDto) => + api.post('/users', data, { onSuccess: () => toast.success('创建成功') }), +} + +// 使用 +const users = await UserApi.list(1) +``` + +### 缓存 + 去重(按实例隔离) + +```ts +const cachedApi = new Request('/api') +// cache 和 dedup 是实例级别的,不同的 Request 实例互相隔离 +const data1 = await cachedApi.get('/users', {}, { cache: { ttl: 5000 } }) +const data2 = await cachedApi.get('/users', {}, { cache: { ttl: 5000 } }) // 命中缓存 + +const otherApi = new Request('/api') // 独立缓存 +``` + +## 配置项速查 + +```ts +interface RequestConfig { + // 请求参数 + params?: Record + data?: unknown + + // 拦截器(单次请求) + requestInterceptors?: RequestInterceptor[] + responseInterceptors?: ResponseInterceptor[] + errorInterceptors?: ErrorInterceptor[] + + // 超时 & 重试 + timeout?: number // 毫秒,超时自动 abort 当前尝试 + retry?: number // 失败重试次数,0 = 不重试 + retryDelay?: number // 重试间隔(毫秒) + + // 缓存(仅 GET) + cache?: boolean | { ttl: number } // true = 默认 TTL 5s + + // 下载进度 + onDownloadProgress?: (loaded: number, total: number) => void + + // 生命周期回调 + onSuccess?: (data: unknown) => void + onError?: (error: unknown) => void + onAbort?: () => void + onFinally?: () => void +} +``` + +## 返回类型 + +```ts +interface RequestHandle { + // thenable,可直接 await + then, catch, finally: Promise 方法 + // 取消请求 + abort: () => void +} +``` + +## LICENSE + +`@cc-heart/utils` 基于 [MIT License](./LICENSE) 协议开源。 diff --git a/__test__/lib/request.test.ts b/__test__/lib/request.test.ts new file mode 100644 index 00000000..eeebe99b --- /dev/null +++ b/__test__/lib/request.test.ts @@ -0,0 +1,736 @@ +import { Request } from '../../lib/request' + +describe('Request', () => { + const originalFetch = globalThis.fetch + + beforeEach(() => { + jest.useRealTimers() + }) + + afterEach(() => { + globalThis.fetch = originalFetch + }) + + // ────────────────────────────────────────────── + // 基础功能 + // ────────────────────────────────────────────── + + test('should append GET params to query string', async () => { + const fetchMock = jest.fn().mockResolvedValue(jsonResponse({ ok: true })) + globalThis.fetch = fetchMock + + const request = new Request('https://api.example.com') + await request.get('/users', { page: 1, keyword: 'hello world' }) + + expect(fetchMock).toHaveBeenCalledWith( + 'https://api.example.com/users?page=1&keyword=hello%20world', + expect.objectContaining({ method: 'GET' }) + ) + }) + + test('should send POST JSON body and default content type', async () => { + const fetchMock = jest.fn().mockResolvedValue(jsonResponse({ id: 1 })) + globalThis.fetch = fetchMock + + const request = new Request() + await request.post('/users', { name: 'Carl' }) + + expect(fetchMock).toHaveBeenCalledWith( + '/users', + expect.objectContaining({ + method: 'POST', + body: JSON.stringify({ name: 'Carl' }), + headers: { 'Content-Type': 'application/json' } + }) + ) + }) + + test('should keep FormData body without setting JSON content type', async () => { + const fetchMock = jest.fn().mockResolvedValue(jsonResponse({ ok: true })) + globalThis.fetch = fetchMock + + const formData = new FormData() + formData.append('file', 'content') + + const request = new Request() + await request.post('/upload', formData) + + expect(fetchMock).toHaveBeenCalledWith( + '/upload', + expect.objectContaining({ + method: 'POST', + body: formData, + headers: {} + }) + ) + }) + + test('should allow request interceptors to modify RequestInit', async () => { + const fetchMock = jest.fn().mockResolvedValue(jsonResponse({ ok: true })) + globalThis.fetch = fetchMock + + const request = new Request() + request.useRequestInterceptor((config) => ({ + ...config, + headers: { ...config.headers, Authorization: 'Bearer token' } + })) + + await request.get('/users') + + expect(fetchMock).toHaveBeenCalledWith( + '/users', + expect.objectContaining({ + headers: { Authorization: 'Bearer token' } + }) + ) + }) + + test('should transform data through response interceptors in order', async () => { + globalThis.fetch = jest.fn().mockResolvedValue(jsonResponse({ count: 1 })) + + const request = new Request() + request.useResponseInterceptor<{ count: number }, { count: number }>( + (data) => ({ count: data.count + 1 }) + ) + request.useResponseInterceptor<{ count: number }, number>( + (data) => data.count + ) + + const result = request.get('/counter') + await expect(result).resolves.toBe(2) + }) + + test('should run error interceptors and store the final error', async () => { + const sourceError = new Error('network failure') + globalThis.fetch = jest.fn().mockRejectedValue(sourceError) + + const request = new Request() + const errorInterceptor = jest.fn((error: unknown) => ({ + wrapped: error + })) + request.useErrorInterceptor(errorInterceptor) + + await expect(request.get('/users')).rejects.toEqual({ + wrapped: sourceError + }) + expect(errorInterceptor).toHaveBeenCalledWith(sourceError) + }) + + test('should abort requests and reject with AbortError', async () => { + globalThis.fetch = jest.fn( + (_input: Parameters[0], init?: RequestInit) => + new Promise((_resolve, reject) => { + init?.signal?.addEventListener('abort', () => { + const error = new Error('Aborted') + error.name = 'AbortError' + reject(error) + }) + }) + ) + + const request = new Request() + const result = request.get('/slow') + + const onAbort = jest.fn() + request.get('/slow', { onAbort }) + + await Promise.resolve() + result.abort() + + await expect(result).rejects.toThrow() + try { + await result + } catch (e) { + expect((e as Error).name).toBe('AbortError') + } + }) + + test('should not prefix complete URLs with baseUrl', async () => { + const fetchMock = jest.fn().mockResolvedValue(jsonResponse({ ok: true })) + globalThis.fetch = fetchMock + + const request = new Request('https://api.example.com') + await request.get('https://cdn.example.com/file') + + expect(fetchMock).toHaveBeenCalledWith( + 'https://cdn.example.com/file', + expect.objectContaining({ method: 'GET' }) + ) + }) + + test('should merge one-time interceptors with registered interceptors', async () => { + const fetchMock = jest.fn().mockResolvedValue(jsonResponse({ value: 1 })) + globalThis.fetch = fetchMock + + const request = new Request() + request.useRequestInterceptor((config) => ({ + ...config, + headers: { ...config.headers, 'X-Global': 'global' } + })) + + await request.get('/value', {}, { + requestInterceptors: [ + (config) => ({ + ...config, + headers: { ...config.headers, 'X-Once': 'once' } + }) + ], + responseInterceptors: [(data: any) => data.value], + errorInterceptors: [] + }) + + expect(fetchMock).toHaveBeenCalledWith( + '/value', + expect.objectContaining({ + headers: { 'X-Global': 'global', 'X-Once': 'once' } + }) + ) + }) + + // ────────────────────────────────────────────── + // 生命周期回调 + // ────────────────────────────────────────────── + + test('should call onSuccess with response data', async () => { + globalThis.fetch = jest.fn().mockResolvedValue(jsonResponse({ id: 1 })) + + const onSuccess = jest.fn() + const request = new Request() + + await request.get('/user', {}, { onSuccess }) + + expect(onSuccess).toHaveBeenCalledWith({ id: 1 }) + }) + + test('should call onError on request failure', async () => { + const sourceError = new Error('fail') + globalThis.fetch = jest.fn().mockRejectedValue(sourceError) + + const onError = jest.fn() + const request = new Request() + + await expect( + request.get('/fail', {}, { onError }) + ).rejects.toThrow('fail') + + expect(onError).toHaveBeenCalled() + }) + + test('should call onFinally after success', async () => { + globalThis.fetch = jest.fn().mockResolvedValue(jsonResponse({ ok: true })) + + const onFinally = jest.fn() + const request = new Request() + + await request.get('/ok', {}, { onFinally }) + + expect(onFinally).toHaveBeenCalledTimes(1) + }) + + test('should call onFinally after error', async () => { + globalThis.fetch = jest.fn().mockRejectedValue(new Error('fail')) + + const onFinally = jest.fn() + const request = new Request() + + await expect( + request.get('/fail', {}, { onFinally }) + ).rejects.toThrow() + + expect(onFinally).toHaveBeenCalledTimes(1) + }) + + test('should call onAbort when request is cancelled', async () => { + globalThis.fetch = jest.fn( + (_input: any, init?: RequestInit) => + new Promise((_resolve, reject) => { + init?.signal?.addEventListener('abort', () => { + const err = new Error('Aborted') + err.name = 'AbortError' + reject(err) + }) + }) + ) + + const onAbort = jest.fn() + const request = new Request() + const result = request.get('/slow', {}, { onAbort }) + + await Promise.resolve() + result.abort() + + await expect(result).rejects.toThrow() + expect(onAbort).toHaveBeenCalledTimes(1) + }) + + // ────────────────────────────────────────────── + // buildBody — Blob & URLSearchParams + // ────────────────────────────────────────────── + + test('should send Blob body without JSON content type', async () => { + const fetchMock = jest.fn().mockResolvedValue(jsonResponse({ ok: true })) + globalThis.fetch = fetchMock + + const blob = new Blob(['binary data'], { type: 'application/octet-stream' }) + const request = new Request() + + await request.post('/upload', blob) + + expect(fetchMock).toHaveBeenCalledWith( + '/upload', + expect.objectContaining({ + method: 'POST', + body: blob, + headers: {} + }) + ) + }) + + test('should send URLSearchParams body without JSON.stringify', async () => { + const fetchMock = jest.fn().mockResolvedValue(jsonResponse({ ok: true })) + globalThis.fetch = fetchMock + + const params = new URLSearchParams({ name: 'test', value: '123' }) + const request = new Request() + + await request.post('/submit', params) + + expect(fetchMock).toHaveBeenCalledWith( + '/submit', + expect.objectContaining({ + method: 'POST', + body: params, + headers: {} + }) + ) + }) + + // ────────────────────────────────────────────── + // parseResponse — 204/205 & blob + // ────────────────────────────────────────────── + + test('should return null for 204 No Content response', async () => { + globalThis.fetch = jest.fn().mockResolvedValue(noContentResponse()) + + const request = new Request() + await expect(request.get('/nocontent')).resolves.toBeNull() + }) + + test('should return null for 205 Reset Content response', async () => { + globalThis.fetch = jest.fn().mockResolvedValue(noContentResponse(205)) + + const request = new Request() + await expect(request.get('/reset')).resolves.toBeNull() + }) + + test('should return Blob for binary content types', async () => { + const imageBlob = new Blob(['fake-png'], { type: 'image/png' }) + globalThis.fetch = jest.fn().mockResolvedValue( + blobResponse(imageBlob, 'image/png') + ) + + const request = new Request() + const data = await request.get('/image.png') + + expect(data).toBeInstanceOf(Blob) + expect((data as Blob).type).toBe('image/png') + }) + + test('should return Blob for application/octet-stream', async () => { + const binaryBlob = new Blob(['binary'], { type: 'application/octet-stream' }) + globalThis.fetch = jest.fn().mockResolvedValue( + blobResponse(binaryBlob, 'application/octet-stream') + ) + + const request = new Request() + await expect(request.get('/file.bin')).resolves.toBeInstanceOf(Blob) + }) + + // ────────────────────────────────────────────── + // timeout + // ────────────────────────────────────────────── + + test('should timeout when request exceeds timeout limit', async () => { + globalThis.fetch = jest.fn( + (...args: any[]) => + new Promise((_resolve, reject) => { + const signal = (args[1] as RequestInit | undefined)?.signal as + | AbortSignal + | undefined + signal?.addEventListener('abort', () => { + const err = new Error('Request timed out') + err.name = 'TimeoutError' + reject(err) + }) + }) + ) + + const request = new Request() + const result = request.get('/slow', {}, { timeout: 20 }) + + await expect(result).rejects.toThrow() + try { + await result + } catch (e) { + expect((e as Error).name).toBe('TimeoutError') + } + }, 10000) + + // ────────────────────────────────────────────── + // retry + // ────────────────────────────────────────────── + + test('should retry on failure and succeed on retry', async () => { + const fetchMock = jest + .fn() + .mockRejectedValueOnce(new Error('Network error')) + .mockResolvedValueOnce(jsonResponse({ ok: true })) + + globalThis.fetch = fetchMock + + const request = new Request() + await expect( + request.get('/flaky', {}, { retry: 1, retryDelay: 0 }) + ).resolves.toEqual({ ok: true }) + + expect(fetchMock).toHaveBeenCalledTimes(2) + }) + + test('should exhaust retries and reject', async () => { + const fetchMock = jest + .fn() + .mockRejectedValue(new Error('Persistent error')) + + globalThis.fetch = fetchMock + + const request = new Request() + await expect( + request.get('/failing', {}, { retry: 2, retryDelay: 0 }) + ).rejects.toThrow('Persistent error') + + expect(fetchMock).toHaveBeenCalledTimes(3) + }) + + test('should not retry when user aborts', async () => { + globalThis.fetch = jest.fn( + (...args: any[]) => + new Promise((_resolve, reject) => { + const signal = (args[1] as RequestInit | undefined)?.signal as + | AbortSignal + | undefined + signal?.addEventListener('abort', () => { + const err = new Error('Aborted') + err.name = 'AbortError' + reject(err) + }) + }) + ) + + const request = new Request() + const result = request.get('/slow', {}, { retry: 3, retryDelay: 0 }) + + await Promise.resolve() + result.abort() + + await expect(result).rejects.toThrow() + expect(globalThis.fetch).toHaveBeenCalledTimes(1) + }) + + // ────────────────────────────────────────────── + // cache + // ────────────────────────────────────────────── + + test('should return cached response for same GET URL within TTL', async () => { + const fetchMock = jest.fn().mockResolvedValue(jsonResponse({ value: 1 })) + globalThis.fetch = fetchMock + + const request = new Request() + + const r1 = request.get('/data', {}, { cache: { ttl: 10000 } }) + await expect(r1).resolves.toEqual({ value: 1 }) + + const r2 = request.get('/data', {}, { cache: { ttl: 10000 } }) + await expect(r2).resolves.toEqual({ value: 1 }) + + expect(fetchMock).toHaveBeenCalledTimes(1) + }) + + test('should skip cache for POST requests', async () => { + const fetchMock = jest.fn().mockResolvedValue(jsonResponse({ saved: true })) + globalThis.fetch = fetchMock + + const request = new Request() + + await request.post('/data', { x: 1 }, { cache: { ttl: 10000 } }) + await request.post('/data', { x: 2 }, { cache: { ttl: 10000 } }) + + expect(fetchMock).toHaveBeenCalledTimes(2) + }) + + test('should respect cache TTL and expire', async () => { + jest.useFakeTimers() + + const fetchMock = jest.fn().mockResolvedValue(jsonResponse({ value: 1 })) + globalThis.fetch = fetchMock + + const request = new Request() + + // First request — hits network + await expect( + request.get('/data', {}, { cache: { ttl: 100 } }) + ).resolves.toEqual({ value: 1 }) + + // Advance time past TTL + jest.advanceTimersByTime(101) + await Promise.resolve() + + // Second request — should miss cache, hit network + await expect( + request.get('/data', {}, { cache: { ttl: 100 } }) + ).resolves.toEqual({ value: 1 }) + + expect(fetchMock).toHaveBeenCalledTimes(2) + }) + + test('clearCache() should remove all cached entries', async () => { + const fetchMock = jest.fn().mockResolvedValue(jsonResponse({ value: 42 })) + globalThis.fetch = fetchMock + + const request = new Request() + + await request.get('/data', {}, { cache: { ttl: 10000 } }) + request.clearCache() + + await request.get('/data', {}, { cache: { ttl: 10000 } }) + + expect(fetchMock).toHaveBeenCalledTimes(2) + }) + + // ────────────────────────────────────────────── + // deduplication + // ────────────────────────────────────────────── + + test('should deduplicate concurrent GET requests to same URL', async () => { + let resolveFetch!: (value: Response) => void + globalThis.fetch = jest.fn( + () => new Promise((resolve) => { resolveFetch = resolve }) + ) + + const request = new Request() + + const r1 = request.get('/data') + const r2 = request.get('/data') + + await Promise.resolve() + resolveFetch(jsonResponse({ ok: true })) + + await expect(r1).resolves.toEqual({ ok: true }) + await expect(r2).resolves.toEqual({ ok: true }) + + expect(globalThis.fetch).toHaveBeenCalledTimes(1) + }) + + test('should not deduplicate different URLs', async () => { + let resolve1!: (v: Response) => void + let resolve2!: (v: Response) => void + let callCount = 0 + globalThis.fetch = jest.fn( + () => new Promise((resolve) => { + if (callCount === 0) resolve1 = resolve + else resolve2 = resolve + callCount++ + }) + ) + + const request = new Request() + + const r1 = request.get('/a') + const r2 = request.get('/b') + + await Promise.resolve() + resolve1(jsonResponse({ a: 1 })) + resolve2(jsonResponse({ b: 2 })) + + await expect(r1).resolves.toEqual({ a: 1 }) + await expect(r2).resolves.toEqual({ b: 2 }) + expect(globalThis.fetch).toHaveBeenCalledTimes(2) + }) + + // ────────────────────────────────────────────── + // download progress + // ────────────────────────────────────────────── + + test('should report download progress for JSON response', async () => { + const content = JSON.stringify({ message: 'hello progress' }) + const encoder = new TextEncoder() + const bytes = encoder.encode(content) + + globalThis.fetch = jest.fn().mockResolvedValue( + streamResponse([bytes.slice(0, 10), bytes.slice(10)], 'application/json') + ) + + const request = new Request() + const onProgress = jest.fn() + + await request.get('/progress', {}, { onDownloadProgress: onProgress }) + + expect(onProgress).toHaveBeenCalledTimes(2) + expect(onProgress).toHaveBeenNthCalledWith(1, 10, bytes.length) + expect(onProgress).toHaveBeenNthCalledWith(2, bytes.length, bytes.length) + }) + + test('should report download progress for binary response', async () => { + const blobContent = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]) + + globalThis.fetch = jest.fn().mockResolvedValue( + streamResponse( + [blobContent.subarray(0, 5), blobContent.subarray(5)], + 'application/octet-stream' + ) + ) + + const request = new Request() + const onProgress = jest.fn() + + await request.get('/file.bin', {}, { onDownloadProgress: onProgress }) + + expect(onProgress).toHaveBeenCalled() + }) + + // ────────────────────────────────────────────── + // combination: timeout + retry + // ────────────────────────────────────────────── + + test('should retry after timeout and succeed on second attempt', async () => { + let attempt = 0 + globalThis.fetch = jest.fn( + (...args: any[]) => + new Promise((_resolve, reject) => { + attempt++ + const signal = (args[1] as RequestInit | undefined)?.signal as + | AbortSignal + | undefined + signal?.addEventListener('abort', () => { + const msg = + attempt === 1 ? 'Request timed out' : 'Should not timeout' + const err = new Error(msg) + err.name = attempt === 1 ? 'TimeoutError' : 'AbortError' + reject(err) + }) + }) + ) + + const request = new Request() + await expect( + request.get('/flaky-timeout', {}, { timeout: 20, retry: 1, retryDelay: 0 }) + ).rejects.toThrow() + + expect(globalThis.fetch).toHaveBeenCalledTimes(2) + }, 10000) + + // ────────────────────────────────────────────── + // thenable: await / Promise.all 支持 + // ────────────────────────────────────────────── + + test('should be directly awaitable without .promise', async () => { + globalThis.fetch = jest.fn().mockResolvedValue(jsonResponse({ hello: 'world' })) + + const request = new Request() + const data = await request.get('/test') + + expect(data).toEqual({ hello: 'world' }) + }) + + test('should work with Promise.all', async () => { + const fetchMock = jest.fn().mockResolvedValue(jsonResponse({ ok: true })) + globalThis.fetch = fetchMock + + const request = new Request() + const [a, b] = await Promise.all([ + request.get('/a'), + request.get('/b') + ]) + + expect(a).toEqual({ ok: true }) + expect(b).toEqual({ ok: true }) + expect(fetchMock).toHaveBeenCalledTimes(2) + }) + + test('should support .then chaining', async () => { + globalThis.fetch = jest.fn().mockResolvedValue(jsonResponse(42)) + + const request = new Request() + const result = await request.get('/num').then((n) => n * 2) + + expect(result).toBe(84) + }) +}) + +// ─── 测试辅助函数 ────────────────────────────── + +function jsonResponse(data: unknown): Response { + return { + headers: { + get: (name: string) => + name.toLowerCase() === 'content-type' ? 'application/json' : null + }, + json: jest.fn().mockResolvedValue(data), + text: jest.fn().mockResolvedValue(JSON.stringify(data)), + blob: jest.fn().mockResolvedValue(new Blob([JSON.stringify(data)])), + status: 200 + } as unknown as Response +} + +function noContentResponse(status: number = 204): Response { + return { + headers: { get: () => null }, + json: jest.fn(), + text: jest.fn(), + blob: jest.fn(), + status + } as unknown as Response +} + +function blobResponse(blob: Blob, contentType: string): Response { + return { + headers: { + get: (name: string) => + name.toLowerCase() === 'content-type' ? contentType : null + }, + json: jest.fn().mockRejectedValue(new Error('Not JSON')), + text: jest.fn().mockResolvedValue(''), + blob: jest.fn().mockResolvedValue(blob), + status: 200 + } as unknown as Response +} + +function streamResponse( + chunks: Uint8Array[], + contentType: string +): Response { + const totalLength = chunks.reduce((sum, c) => sum + c.length, 0) + + const stream = new (globalThis as any).ReadableStream({ + start(controller: any) { + for (const chunk of chunks) { + controller.enqueue(chunk) + } + controller.close() + } + }) + + return { + headers: { + get: (name: string) => { + if (name.toLowerCase() === 'content-type') return contentType + if (name.toLowerCase() === 'content-length') return String(totalLength) + return null + } + }, + body: stream, + json: jest.fn(), + text: jest.fn(), + blob: jest.fn(), + status: 200 + } as unknown as Response +} diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js index 543f57cf..bdc17cdf 100644 --- a/docs/assets/navigation.js +++ b/docs/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAE42XXW/TMBSG/0uuB9MGQmh3+8jUCdZ2SwZCCFVucpqa+SPYx2UF8d9REm3J2uOT3vp93yf28YmdfP+bIDxhcpZ8tlUFLjlKaoHr5CwplPAe/HE3/naNWiVHyaM0ZXJ2cvrx39FLcpLn80WWn+cPWR/fCCfFUoE/HsivKe9OB5Dbm9t0kX+bpySjVxnEfXr3kGb54jbNJ7MrCvPawaAWaDN00lQ9ZRVMgdIaf/wivgZ8eD8ALIUHIzRQ+WeNiReiliiU/EMCepVDWF1bT+c7iQ2bDTicCye0v7cBweX2Hqr0qaaBUTvzkBJW0sAVLG0wBVwbirzrGcXNRlCzwzCZNJWCubNaepa3YxwF52tnERXL7D0MDp6gCAiX1hTBOTDFlgLuu8aRdwEC2TdDncGsrNMCrwSSkF49CHGxPXdOkGvbMx0IzKWGDIUmW5k0HgRu3Bfb+LFBO0fRqXPW5cxxRNgYaAV42XYCNrO4yWZxcMTKwNfCz36Tjd0pTFSajX2ErxLX7UomwpRKmupaFGgduf18gnuUv7BWkchWYaPpagUFyg1Mg14O78shZcfEAq+F8vT6OokPk8VuxtnYVEaWP5X86qdBxZJBjUXj9TqgTLPlTyiQjncaG587qWWzIzThRR6BtKd8DNGKY4AaHG4/QWTHBwYWlGGkkhnyZcy2ehnr/U5j4w+mhBWdbiU2/EUoWUZP86E+jondLgOZgeigslpJsp2eNSZurCXvjmacidm2TXN7F8Ax9wRhY6C1cB4i/fSscXFZk3VsxpnYr35uuY2/moSNgTphSqspTqcwUQ94YxDcRqju2raBnBDl47HyQOye780JB1YAZAu1AhMM5pL9NRjqLKYEp5pPTTsJ9IfQjmUP9uM/gLN/+zsOAAA=" \ No newline at end of file +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAE42X0XKbMBBF/4XntG7SJm3zljjOONM6dgxpp9PpeGS82GqERKSVE7fTf+8AccBmWfyqe+9BWhYWfv4NEJ4xOA++muUSbHAUZAJXwXkQK+EcuF65/naFqQqOggepF8H58cmnf0evySk8enDYjL4IB2T7RidyWRGkRrCJiCtI6dhFnZyeNVFTQG81hyodHGpgrbE3eTCGDE2tKrjJwPX29T3Wu88fj09PmltjiE1HN9NlRjtgoQ1LF3UYRZNZGF1E92FFWwsrxVyB69XkXdL7OmR0MxrMoh+TAcmoVAYxHdzdD8JoNhpEw/EVhdl1MKgZmhCt1LX2SryOURrteq/iLuDsQw0gnoTEyFDxF4kJz4UDLVKg0luNiccikyiU/EMCKpVDmDQzjs6XEhvWa7A4EVakbmo8go3MFJaD54wGttqZiywgkRquYG68juFaU+R9Tydu3IEaH4YJpV4qmFiTSsfy9oyd4GhlDaJimZWHwcEzxB6hb3TsrQUdbyhg09WNvPPgyb6p6wwmMTYVeCWQhFTqQYjLzYW1gjxbw3QgMJIphChSspVJ40Hg3H25aX/n0M5OdDF0IuZdRtgY6BKwX3QC5ru4Ccft4BYrA18JN34iG7tUmKjUa/MA3yWuipMMhV4oqZfXIkZjydvPJ7hLuUtjFIksFDY6SBKIUa7h1qfz+odTnbJnYoHXQjn6fKXEh8li5+tsbGTmUpFP51Zj47eypXq3ki/erVdtSa+6ou3lPqDK4/lviJGOlxobn1iZyvyG0oRXuQNSDIk2RCF2ATKwuPkCLQ1TM7CgEFsqGSJfxnCTztsenVJj4/d6AQmdLiQ2/E0ouWgdBnW9G9M2nGoyA0m9CjMlyXbaakxcG0OOnnydiZmiTSNz58EyY4awMdBMWAct/bTVuLjMyDrm60zssdpbZNofTcLGQK3QC5NSnFJhog7KX7C1UOXUN57cEOXjsfJAbMP35pgDKwCyhQqBCXrdZ/8s6jqLWYBV+ZeqGXr6O2rP0oD9+g/Tknc3gxAAAA==" \ No newline at end of file diff --git a/docs/assets/search.js b/docs/assets/search.js index 373c617f..6dae695a 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@ -1 +1 @@ -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAE61da3faRhP+L+SrmzKSuOUbsRWHt7ahgJ2kPj06MqxtpSBRSfjSnv739+wK2zPrGcxafEqC5rK7z+zszLOC/NvIs/ui8eny38ZfSTpvfGoHB400XqrGp8aNKg/Xea7Scpos1WAynJR5kt40DhrrfNH41Lhep7MyydLiV0Hy4225XDQOGrNFXBSqaHxqNP47YBxdZ/kyLo/iUjG2Xx66m/v8qMczKePlaqtlJOfuRKt+fhTXhhd8z1z6eR4/vjEPI7Or8bm6TlI1TGfqS8rYxY+3m2y1/Paz1SgqH1cckq/sfSCfPOshHweNVazDyhrsRzLyLXOb3uZZWS62ze9FxG3ZJkl6s1CjPFsmxTb7ltz+FpIz/IF/tNPS2kr8NLesyJG6ytbbg+lFZNfFzuN0ni0Zg9WDXc2kWcalAP3xriaKhVKcDfP5rkaW68VktUhKxs7To11NrdO5yhc6grOvazbBWRK7Gp7Fq6SMF8k/XOy9PNx9nIfbDOLHu5pcxXmhflNcMnx6tKupv9cq3+TkaTa8+qlmHDaM1K4OMiM9zX5/McE4YKR2hitL71RejuI8XhbjbF2qfJqN1U34wMXEFuldHV7FhTJ/fW396dGuppJCXPKnR7ubmjwur7IFa6p6tLspNoXpjx1GU+b8UMp8dyOfM2FC+sHuZs7Tubpm7Zgnuxs6Wy/48egHu5sZ5ckyKZM7LoTQUwe84kXBZYPNE5cJLq8UD1z1aHdT4fW1mulpbLFpybisoDmQhfUzz3Y1dhsXw3su3qsHu4/pIl4kc6lIxY+dprlSefnI53ry3HGcQreBnu5qMCozMa0/P3OIwETYYcnOG0w9qNm6VIdZOjNd2YxbvNdCjuZ/X6s1t4T48c4HesIWuvrjfRTMz3Y+mL+9UQ4bGTMi4bxdrjJ2622e7GPE2NSHp3+8Me4nsacB8lWsKpO0VPldvKi63mzNnb6c2C+wj5ltsfyBe/bWrFkddpbSegx2W49XYntaDd7uB/bJ22vxWoed4ctAfe95lF+n01E0mfan55Pnod7FeRJfLVTxK3r6/pnL5j68MTc8uBdn0PResDwcnk0HZ+fh7t4+IpU33T6tvuB98m0wPfw6ODuORuPhdHg4PNllFZ8GwmvXHdNoPDwMJ5PB2bHDUIhS3RGE/fHJj6+Ds6nLYhCluiMY/ubg2QjX9Xg4DvvT8MglDJ816vruHx6GIzfnSKWu97PhWdQ/n34djgfT/nRwEUaDsy/D8Wl/OhieOQzpLTv1xxnpnR+eTZ0GhZTqjmAcTsLpOwZh69XOEP3xdNA/ecdIXmvWjt3Tz4Pj8+FOp89z8CKduv5PhxfhUTQKx6f9s/BsevLDYRycbt3xfBmen7ls5Cf52idZGEbD6ddw7HJ+IZ36u3ManQ6PBl8GTnnMUqs7iml4OhqO++Mf0Tg8GozDQ5fNwSrX3qtP0fWeEbHKdUf0uX8UjcPfz8OJy1CoVt0xnJ9tToo/nKLFUqufR3+cVov7+/lg7DQSRrV+5hh/HhwdhS5nLtbZxw52zV5Yp3YmD6dfh0eRNtk/ORl+c8KDVd7HilSFVv/ziUuH8kpxDz3B9x+mugrPpoNDU1K9K2zfsFO/QjIZIpoOTsPhuVuNZGvWruiHZ19OBk75FqnU9X48PHOJmI14Xa8n4dnx9Ot7IuO1Zv2YDQ+HZ0cDE2Nf+oMTx0jltPeQ8U+G/aNoOhxGJ/3xsQtEnG7tc3A8qOwNnbp9S63+aTw5H42G42l4FJ2GR4N+NP0xclka0cCe8kl4FI37Z8ehye+T/nQw+TJwTMlvW6rNmnwfhYfT/vvCnVWuO6JB1D+N+tE07I+GLmnQ1qt9sg8mVfXqdqQTrfoxvqHINNqRPv2mLq2ioF675jNQR0fhKDw7Cs8OXYbE6e41Z7+rvuD1a/d1w2F02j/78dSCuLANnG7tnXU2Dcdn/ZNoEo4vwnEUjsdDl85b0t9HxTo4HZ2EujlxbsSp5j76zOP+NPzWd4lqqlWfFRlfDA7D6Pysf9EfnDieGbx27cqwmt07auTXmnXHYiQvwvFE71dzJD6d4w7D2mrkHSNEt1tPXUHV3jFjogL7uONiLL51zWWNUsI95LCW3X2sFHZx+VZWH7JUzxbXG419+GYjfJvrLYHt5PkoPAmn3Hbf4vxZZx8z708PvzrOfaOyB+/9kxM335XCHjwPR/r0507oLd5flPYwgq9hf8dc8ZzCKo09+J6E/bEr7M867/OP8uXp4DQ0vRe3/C8P95EnLWtv5Ug0MqnG+85lCt7Nx0r4LVdvnn6n3CYRXG6k6/t0clnf4+Fkh2B4ZsAm8h508Hjh4vGivsfvLkB+3weO/5uwl+OCy410XZ/9i/7kcDwYOWwUolPT/4glqQTHoy3U1O4zHjl4rIRrewydXIZ78Hk8+LK7y0q4psfPp6PdPVbCNT1+Cz87uNxI1/Q5uXCAshKu6XFwONzdYyVc0+PpyN/dYyVcF8m+Q3avhGt6HB474FgJ113VoO+wqka4pscvJ/3D3V1upGvHTuASO0F9j/2Lwe4eK+G6cxw6RGslXHd/nLrsj9M9ePxy4uCxEq6fzR3K2I10XSR/c0Hytz3M8o+Bw5FVCdf0OO5zLLLgsRKu6bHzx+4OjWxNf1OXGU73McNjhxke72GGn//wHGorI1y3Lj9yqB8r4Zoej4YOh1UlXNujQ9NztOXa0mWO350m+X0vs3TyOd2Dz+/sdx6k3nnLVxwcPDpgWQnXn6PDum6k6/t0OCM30nUzgQs1MNoLJ+CyL7e9TuAyRwcsN9L1Z+nicy/7cjRyidmNdE2f4XfuwkRwWQnXzXjsPYWU8LbcUexeR04cepBKuG5F0HfYI5Vw3fp8+MWhJNhI78GnQ+XzJF63npw6TLQSrstGuHgc7sNj6JJjw33kWM1Xn3B3aFv47RP5Bm33vdl36Lgq4dpslsspvZGuG7MOBdeW15UceB4HKCvhuh79866Dy0q67qoOx2P+23DS0j4r1OWZvzlkhEq4bkYYnX92SAmVdF3ubsR9KVfi7kbyl3J3rw1OHXjfSrjuurrcI4b7uEc8nTjMsRKuu6rfXFb12z48fnfYH5Vw3TP68/8czmgjXDcHTB0ipxKu2x9wr1VK3YH8MuXuNUH/wuFSZCNd900Ch/cI9uBt5FB9VMK135RweVFiD/yyw6kx3sOZcexwHXq8h9vQ0VcHBCvh2mf/4ItDzfEkXtPrbw4uf9uDv7FLzzPeR8/TP3Gg7Svh2jchLtc9nXff93jdl6/rZTc36FfmNsZ+rT7e+pJeC15e+ptlaVHm61mZbTX1gcrxI9+MSFiihbpTi60+niRerJfF/Jek+GWVJ3fVz7fJvrxm8LI2hSpP3nSHhHacD/GxyG62z8Y8f49lledvoPEk8R7r93GebjW+EXiP7SS9zrba3gi8x/ZcXa23r/iTxHusl3k8U1utP0m8x3pRxnm5PRg3Eu+yvp7NVFFst/8ss6OHV79JHuqYm8o/fchIbX9VOEBhc5f9pb4l5a1R/xqn80WS3nyJdbphfwhyq8L731B28vDhDZln2/yKv6H9xpr89+dBI0nn6qHx6d/GncqLJEsbnxreR/9jr3HQuE7UYq5/5r+a6IH+rcCl9vvn5tmF0na0RCXya7NxcNk8CHofO0Hw558Hl08a5oH5wIhB4+ASODEgYl7j4NLjxDwi5jcOLn1OzCdiQePgMuDEAiLWahxctjixFhFrNw4u2wd+86PXbRGxNhHrNA4uO5y1DhHrNg4uu5xYl4j1JKc9urx6tXvs+lo4GCBYwIBCAXrJgceMogF61YGFDSggoBceWOSAYgJ67YEFDygsoJcfWPyAIgMaAWizkhQc0CAAiyJQfEDjACyQQCHyNBDAYuRRjDwNhMdi5FnbxewXFiOPYuRpIDx+a1GMPA2Ex2LkUYw8DYTHYuRRjDwNhMdi5FGMPA2Ex2LkUYw8DYTHYuRRjDwNhMdi5FGMfA2Ex2LkU4x8DYTPYuRTjHwNhM9i5FtZzaQ1FiOfYuRrIHw+A1KMfA2Ez2LkU4x8DYTPYuRTjHwNhM9i5FOMfA2Ez2LkU4x8DYTPYuRTjAINhM9iFFCMAg1EwGIUUIwCDUTAYhRQjAINRMBiFFiHTyCl7oBCFGgcAhbMgEIUiEdQQBEKNAxBcBAEH9t+m0pShIKuaJICFPRkkxSgVlMy2aL4tAw+/MlL8Wl5okkKT8vAw4Zmi8LTMsUBG5otqzww+LCh2aL4tDQKARuaLQpQS6PQYkOzRQFqaRhabGi2KEItDUOLDc0WRaitcWixEdemELU1Di02fbQpRG0NRIsFs00xamsgWixGbYpRWwPRYjFqU4zapoZjMWpbVZwGosVi1KYYtTUQbRajNsWobTYRi1GbYtQ29RyLUZti1DG7iMWoQzHqaCDaLEYdilHHbCMWow7FqKOBaLMYdShGHZPm+IKXYtTRQLRZjDoUo47JcyxGHavYNtU2i1GHYtTRQHRYjDoUo44GosNi1KEYdTUQHRajLsWoq4HosBh1KUZdDUSHxahLMepqIDosRl2KUVcD0WEx6lKMuhqIDt+XUIy6GogOi1GXYtTVQHRZjLpWT2SaIhajLsWoq4Hoshh1KUY9DUSXxahHMeppILosRj2KUU8D0WUx6lGMehqILotRj2LU00B0WYx6FKOeBqLLYtSjGPU0EF0Wox7FqKeB6LEY9ShGPQ1Ej8WoZ7WuGogei1HP7l5N+8r3hU2rgW1qLHp8Z9i0WtimWDdUj7CohqPHt5FNq4ttakB6fCPZtPrYpoakx7eSTauTbWpQenwz2bR62aZBTGj5rW62adrZJt/1N62Gtmk62ibf+Dct4Ay7AE2+939FPVTcAw+zzT5U9EOTx9kmIAzNwONsMxAVBdHkgbZJiIqFaPJI2zxERUQ0eahtKqLiIpo81jYbUdERTR5sm5CoGAmJ4rHwq0gJieWx8DPkAwhEj2ezRxV9xINtkRNgKAgQ6B6LnwDDQoDA+FgUBRgiAgTSx2IpwHARIPA+FlEBho4AgfqxuAowjATw7A9YdAUYUgJ4AggsxgIMLwE8BwQWaQGGmgCeBgKLtwDDTgDPBIFvU4AVB8gjaLEXYDgK4PkgsAgMMDQF8JQQWBwGGKYCeFYILBoDDFkBPDEEFpMBhq8AnhsCi8wAQ1kATw+BxWeAYS2AZ4jAojTAEBfAk0RgsRpguAvgeSKwiA0w9AXwVBEENo9bEbk8gha/AYbFAJ4wAoviAMNkAM8ZgUVzgCEzgKeNwGI6wBAawDNHYLEdYDgN4MkjsAgPMLwG8PwRWKQHGGoDeAoJLN4DDL0BPDkEFvcBhuGAQCDNLQQNyQE8+wItm4yv2HgeQYsEAUN1AE+tgMWDgGE7gGdXwKJCwBAewBMsYLEhYDgP4DkWsAgRMLQH8DQLWJwIGOYDeKYFLFoEDPkBPNkCFjMChv8Anm8BixwBQ4EAT7mAxY+AYUGAZ12gbd+oVFcqPIIWSwKGCwGeewGLKAFDhwBPv4DFlYBhRIBnYMCiS8CQIsCTMGAxJmB4EeB5GLBIEzDUCPBUDFi8CRh2BHg2BizqBAxBAjwhAxZ7AoYjAZ6TAYtAAUOTAE/LQMe+FqvuxXgELRoFDFkCPDkDFpMChi8Bnp8Bi0wBQ5kAT9GAxaeAYU2AZ2nAolTAECfAEzVgsSpguBPguRqwiBUw9AnwdA1Y3AoYBgV4xgYsegUMiQI8aQMWwwKGRwGetwGLZIFudbnJI2jxLNCt7jd5BC2qBQyhAjyBAxbbAoZTAZ7DAYtwAUOrAE/jgMW5gGFWgGdywKJdwJArwJM5YDEvYPgV4PkcsMgXMBQL8JQOWPwLGJYFeFYHLAoGDNECPLEDFgsDhmsBntsBi4jxmtUlNX+jbDExnmFbgGd4PIuK8QzfAjzH41lkjGcIF+BJHs9iYzzDuABP3XgWHeMZygV47saz+BjPcC7AkzeeRch4hnQBnr3xLEbGqxgZnr7xLEbGM6SLx9M3nsXIeIZ08Xj6xrMYGQ+qNw14BC1GxjOki8fTN57FyHiGdvF4+sazOBnP0C4ez8l4FifjGdqF5Xq8DSNjXnHS/3m5mg+qV50uLxudfxoH/zaizbtPunUx9vRrULph+fTvf/+9vO2k/6Utd/5JVkStBy9qej/wak9vcL0otl/U2lrsoNGr/qhcHzSCzcdBt/qz1dz86VV/ar6y+gv41V/0bAX3ZVZs3rZ7GYHffRmC3xM049lMrUo1x4ot70WxJSrq/+4brVOziZa32RW1KCg9rNUTfS2vkpt1ti7IKDtohSU449VfxF8HoakrDEHrLiFaHnKlOQVe6yqeRzdxqe71/3L9oo2n2Ots0c3V32tVlCSIghfdDoi6hTJCSNHDUeuJisSZ7hVeptmWYu1qSTcI4MXxxMX5x6O7sYt3o7QsM6LTxeD1JPBm8Sop40Xyj6KTw3OTVJ/+/+YXvcB/0QukJZll6fUimZHV7CBFMdDIu/J4W/g46Uj4zbK0TNI1HS/CsOXLijpZruI8XhZ5ti5VXma5ulEPBFoPRa4nRd9sRcOh62GQRK1cxXbWQei2pPwxK6gzHzsT16mgWk0ceyDGXnFHtXpYSxrg5s1yvIh4FZtSipur6yRVc3WVrdOZuk5JBsGZdat+9koXhb0UvZVqkaQ3C7XKs2VSWDbQcsnT1jbK2zwry4WljvKDtNZztVAlieMexqgpbdi5dQi1ArzLpfCfL2/ooYBDtiuF7Dyj2SjAR1cg4prNHqgadtaSndHUHODU1xKDICstZ3h/tKT9Mb+31gPnyq50tM4frqkWPj26UrCpOF883iZpSbZkgEK8JYGtlhRsnGF1Ty9oWSvZxivZkVZSrdZX1BlGuyOhvfm2Dc7kHbz7xak9WIcVnlpbnNqDmq1LNcvS2TrPVTojdQeOz0CKs42Jv9fKOkbQKgWy/5WalbH+GkR0HScLms/xad2V8kalFs3VSqVzewZdFIdicr9exHRfejh6fSl6rxc0u/sYX7Favs7yq2Q+VyS/tXGCE/2Z77zMY5rlcCy+qXj1GOc5rS1Runvb8dVjmSxVUca0gEP5SFzjZxvawtUj02ugVmOrEbNDuG5Fd46o2pCtrFNaNqDU0Zb216Ysj/TwszVJCD00f7EBuVFUB4dYUxrqjSqrfVlqt0nBTBoFnZSJbhKaZgGnWU9KszcZrZPwgHtSqNxkKYnODkJEPBZvrC4bdwOBhMdtXGT3ZBP5yJcvzepWxQR7/RoKqsmkJbwtl1QLj1FsBqqvhmE1vPJiK35blquoKOOSdqsBLsSktTS6m69oRWlWRsV6tcpyq1DGzQGIjEQSxcsojkoVr+gJiAv0rhTwyYwGEG4F9AsJgpb5ziY+/Xr49JMOgSQtVZ7Gi6hQ+Z3Ko1enaBcVgz1p4auvwd0n5a3Rv918De766auBONW0cKqRtkNSXGUZCQEPRYAn1bK6fL5WszK5U+l6eaXITHy0+L6UOJLiOl4UZMj4ePKl8EkKWnh7OKOKy1akCZmkjzALxOgq0jWtvT2EkRwgBbMk6BD0pRMoKbKrn4p22B4+ueS1XOXJMtFoEF00SV+e5KYdIsPFR50cOqs8W6m8fPxLURxRBPlyBBUlWSJc0ogMS1IUj8srK2AxjyAPdp3OFTllMOHlidu2uIsXyfxVUYKJVpEs2yjbBRE+PnzJ8c/4LqbHG85OYk7TasUsT1a0IQB8hog0x8+Vok0SIZTEtf25srRwgyoG7c8iS6kaLhQ9KV612oIekG08OZFB/IuuCE63IFKWC5XelLeGtUxyekLhBlJszDa/4YBPC5yvxLLK/FoC1sJJuSmlucXmNzCwIs4fTWltlv66S5cUVw8dKb6XAQ1RnItBzPzLmJJpbXzUd6SVXKryNpubgiFeLLJ7CkYbpTp5uMlSmSsMiynDowbRf1LMk1zNrDoFk3MiW7v8y+rDcMCKbesyo1r48AExry6zOzWPVipfxqlKywXJWi1kQuS+lyuf+sX7UjxHlquAauFCUix2lytrK2OtjqhVWFwORrArxl1BLzxahC2XkttyvShWi4QmDxyxkmKaRZq71h9hBNBQ2xLyaZZG8bq8zfJEMw93KtJFp+4sE5ozMYXSlpBJs8y6zMB5VlQqo+raTP90D8l76BzqSFGo1V91sW0UfSK2WjNZrhZKf2rtNbTJe9Im1/rLbJ5cJ1aGQLNuS4dudvWTBhZOg13JZVW1ldnfa5UztAGQ/kCycUN1cFEDYsWYkYu/FkKmJSGTrcwvetAMiCNCZO+zkjbpbVyQtCWtVZwXyioQyW2ahMUqzsskXrCbCN87S9t9FZezW9JSkisGaX1W8eMii+dRmWXRIs5vaOyjgYuc8Sp+1P9miwac3zriyOd0oXGzAoG4Xk8pP8pVdVIRxyieREJ4dWtdc+FsLPakq4S+FIDJ/0Cco7VHSEoVL3NXGb06xmWR/oqSpGXdM+D1FG/hVvY9A767AzHbrlaFpYYPezHlr6yCPcCHvbiZVyt7jHhPiq81rHLNp88TgdTGlxziaUpscKGOg6cnW8n07zBZGRNPviWGXZ49PJpjUqVlMovFgeDXIToi2hZhijOUWG+vrKyG40q8DUCnRJm9bviB9CWCjTxO55nF9+EiVlSjzQHmI0Hcqjm9JOpiJRHYzXseUVW2k6XF+mJH8qTPkNn4JlO8pNroq3mUx+mNqojGuEyK68QuaHBj3ZV2Wq4KVbJnEaoixUus3Do6cSWj32zktQoV5/QI098yRDBLi1coFWWaIiQnAJpmW5qmJieTmYrWaXwXJwt7qfB7YluGXRqy8y5eVLcxFn4BvtAxAzloiFfLhSqZHhpTRWLaLxZK0fMMZ2IpcDe/PIeJVNxCy2teWhe3eB+LYfX8O3TYH+azxAK9uLMOUBxSIp1V3Fs1HNYSk2Nxn1xbSQrnR7EWL+6TcnabpDfRKs/KbJYt6HUBMtKSUCztnIWPfPFlpVItV1ke5498MYQQFQtXXQAu4/Tx6ZU1MnQ8f/GqqczMxRhdcBwWYvu0+XFFHBT4XTfxEogOUn8FAzkTh2klJ3zZCGKrVD7QieHrBhCb4nW66Wv/sepipC1SQOtUeO2NkAai8lzlC/3+Tna7tt7uwyeSFFHrdFOr6JwY6ZKjpPf4yIj4Rtg6fb7sipZqnsSv3qjFNYTYcK7zpOpPMlo34ZwjvpxS/Z4pzqb4UkPsi+7jghYc+LVNEHuZ+9gisUgOltbpXl1RZ/j+BMQLm3t1ZTEdeLeJl1n3S2uMeAOIBP19dm3tG5wTxVt6rUbfEsWkHIgn8wPNnRCQoJWW/2FhoYZzLohvIT0srCYGv3EJYkn+sLCaGJwTxAz/YF1B01JWSs/2K+w+4eTYFPLngelVdRJofLr887///g9yaAgf/rMAAA=="; \ No newline at end of file +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAE7Vd63fauNP+X+jXbBcJc+s3mtCWd5OQJfSy27OH44CSuAs2a5tcumf/9/dIMmFGzBgr5vcpLZ6LpGc0Gj0S5t9GmjxmjXff/238HcWLxrtOcNKIw5VqvGvcqfx0k6YqzqfRSo2ux9d5GsV3jZPGJl023jVuN/E8j5I4+5WRfHufr5aNk8Z8GWaZyhrvGo3/TghHt0m6CvOzMFeE7d1Df3Pvn3V7rvNwtS61DOT8nWjV98/s2NCCr+nLIE3D5wP9MDJVjS/UbRSrcTxXH2LCLnxcbrLdbnVerM5m+fOaQnLP3hv0yYse8HHSWIc6rJzGvkUtL+nb9D5N8nxZ1r+diN+wXUfx3VJdpckqysrsO3LHG0jK8Bv6UaWhdZXobpaMyJm6STblwbQTqTrYaRgvkhVh0D4oNSPbu8GcqH82KssnKt+ku/ZFca7S23Cusl+RQKlZ0ZSg62EeVjP3phClMcDtY5ypNE3Sit62sjXcLZNwAZNaucOddA2X4U2S5mpR0eVOuq5LH4fe7kqndQWHh+Yv1rNtZDq7thO5ovedtF+HZbPfFW3pTr6RdjZX6xwEse7Yi28g8Po8WWrxTbWhhC0t61a2TuJMlfVrT6J+x2iTh3u231i+a0OdPfh+uY/rdoq0d6hHe20szfynSXwbleUyK1A986/DNFxl1Qy+eREuDbuija9baqC7KktNubN0byJU7SqtWaspe5FbvS2kao3GKCfoqraE0vNshuy5Mf3iu7C0dVwaxG2xm+bzJM7ydDOHM5yy9QYLljb8NRFF+jwUSHm2+CXKflmn0YPdOlZvSUlAMU05EEevbgsfT2RDysPo1a24CTP1OV2W+94Jvc6jbAa7CN5kqqQqIP1zKlWjsXQdqu7xLfnpL6Ko0n6Rh5pEG6A/LR0+vvrge0Pp/I8HcL9eoT/eDWFQbQirGi4ZRLbO4bpDKPxPh2+vMiI+exm4KsNWxSA3YHeqfMl5YwWqDgiyvVBLlR8YjxeZV3lYJwdWzDeFxOusbw4Z37zedpjP7w9YL0ReZT+tUE682Qm9yod6UvPNIYB3QkdYYm420XLxklKjA90jpI/VhvfJ4rmC80LsWF4Pr+c7qSP4/JFE8UGXO6EjeIyy02S11hnhoF9X9AjeY826L6Of6pMKF+pQ3UZIH6EN6SbeLxkOlbKczrHa411bs0rHaZG7uB1uDqVxhLasw3RXnhzK5lj0GCOhVslD9WKREn9dKwCZHycJdRCnP656HpAtlaJsmM+rGlltltfrJVgRdna2j6qa2sQLlS71OVLyaUMeMzoSVQ3Pw3WUm5RB2Nw9rN7O0zKD8HFVkyZIf1PUkeT2UVVT/2xUWpyMTpPxzQ81p7AhpKo6SIz0NPl9Z4JwQEhVhiuJH1SaXxmeb5JscpVOk4m6Gz5RMVEiXdWh3o2bf+5b3z6qairK2CHfPqpu6vp5dZMsSVP2UXVT5EGi/tijNXlKNyU/wFlDI+8TpkP6QXUzn+OFuiXtmCfVDV1ulnR79IPqZq7SaBXl0QMVQuCpB17hMqOyQfHEp4OrG0UDZx9VNzW8vVVz3Y0Sm46Mzwji0zQ8fuZZVWP3YTZ+pOLdPqjepi/hMlpwV0XgY69urlWaP9O5Hj33bCdz5wc8rW7wIrmJlrQ1+6iqqVmesCvEyzOPYI6YyRpVnqvFtvg0iefmmtWcwmFfyNP87xu1ocYPPq5cG0TkzRX98TFuwLzYeWP+dYD9MjKmRczSvVon5CwunhyjxdDUm+1/DrR7K7ZtIF0Qq9ycPD2ES3uNLdlQCzkl9os4Rs9KLL+hnh3qNalD9pIbj1G18dgTO9Jo0HbfkE8Oj8W+DtlDcizCxzDKpwnRzOJJaY9bu3PCT9Pp1ex6Oph+vn4x9hCmUXizVNmv4Onrh5A3d+geAGwcc751Or6cji4/D6t7ewtUDrrdwsh4v/46mp5+Gl1+nF1NxtPx6fi8yihuG0Jr123T1WR8Ory+Hl1+9GgKUqrbguFgcv7Hp9Hl1GcwkFLdFox/8/BshOt6PJ0MB9PhmU8YvmjU9T04PR1e+TkHKnW9X44vZ4PP00/jyWg6mI6+DGejyw/jycVgOhpfejTpkJ367ZzpmT+8nHo1CijVbcFkeD2cvqIRrl7tDDGYTEeD81e0ZF+zduxevB99/DyutPq8BC/Qqev/YvxleDa7Gk4uBpfDy+n5Hx7toHTrtufD+POlz0TeytdeyYbD2Xj6aTjxWb+ATv3ZOZ1djM9GH0ZeecxRq9uK6fDiajwZTP6YTYZno8nw1GdykMq15+o2ul7TIlK5boveD85mk+Hvn4fXPk3BWnXb8PmyWCn+9IoWR61+Hv3jwg7u759HE6+WEKr1M8fk/ejsbOiz5kKdY8xg3+wFdWpn8uH00/hspk0Ozs/HX73wIJWPMSK20Bq8P/fZoewpHmFP8O0PU10NL6ejU1NSvSpsD9ipXyGZDDGbji6G489+NZKrWbuiH19+OB955VugUtf7x/GlT8QU4nW9ng8vP04/vSYy9jXrx+zwdHx5NjIx9mEwOveMVEr7CBn/fDw4m03H49n5YPLRByJKt/Y6OBlZe2Ov3b6jVn81vv58dTWeTIdns4vh2Wgwm/5x5TM0rIEj5ZPh2WwyuPw4NPn9ejAdXX8Yeabkw5Zqsybfroan08Hrwp1Urtui0WxwMRvMpsPB1dgnDbp6tVf20bWtXv2WdKRVP8YLikyjPdOr39Rnq8io1675DNSzs+HV8PJseHnq0yRK96g5+1X1Ba1fe183Hs8uBpd/bLcgPmwDpVt7Zl1Oh5PLwfnsejj5MpzMhpPJ2Gfnzekfo2IdXVydD/XmxHsjjjWPsc/8OJgOvw58ohpr1WdFJl9Gp8PZ58vBl8Ho3HPNoLVrV4a2d6+okfc167bFSH4ZTq71fDVL4nYd92hWqZFXtBCcbm13BXZ7R7QJCxzjjIuwePALvLiVHO5DCmve3VurUMXloaw+JqmeEteFxjF8kxFe5roksL08nw3Ph1Nqupc4f9E5Rs8H09NPnn0vVI7gfXB+7ufbKhzB8/hKr/7UCl3ifad0hBZ8Gg4q5oqXFGY1juD7ejiY+ML+ovM6/yBfXowuhmbvRQ3/7uEx8qRj7VCOBC3jarxvVKag3by1wodcHVz9LqhJwrgspOv79HJZ3+PpdYVgeGHArvk56OHxi4/HL/U9fvMB8tsxcPy/a/JwnHFZSNf1OfgyuD6djK48JgrSqen/iiSpGMdXJdRU9R5feXi0wrU9Dr1cDo/g8+PoQ3WXVrimx/cXV9U9WuGaHr8O33u4LKRr+rz+4gGlFa7pcXQ6ru7RCtf0eHHVqu7RCtdFcuCR3a1wTY/jjx44WuG6oxoMPEbVCNf0+OF8cFrdZSFdO3YCn9jh3/1Q2ePgy6i6Rytct49jj2i1wnXnx4XP/Lg4gscP5x4erXD9bO5RxhbSdZH8zQfJ347Qyz9HHkuWFa7pcTKgWGTGoxWu6bH7Z3WHRramv6lPD6fH6OFHjx5+PEIP3/8pPWqrP/mXElWvy8886kcrXNPj2dhjsbLCtT16bHrOSo4tffr4zauT347SSy+f0yP4/EZ+54HbO5d8xcHDoweWVrh+Hz3GtZCu79NjjSyk62YCH2rg6iicgM+8LLtO4NNHDywL6fq99PF5lHl5deUTs4V0TZ/Db9SBCePSCtfNeOQ5BZfwSs4oqteR1x57ECtctyIYeMwRK1y3Ph9/8CgJCukj+PSofLbidevJqUdHrXBdNsLH4/gYHoc+OXZ4jByr+epz6gythN8+50/Qqs/NgceOywrXZrN8VulCum7MehRcJdeVPHgeDyitcF2Prc89D5dWuu6ojicT+ttw3NC+KNTlmb96ZAQrXDcjXH1+75ESrHRd7u6K+lIux91d8V/KrV4bXHjwvla47rj6nCMOj3GOeHHt0UcrXHdUv/qM6tdjePzmMT+scN01+v3/eazRRrhuDph6RI4Vrrs/oK5VcrsD/jJl9Zpg8MXjUKSQrnuTwOMewRG8XXlUH1a49k0Jn4sSR+CXPVaNyRHWjI8ex6Efj3AaevXJA0ErXHvtH33wqDm24jW9/ubh8rcj+Jv47Hkmx9jzDM49aHsrXPskxOe4p/vq8x7wYyHnyd2d2n/dq/249JJe1Z8KAaYq/VJI0SJmiJbqQe2/zxn62ErsrPMvpN3zhd6Km6n8/KA7IFSxP8jHMrkr703C/2hauWX8e3CU7fJfgSu3/hiCX8qjjBcCr7EdxbdJqe1C4DW2F+pmUz7iW4nXWM/TcL7/9mZofSvxGutZHqb7L6pHwVhIvMr6Zj5X2f4LsJH9F5mKHvZ+rdS8PnvKv0ORkCq/KhyAsHlI/lZfo/zeqH8K48Uyiu8+hDrdkC+nLFV4/Q1lLw9vDsi82KZH/ID2gTH576+TRhQv1FPj3b+NB5VmURI33jXk29bbfuOkcRup5UL/ALDt6Il+6eBK+/2rePZFzc0r0N99tyK/Nhsn35snbfG215d//XXyfathHpgPjJhonHwXlJhAYrJx8l1SYhKJtRon31uUWAuJBY2T7wElFiCxduPke5sSayOxTuPke+dEdt+2ZBuJdZBYt3HyvUtZ6yKxXuPke48S6yGxPue0j4dXj3afHF8HBwMECZjAUAg95ILGDKMh9KgLeRJ03nZ7AZbEgAg98KJFSmJMhB57QYInMCxCD78g8RMYGaEREB1SEoMjetywCwyP0DAIEm6BEZIaB0EiLjFEUnDOpTNZDEIk6hIjJFusSQyQ1ChIMjwkBki2WZMYH6lBkGQcSYyP1CBIevpjfGSPjTiJAZIaBUlGnMQAtTQKMqAkWxigloZBtklJjFDL5LMOKelkNI2D7JKSGKJWwPaohSFqtfkeYYxaHb5HGKOWwYgM4xbGqKWBkGR0tjBGLTbJtTBEgcahRUZngCEK2DkUYIQCDUOLjM4AIxSwcyhwVh2NQosMzgADFGgUWiSUAQYo0Ci0SCgDDFCgUWiRUAYYoECj0CKDM8AABX02jAOMUNsgRObDNkaorXFokYHUxhC1DURkILUxRG0NREDGRxtj1DalAQl72ykONBABmZTaGKO2BiIgy5I2xqitgQjIxa2NMWprIAK6OMEYtTUQAbm4tTFGHQ1EQGLUwRh1NBABiVEHY9TRQAQkRh2MUUcD0SYx6mCMOhqINolRB2PUMRUciVHHqeE0EG0Sow7GqKOBaJMYdTBGHQ1Em8SogzHqaCDaJEYdjFFXA9Gmy0iMUVcD0SYx6mKMuhqINolRF2PUNamOxKiLMepqIDokRl2MUdfUCyRGXYxR1xTaJEZdp9TWQHRIjLoYo64p6EiMuhijrlmMSIy6GKOeBqJDYtTDGPXMakRX+xijngaiQ2LUwxj1NBBdEqMexqingeiSGPUwRj0NRJfEqIcx6mkguiRGPYxRz+yHSIx6zo5IA9ElMephjHoaiC6JUQ9j1NdAdEmM+hijvgaiS2LUxxj1NRBdEqM+xqivgeiRGPUxRn0NRI/EqI8x6rN1dx9D1Nc49Egw+xiifpc1iRHqm00rWa/0nW0rv291N65N1qZ9BmXZqs4+gqIaiR69f2w629emgYneQTadDWwz4Jvg7GCbGo8evd1sOnvYpgGL3kc2nV1sU4PSIyPVPoOyBjGGGHC2sk2NTJ+mBpoOapZvoMmBPcZBQ9MnA1G4nINhFvpkXhEu62C4hT4Nscs7GHahT0PsMg+GX+jTuLncg2EY+jRuLvtgOIY+jZvLPxiaoU/j5lIQloNoMpyOA5ylIZoMreMgJy1ZREMnXbrIsBFNGjuHjxCGdhBNGjyHkxCGeRBNGj2HlhCGfRBNGj6HmhCGgBBNGj+HnRCGgxBNGkCHoBCWoWjSCDochTBMhGBYOYemEIaMEAwx5zAVwvARQtAIOmSFaFnGj0aw5XJ+BkGGoXMoC2GICcGQdA5rIQw3IRieziEuhKEnBMPAOdyFMAyFoEk44dAXwpAUgqbXhMNgCENUCJo4Ew6LIQxXIWhKTDhEhjB8haBZMeGQGcJQFkLSCDp8hggsbUsjGLjErUFQ0gg6tIYw5IWQNIIOsyEMfyEkjaBDbghDYQiafxIOvyECyxLSCDoUhzBEhqDJJeGwHMJwGYKmjYRDdAhDZ4gWjaDDdQjDaIgWjaBDdwhDaogWw5I7CLb5yqXtcu9tlsESDukh2jwzJRzaQ7R5bko4xIcw9AbNjQmH+hCG4KCZLOGQH6JjoWPOCxzoOhY6OpAdCkR0LHR0IDssiOhY6OhAdogQ0bHHJnQgO1yI6LAbBNFxT07M1KMJM+HwIcKwHoLmzIRDiQhDfAiaNhMOKyIM9yFo5kw4xIgw9IegyTPhcCPCMCCC5s+EQ48IQ4IImkITDkMiDA8iaBZNOCSJMFSIoIk04fAkomtPvmiwHapEdO3hF41g1z3+MgjSjJpwCBNhaBFBk2rC4UyEYUYEzasJhzYRhhwRNLUmHOZEGH5E0OyacMgTYSgSQRNswuFPhGFJBM2xCYdCEYYoETTNJhwWRRiuRNBMm3CIFGHoEkGTbcLhUkTPnmDSCDp0ijCkiaApN+EwKsLwJoJm3YRDqghDnQiaeBMOryIMeyJo7k041IowBIqg6TfhsCvCcCiCZuCEQ7AIQ6MImoQTDsciDJUiaB5OODyLMGyKoKk44VAtwjAqgmbjhEO3CEOqCJqQEw7jIvr2KJpG0GFdpGFWBE3LSYd2kYZbETQzJx3iRRpyRdDknHSYF2nYFUHzc9KhXqThVwRN0UmHfJGGYBE0Sycd9kUahkXQRJ106BdpKBZBc3XS4V+k4VgEzcJJh4CRhmQRPRJB6TAwUtj7BDSCDgUj7a0PmuKSDgcj7cUPmriSDgkj7d0PmrmSDgsj7fUPmrqSDg0j7Q0QmruSDg8j7SUQmrySDhEj7T0Qmr2SDhMjDdsiaPpKOlSMtFQMzV9J90KIpWJoAku6d0IsFUMzWHLvXoi9GEIj6F4NsVQMzWFJ93qIpWJoEku6N0QsFUOzWNK9JWKvidAslnQvitibIjSLJd27IoZtkTSLJd3rIva+CM1iSYeKkfbKCM1iSYeKkfbWCM1iSYeKkfbiCM1iSYeKkfbuCM1iSYeKkfb6CM1iSYeKkfYGCc1iSYeKkfYSCc1iSYeKkfYeCc1iSYeKkfYqCc1iSYeKkYZtkTSLJR0qRhq2RdIslnSoGGnYFkmzWNKhYqRhWyTNYkmHipGGbZE0iyUdKkYatkUyV8kcKkYatkUyl8QcKkYatkVy178cBAN7W4tG0KFipGFbJHO3y6FipL1uQrNY0qFipGFbJM1iSYeKkYZtkTSLJR0qRhq2RdIslnSoGGnYFkmzWNKhYqThW+jLXtLhYqThWyTNeEmHjJFtCyCNtsPGSMO4SJrxkg4dIw3lQt/clA4dI9v2zh0dGQ4fIw3lIml2TDp8jDSUi6TZMenwMdJQLpJmx6TDx0hDuUiaFpIOHyM79goeHRkOHyMN6SJpWkg6jIw0pIukaSHpMDKyw57byoKPMZe9H1Saq8XIXvr+/r3R/dk4+bcxK26B642LsacvhOvtyrt///tvd+9b/09b7v6M1lBNz4sXNT0baLXtXfadIlAzvk4afftH9OxfKYq/reJv2/5tFXJB8TwonveL5/1u8Xdrrym2/wiKf7S3/+gUOnqcmIbnSVZ8Y2HX9m531/h+k9EMbxL9jQwwwqDLgvNntNQC6bWBHodLOJ+rtaPYl0BRCE5zuUTeWsgd27vlTxwGbRgGrK/VTXS3STYZamYXNpPt4Ppv5LAJ467FxV34EGEI4JD0epzWYxjleQI1ewFQbHLubsLF7C7M1WP4jMcUzq2gX6Kdqn82KsNx04S+7XQgtTNlpIBqu7/T7PKNzpT++goc3d5Or8WF6k2Im9kXABE2wG9WaxzcEJEuh8jNJloubpIFGtYW6B2beYxmMapRHKEmt0A32Zg1BpzxCQCebRaQnxIn2BZMsFwQzBEOMGfoapHRCddRHi6jnxh84K/DTat5slonGdLrAUTYdWCexLfLaI4jQMAesnMSfRUU9BWkgdZLzg94I3kUb3DDYYJttnlNvRKuwzRcZWmyyVWaJ6m6U08oMNsgNrpcbMzXeDEUXQgXFxjzVIVuqhYwB3JJd55hbz3ojR2pDGnp8xWQ39kwzB6wFsxBXa6BizAPkRqc3FtMuTlefP0SdLAFmqrLOk7vNorVQt0km3iubmM0rjAiSvWTPV2wonGxZFWzKL5bqnWarKLMsQEQ4rutbeT3aZLnS0cdhBOXTxdqqXI0DeCoBe1tycO6d5b/Xh9mcbbjK4xUEwZ+iwv8RTLHGREWDU0W32T+hNWgsybvDCenLkyl7Aq+SHLHGZxkTW6SLR7xeIgmHA8uiS6ebrEWXEHZdVeF6fL5PopzNK97KNQ5tNUKr/NN2LsW1zvlDGUfDqXkhlKtNzfYGYS7xcFdfDcdVk+weNouDGwPtXoU5yrVBbGzxEBU2M46BnDOBV1oFfsKFl71pPDUgoMtWP9Par5xZjQI+DaXxgq9eRLPN2mq4jmqlbogPPosYtbEPxvlLKxg3PrcfFNPazXPQ/3159ltGC2dTYyEK1zAdcIqzhZqreKF2wcBR1+wC97tMsRppgOr7x6H1u0Sr3gd6KzPRettkt5Ei4VCaVvAdKjvD7K6qzBfhBhsOE4HFW+ewzTFmw2wULMjBPTzaKWyPMRVOVi2uVjZ2dAWbp73d8lg2nIxY42YGUftsyUMfNnhFqPbZBPjagrmQsFlimKjNtPtTzY4w7Vg4cJuDe4U3k4ApeCFa+BafadyO1Fz3YAoI/oP4pabMHcRWkL0rQ5Qp3FLyB3a20qcF7lwvUtiHKgC1oTson/n0ExwZPscNvdhljziUgjo9bgxvVchzjowgPTdK0YtX+FiF7axw7Yxx4upvhMF1Lixv8/z9SzLwxyzID2YbtiixigXr2uYxUk+yzbr9T5jBEtAwW6No1m4moWzXIVrZ4GXcAACLvyjeYJjD3ahx2qZV7jASQ6zDUs4mRU5DpezTKUPKp3tlwmQtNB3QDk7+r0Yj1F+byzcF+/FuN2+KwQ2DK7X7A46ym6SBAVCB8wLdgpGmd5669rd5RbAcLDJQ280btU8jx5UvFndKDQSkMntcZEUZbfhMkMd7sDdCgtfhrcokFHr8s1dJTfREqUPWI/3uG1olMURGh1YjrOLcpTFG7yt6QBn3RJne2PZAUtJj51IWXLzQ2EyBBYdXR6EdRqtIg0j0gVZq8dOiKzYcaLhASmoxy3/RnOt0vz5b4WLRBC4PT5wsxwPEUg2XX6WZM+rG2eegMZ2+cZu4oVCixyszFjGMMoewmW02CuPIAvH1oKFsluawf0qSx7/CB8QByIhfy/ZZKrVsnkarXEmDuACxsbRjySK3TQCBpdl0X6s1R1O4bBUZsH8scZaAay32CTwI0twlRygAxFucmm1JV7e4ImBZAnxv9FI6nNkAAOXA5YqvsvvDQ0fpc6qig5i2M1y8RY66BmuI2xKXybhwqn/UIHF6zk1Myzm2twsXhZv/4PNhKPKstqr1qaH99Rw+WbJvVWAiUF4MiHYem4V4sOCPhxJdge/Uvl9sjDlUbhcJo8OjE3omm9wtFLm0BKzp/DMQV+555SzRZSquVuXSURlcBG/+tvZicIcwO6/V4mjBX2xC+wqeVCL2VqlqzBWcb5EuRIOt2BPdFbrFoYWTmt2zVytA9xcWDyzi89qvcDBBxkzyWplDlsJOc4WG3wZPjvsw4nFnlOuNstsvcTnTHBTxsZMnMz0oYb+CEIAU4DgsI+TeBZu8vskjTQD86BmusrWe+sI59w+DArBYRMnCZp3ML+zm6hY+9NnUHoTpjBtBs8c2tzImflqjrH1y09x5oXLkuRiWRvY4wIEpDgFGyJaN9L1uP7UnbVwzgdcwtAWVskiuo3cfAMjW3LlXHLzA1cNMK22OKe27syTfzYqJSiYNjxAYD3fOTUAHDC2iEzQcTycG/pL4ozO2rwcESdUmC3YM54kxzRHH9ZUktOyZ3x4kQN6XCyswzRTTmkM97YsI2AUU5WtkxiX5bCKY3e46zDNo3BJZgE4SGwlsA7z+T0ipIBaUFyr0V+E49SfdQ0yy5NktgzTO2cKwkWIpbzX4bP+P10/wSsbQrK9WGCo4aZEfyWB0dquYLNU2aUXu4Z5jz2xWN87d5vg6sIyCusI32zqAa0+N33WbqUHJx27GVon+GpIC5K9nS3ALDgOywPvtEj2eHTtnojBY3bJriHrdeaowfKSXcnWzv6nB6t2NrGs124bYX5grz6tU31csoi4Mwt0Y4utE5AVMvDhHTkR8HYS/YpdJ4XDQyP9Wg9W16UC0IRlBy5Nnp5N6aDiPJqHfB/g2aR+vQBjD/Po8C5Z0N3GJ9sJTL/B3Y9kT4zAypcn+zQMLEbZyw5pGC8STAHD9YwLnzTEBCTkikSfgznFh6IC1qJsbKRKF+rMsSbMHewKSlwsg2Fpb+ucNNiNcaE/s5srvISjbSo3s7cGqOMWfE/kQBf01aPIOW6HRG25tlrM0jC+U5Y9D/Mou4326k14ICJaB4aEQQXdzuGid98ELldg9ivus7LEQ2ErVfkmxUQLKkBZ7UzlZO0BWQ/21Hpb9XCDAaO8pAmuDTwaIM5sBjppsFk5xRWjhMqSPURPN3Hp+T+krNhCKt3EB3CFt6nYdGjMlI9IAO8ocVVppsIU14UCnmzotwxwimqW6HMSnBlRauTGQJ/SRHM128ThQxgt92ZYC8YkC0em7BA+hEt7Uu0kDlgd9LcFLlsjZionyDkYmWzplC2VwtcDwSjwA2hfyg/nM6xLSvRwG+ENGMmmo5dX9EN/sFZjqYfswdkBwoTOHkBkj3iGwWvKkq0Qssfo1iFm4Z6M3V5nj1E+v4/iu9k6TfJknizx8SmsdpocjLmzYsPjEtHnJmKuVuskDdNnZm8BFy92L6p3Vaswft7e8Ma7YMi9CvYEPk/MfQE86jA2WGqk+PEJGBkQLZbUwc2UcO5LdqXN3c06dMUuhfmTc/IB8wx7+rqJC97rp7vZhMsWSxVvYubuNGgye5KvD6bSpb68mdxv8AUaeKudvbeyiYuSX2fHmS7Ac+e+E5yH7HXiTfxyCWC2Uoso3PuujYDLr2DJpE0a2c1/4mxOYSkj2HuJm0yVXb6DGZ+lvjeaPymrqmC65juyY2G4xoDgYrcW9ods4JyBdSa7/D+GGd5L9FHxw0XDY4j5e8jdCfYY/1HdYGfwpFuwN/0e1Y3zNQxIkLAn5I8r54wBBij7TajH5NZJCDDjs/eztBr+BgVkryVbejzhlUHAq4+S/VrA09JBDX4NQrIXap+WLs0BY4Tdrz8tHZoDJlZ2+XpyLxzBHMd+ScH5xp6A1zwETVD9dWJYLZ3bGu++//Xff/8PxcdQzBHeAAA="; \ No newline at end of file diff --git a/docs/classes/Logger.html b/docs/classes/Logger.html index 27a2f737..f4d0e5ba 100644 --- a/docs/classes/Logger.html +++ b/docs/classes/Logger.html @@ -1,5 +1,5 @@ Logger | @cc-heart/utils

Logger class for formatted and leveled log output.

-

Constructors

Constructors

Properties

Methods

debug error @@ -12,30 +12,30 @@ warn

Constructors

  • Initializes the logger with an optional log level (default: TRACE).

    Parameters

    • level: number = LOG_LEVELS.TRACE

      The minimum log level to output.

      -

    Returns Logger

Properties

level: number

Methods

  • Logs a debug message (for developers).

    +

Returns Logger

Properties

level: number

Methods

  • Logs a debug message (for developers).

    Parameters

    • Rest ...message: string[]

    Returns void

    Example

    logger.debug('User data:', user)
     
    -
  • Logs an error message (should be fixed immediately).

    +
  • Logs an error message (should be fixed immediately).

    Parameters

    • Rest ...message: string[]

    Returns void

    Example

    logger.error('API request failed', err)
     
    -
  • Logs an informational message (general purpose info).

    +
  • Logs an informational message (general purpose info).

    Parameters

    • Rest ...message: string[]

    Returns void

    Example

    logger.info('Server started on port 3000')
     
    -
  • Core log function that handles formatted output.

    +
  • Core log function that handles formatted output.

    Parameters

    • level: number

      The severity level of the message.

    • Rest ...message: string[]

      The message(s) to log.

      -

    Returns void

  • Updates the logger's log level.

    +

Returns void

  • Updates the logger's log level.

    Parameters

    • level: number

      New log level threshold.

      -

    Returns void

  • Logs a start/init message (task beginning).

    +

Returns void

  • Logs a start/init message (task beginning).

    Parameters

    • Rest ...message: string[]

    Returns void

    Example

    logger.start('Uploading files...')
     
    -
  • Logs a success message (completed task).

    Parameters

    • Rest ...message: string[]

    Returns void

    Example

    logger.success('Upload completed')
     
    -
  • Logs a trace message (detailed execution info).

    +
  • Logs a trace message (detailed execution info).

    Parameters

    • Rest ...message: string[]

    Returns void

    Example

    logger.trace('Entering function handleClick()')
     
    -
  • Logs a warning message (recoverable issues or alerts).

    +
  • Logs a warning message (recoverable issues or alerts).

    Parameters

    • Rest ...message: string[]

    Returns void

    Example

    logger.warn('Missing optional config, using defaults')
     
    -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/classes/Request.html b/docs/classes/Request.html new file mode 100644 index 00000000..156007a5 --- /dev/null +++ b/docs/classes/Request.html @@ -0,0 +1,27 @@ +Request | @cc-heart/utils

Constructors

  • Parameters

    • baseUrl: string = ''

    Returns Request

Properties

baseUrl: string = ''
errorInterceptors: ErrorInterceptor[] = []
requestInterceptors: RequestInterceptor[] = []
responseInterceptors: ResponseInterceptor<any, any>[] = []

Methods

  • Parameters

    • data: unknown

    Returns string | FormData

  • Parameters

    • method: string
    • data: unknown
    • config: RequestInit
    • controller: AbortController

    Returns RequestInit

  • Parameters

    • url: string
    • method: string
    • Optional params: Record<PropertyKey, any>

    Returns string

  • Type Parameters

    • T = unknown

    Parameters

    • url: string
    • Optional params: Record<PropertyKey, any>
    • config: RequestConfig = {}

    Returns RequestReturn<T>

  • Type Parameters

    • T

    Parameters

    Returns Promise<null | T>

  • Type Parameters

    • T = unknown

    Parameters

    • url: string
    • Optional params: Record<PropertyKey, any>
    • config: RequestConfig = {}

    Returns RequestReturn<T>

  • Parameters

    • url: string

    Returns boolean

  • Parameters

    • baseUrl: string
    • url: string

    Returns string

  • Parameters

    • Optional headers: HeadersInit

    Returns Record<string, string>

  • Parameters

    • response: Response

    Returns Promise<any>

  • Type Parameters

    • T

    Parameters

    • interceptors: T[]
    • interceptor: T

    Returns void

  • Parameters

    Returns Promise<unknown>

  • Parameters

    Returns Promise<RequestInit>

  • Parameters

    Returns Promise<unknown>

  • Parameters

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    Returns (() => void)

      • (): void
      • Returns void

  • Type Parameters

    • T = unknown
    • U = unknown

    Parameters

    Returns (() => void)

      • (): void
      • Returns void

\ No newline at end of file diff --git a/docs/documentation.json b/docs/documentation.json index 2b56a4f7..5c2c7ffb 100644 --- a/docs/documentation.json +++ b/docs/documentation.json @@ -6,7 +6,7 @@ "flags": {}, "children": [ { - "id": 329, + "id": 491, "name": "Logger", "variant": "declaration", "kind": 128, @@ -21,7 +21,7 @@ }, "children": [ { - "id": 330, + "id": 492, "name": "constructor", "variant": "declaration", "kind": 512, @@ -31,12 +31,12 @@ "fileName": "lib/log/index.ts", "line": 80, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L80" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L80" } ], "signatures": [ { - "id": 331, + "id": 493, "name": "new Logger", "variant": "signature", "kind": 16384, @@ -54,12 +54,12 @@ "fileName": "lib/log/index.ts", "line": 80, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L80" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L80" } ], "parameters": [ { - "id": 332, + "id": 494, "name": "level", "variant": "param", "kind": 32768, @@ -81,7 +81,7 @@ ], "type": { "type": "reference", - "target": 329, + "target": 491, "name": "Logger", "package": "@cc-heart/utils" } @@ -89,7 +89,7 @@ ] }, { - "id": 333, + "id": 495, "name": "level", "variant": "declaration", "kind": 1024, @@ -101,7 +101,7 @@ "fileName": "lib/log/index.ts", "line": 74, "character": 10, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L74" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L74" } ], "type": { @@ -110,7 +110,7 @@ } }, { - "id": 350, + "id": 512, "name": "debug", "variant": "declaration", "kind": 2048, @@ -120,12 +120,12 @@ "fileName": "lib/log/index.ts", "line": 140, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L140" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L140" } ], "signatures": [ { - "id": 351, + "id": 513, "name": "debug", "variant": "signature", "kind": 4096, @@ -154,12 +154,12 @@ "fileName": "lib/log/index.ts", "line": 140, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L140" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L140" } ], "parameters": [ { - "id": 352, + "id": 514, "name": "message", "variant": "param", "kind": 32768, @@ -183,7 +183,7 @@ ] }, { - "id": 341, + "id": 503, "name": "error", "variant": "declaration", "kind": 2048, @@ -193,12 +193,12 @@ "fileName": "lib/log/index.ts", "line": 116, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L116" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L116" } ], "signatures": [ { - "id": 342, + "id": 504, "name": "error", "variant": "signature", "kind": 4096, @@ -227,12 +227,12 @@ "fileName": "lib/log/index.ts", "line": 116, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L116" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L116" } ], "parameters": [ { - "id": 343, + "id": 505, "name": "message", "variant": "param", "kind": 32768, @@ -256,7 +256,7 @@ ] }, { - "id": 347, + "id": 509, "name": "info", "variant": "declaration", "kind": 2048, @@ -266,12 +266,12 @@ "fileName": "lib/log/index.ts", "line": 132, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L132" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L132" } ], "signatures": [ { - "id": 348, + "id": 510, "name": "info", "variant": "signature", "kind": 4096, @@ -300,12 +300,12 @@ "fileName": "lib/log/index.ts", "line": 132, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L132" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L132" } ], "parameters": [ { - "id": 349, + "id": 511, "name": "message", "variant": "param", "kind": 32768, @@ -329,7 +329,7 @@ ] }, { - "id": 337, + "id": 499, "name": "log", "variant": "declaration", "kind": 2048, @@ -339,12 +339,12 @@ "fileName": "lib/log/index.ts", "line": 97, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L97" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L97" } ], "signatures": [ { - "id": 338, + "id": 500, "name": "log", "variant": "signature", "kind": 4096, @@ -362,12 +362,12 @@ "fileName": "lib/log/index.ts", "line": 97, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L97" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L97" } ], "parameters": [ { - "id": 339, + "id": 501, "name": "level", "variant": "param", "kind": 32768, @@ -386,7 +386,7 @@ } }, { - "id": 340, + "id": 502, "name": "message", "variant": "param", "kind": 32768, @@ -418,7 +418,7 @@ ] }, { - "id": 334, + "id": 496, "name": "setLevel", "variant": "declaration", "kind": 2048, @@ -428,12 +428,12 @@ "fileName": "lib/log/index.ts", "line": 88, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L88" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L88" } ], "signatures": [ { - "id": 335, + "id": 497, "name": "setLevel", "variant": "signature", "kind": 4096, @@ -451,12 +451,12 @@ "fileName": "lib/log/index.ts", "line": 88, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L88" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L88" } ], "parameters": [ { - "id": 336, + "id": 498, "name": "level", "variant": "param", "kind": 32768, @@ -483,7 +483,7 @@ ] }, { - "id": 356, + "id": 518, "name": "start", "variant": "declaration", "kind": 2048, @@ -493,12 +493,12 @@ "fileName": "lib/log/index.ts", "line": 156, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L156" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L156" } ], "signatures": [ { - "id": 357, + "id": 519, "name": "start", "variant": "signature", "kind": 4096, @@ -527,12 +527,12 @@ "fileName": "lib/log/index.ts", "line": 156, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L156" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L156" } ], "parameters": [ { - "id": 358, + "id": 520, "name": "message", "variant": "param", "kind": 32768, @@ -556,7 +556,7 @@ ] }, { - "id": 359, + "id": 521, "name": "success", "variant": "declaration", "kind": 2048, @@ -566,12 +566,12 @@ "fileName": "lib/log/index.ts", "line": 164, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L164" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L164" } ], "signatures": [ { - "id": 360, + "id": 522, "name": "success", "variant": "signature", "kind": 4096, @@ -600,12 +600,12 @@ "fileName": "lib/log/index.ts", "line": 164, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L164" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L164" } ], "parameters": [ { - "id": 361, + "id": 523, "name": "message", "variant": "param", "kind": 32768, @@ -629,7 +629,7 @@ ] }, { - "id": 353, + "id": 515, "name": "trace", "variant": "declaration", "kind": 2048, @@ -639,12 +639,12 @@ "fileName": "lib/log/index.ts", "line": 148, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L148" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L148" } ], "signatures": [ { - "id": 354, + "id": 516, "name": "trace", "variant": "signature", "kind": 4096, @@ -673,12 +673,12 @@ "fileName": "lib/log/index.ts", "line": 148, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L148" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L148" } ], "parameters": [ { - "id": 355, + "id": 517, "name": "message", "variant": "param", "kind": 32768, @@ -702,7 +702,7 @@ ] }, { - "id": 344, + "id": 506, "name": "warn", "variant": "declaration", "kind": 2048, @@ -712,12 +712,12 @@ "fileName": "lib/log/index.ts", "line": 124, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L124" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L124" } ], "signatures": [ { - "id": 345, + "id": 507, "name": "warn", "variant": "signature", "kind": 4096, @@ -746,12 +746,12 @@ "fileName": "lib/log/index.ts", "line": 124, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L124" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L124" } ], "parameters": [ { - "id": 346, + "id": 508, "name": "message", "variant": "param", "kind": 32768, @@ -779,27 +779,27 @@ { "title": "Constructors", "children": [ - 330 + 492 ] }, { "title": "Properties", "children": [ - 333 + 495 ] }, { "title": "Methods", "children": [ - 350, - 341, - 347, - 337, - 334, - 356, - 359, - 353, - 344 + 512, + 503, + 509, + 499, + 496, + 518, + 521, + 515, + 506 ] } ], @@ -808,2067 +808,3245 @@ "fileName": "lib/log/index.ts", "line": 73, "character": 13, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/log/index.ts#L73" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/log/index.ts#L73" } ] }, { - "id": 179, - "name": "HTTP_STATUS", + "id": 93, + "name": "Request", "variant": "declaration", - "kind": 32, - "flags": { - "isConst": true - }, - "sources": [ + "kind": 128, + "flags": {}, + "children": [ { - "fileName": "lib/const/http.ts", - "line": 1, - "character": 13, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L1" - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 180, - "name": "__type", + "id": 94, + "name": "constructor", "variant": "declaration", - "kind": 65536, + "kind": 512, "flags": {}, - "children": [ + "sources": [ { - "id": 187, - "name": "ACCEPTED", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 8, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L8" - } - ], - "type": { - "type": "literal", - "value": 202 - }, - "defaultValue": "202" - }, + "fileName": "lib/request.ts", + "line": 38, + "character": 2 + } + ], + "signatures": [ { - "id": 192, - "name": "AMBIGUOUS", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "id": 95, + "name": "new Request", + "variant": "signature", + "kind": 16384, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 13, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L13" + "fileName": "lib/request.ts", + "line": 38, + "character": 2 } ], - "type": { - "type": "literal", - "value": 300 - }, - "defaultValue": "300" - }, - { - "id": 225, - "name": "BAD_GATEWAY", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 46, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L46" + "id": 96, + "name": "baseUrl", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "''" } ], "type": { - "type": "literal", - "value": 502 - }, - "defaultValue": "502" - }, + "type": "reference", + "target": 93, + "name": "Request", + "package": "@cc-heart/utils" + } + } + ] + }, + { + "id": 100, + "name": "baseUrl", + "variant": "declaration", + "kind": 1024, + "flags": { + "isPrivate": true, + "isReadonly": true + }, + "sources": [ { - "id": 199, - "name": "BAD_REQUEST", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 20, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L20" - } - ], - "type": { - "type": "literal", - "value": 400 - }, - "defaultValue": "400" - }, + "fileName": "lib/request.ts", + "line": 38, + "character": 31 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "''" + }, + { + "id": 99, + "name": "errorInterceptors", + "variant": "declaration", + "kind": 1024, + "flags": { + "isPrivate": true + }, + "sources": [ { - "id": 208, - "name": "CONFLICT", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "fileName": "lib/request.ts", + "line": 36, + "character": 10 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "target": 69, + "name": "ErrorInterceptor", + "package": "@cc-heart/utils" + } + }, + "defaultValue": "[]" + }, + { + "id": 97, + "name": "requestInterceptors", + "variant": "declaration", + "kind": 1024, + "flags": { + "isPrivate": true + }, + "sources": [ + { + "fileName": "lib/request.ts", + "line": 34, + "character": 10 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "target": 59, + "name": "RequestInterceptor", + "package": "@cc-heart/utils" + } + }, + "defaultValue": "[]" + }, + { + "id": 98, + "name": "responseInterceptors", + "variant": "declaration", + "kind": 1024, + "flags": { + "isPrivate": true + }, + "sources": [ + { + "fileName": "lib/request.ts", + "line": 35, + "character": 10 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "target": 63, + "typeArguments": [ { - "fileName": "lib/const/http.ts", - "line": 29, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L29" + "type": "intrinsic", + "name": "any" + }, + { + "type": "intrinsic", + "name": "any" } ], - "type": { - "type": "literal", - "value": 409 - }, - "defaultValue": "409" - }, + "name": "ResponseInterceptor", + "package": "@cc-heart/utils" + } + }, + "defaultValue": "[]" + }, + { + "id": 166, + "name": "buildBody", + "variant": "declaration", + "kind": 2048, + "flags": { + "isPrivate": true + }, + "sources": [ { - "id": 181, - "name": "CONTINUE", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "fileName": "lib/request.ts", + "line": 178, + "character": 10 + } + ], + "signatures": [ + { + "id": 167, + "name": "buildBody", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 2, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L2" + "fileName": "lib/request.ts", + "line": 178, + "character": 10 } ], - "type": { - "type": "literal", - "value": 100 - }, - "defaultValue": "100" - }, - { - "id": 186, - "name": "CREATED", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 7, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L7" + "id": 168, + "name": "data", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "unknown" + } } ], "type": { - "type": "literal", - "value": 201 - }, - "defaultValue": "201" - }, + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "reference", + "target": { + "sourceFileName": "node_modules/undici-types/formdata.d.ts", + "qualifiedName": "FormData" + }, + "name": "FormData", + "package": "undici-types" + } + ] + } + } + ] + }, + { + "id": 160, + "name": "buildRequestInit", + "variant": "declaration", + "kind": 2048, + "flags": { + "isPrivate": true + }, + "sources": [ { - "id": 184, - "name": "EARLYHINTS", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "fileName": "lib/request.ts", + "line": 151, + "character": 10 + } + ], + "signatures": [ + { + "id": 161, + "name": "buildRequestInit", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 5, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L5" + "fileName": "lib/request.ts", + "line": 151, + "character": 10 } ], - "type": { - "type": "literal", - "value": 103 - }, - "defaultValue": "103" - }, - { - "id": 216, - "name": "EXPECTATION_FAILED", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 37, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L37" + "id": 162, + "name": "method", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 163, + "name": "data", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "unknown" + } + }, + { + "id": 164, + "name": "config", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/@types/node/globals.d.ts", + "qualifiedName": "__global.RequestInit" + }, + "name": "RequestInit", + "package": "@types/node", + "qualifiedName": "__global.RequestInit" + } + }, + { + "id": 165, + "name": "controller", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/@types/node/globals.d.ts", + "qualifiedName": "__global.AbortController" + }, + "name": "AbortController", + "package": "@types/node", + "qualifiedName": "__global.AbortController" + } } ], "type": { - "type": "literal", - "value": 417 - }, - "defaultValue": "417" - }, + "type": "reference", + "target": { + "sourceFileName": "node_modules/@types/node/globals.d.ts", + "qualifiedName": "__global.RequestInit" + }, + "name": "RequestInit", + "package": "@types/node", + "qualifiedName": "__global.RequestInit" + } + } + ] + }, + { + "id": 169, + "name": "buildUrl", + "variant": "declaration", + "kind": 2048, + "flags": { + "isPrivate": true + }, + "sources": [ { - "id": 220, - "name": "FAILED_DEPENDENCY", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "fileName": "lib/request.ts", + "line": 184, + "character": 10 + } + ], + "signatures": [ + { + "id": 170, + "name": "buildUrl", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 41, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L41" + "fileName": "lib/request.ts", + "line": 184, + "character": 10 } ], - "type": { - "type": "literal", - "value": 424 - }, - "defaultValue": "424" - }, - { - "id": 202, - "name": "FORBIDDEN", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 23, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L23" + "id": 171, + "name": "url", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 172, + "name": "method", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 173, + "name": "params", + "variant": "param", + "kind": 32768, + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Record" + }, + "typeArguments": [ + { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "PropertyKey" + }, + "name": "PropertyKey", + "package": "typescript" + }, + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "Record", + "package": "typescript" + } } ], "type": { - "type": "literal", - "value": 403 - }, - "defaultValue": "403" - }, + "type": "intrinsic", + "name": "string" + } + } + ] + }, + { + "id": 124, + "name": "delete", + "variant": "declaration", + "kind": 2048, + "flags": {}, + "sources": [ { - "id": 194, - "name": "FOUND", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "fileName": "lib/request.ts", + "line": 65, + "character": 2 + } + ], + "signatures": [ + { + "id": 125, + "name": "delete", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 15, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L15" + "fileName": "lib/request.ts", + "line": 65, + "character": 2 } ], - "type": { - "type": "literal", - "value": 302 - }, - "defaultValue": "302" - }, - { - "id": 227, - "name": "GATEWAY_TIMEOUT", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "typeParameter": [ { - "fileName": "lib/const/http.ts", - "line": 48, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L48" + "id": 126, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {}, + "default": { + "type": "intrinsic", + "name": "unknown" + } } ], - "type": { - "type": "literal", - "value": 504 - }, - "defaultValue": "504" - }, - { - "id": 209, - "name": "GONE", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 30, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L30" - } - ], - "type": { - "type": "literal", - "value": 410 - }, - "defaultValue": "410" - }, - { - "id": 228, - "name": "HTTP_VERSION_NOT_SUPPORTED", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "id": 127, + "name": "url", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, { - "fileName": "lib/const/http.ts", - "line": 49, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L49" + "id": 128, + "name": "params", + "variant": "param", + "kind": 32768, + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Record" + }, + "typeArguments": [ + { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "PropertyKey" + }, + "name": "PropertyKey", + "package": "typescript" + }, + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "Record", + "package": "typescript" + } + }, + { + "id": 129, + "name": "config", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": 73, + "name": "RequestConfig", + "package": "@cc-heart/utils" + }, + "defaultValue": "{}" } ], "type": { - "type": "literal", - "value": 505 - }, - "defaultValue": "505" - }, + "type": "reference", + "target": 49, + "typeArguments": [ + { + "type": "reference", + "target": 126, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + ], + "name": "RequestReturn", + "package": "@cc-heart/utils" + } + } + ] + }, + { + "id": 153, + "name": "execute", + "variant": "declaration", + "kind": 2048, + "flags": { + "isPrivate": true + }, + "sources": [ { - "id": 223, - "name": "INTERNAL_SERVER_ERROR", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "fileName": "lib/request.ts", + "line": 103, + "character": 16 + } + ], + "signatures": [ + { + "id": 154, + "name": "execute", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 44, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L44" + "fileName": "lib/request.ts", + "line": 103, + "character": 16 } ], - "type": { - "type": "literal", - "value": 500 - }, - "defaultValue": "500" - }, - { - "id": 217, - "name": "I_AM_A_TEAPOT", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "typeParameter": [ { - "fileName": "lib/const/http.ts", - "line": 38, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L38" + "id": 155, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {} } ], - "type": { - "type": "literal", - "value": 418 - }, - "defaultValue": "418" - }, - { - "id": 210, - "name": "LENGTH_REQUIRED", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 31, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L31" + "id": 156, + "name": "url", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 157, + "name": "config", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": 73, + "name": "RequestConfig", + "package": "@cc-heart/utils" + } + }, + { + "id": 158, + "name": "controller", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/@types/node/globals.d.ts", + "qualifiedName": "__global.AbortController" + }, + "name": "AbortController", + "package": "@types/node", + "qualifiedName": "__global.AbortController" + } + }, + { + "id": 159, + "name": "result", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": 49, + "typeArguments": [ + { + "type": "reference", + "target": 155, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + ], + "name": "RequestReturn", + "package": "@cc-heart/utils" + } } ], "type": { - "type": "literal", - "value": 411 - }, - "defaultValue": "411" - }, + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Promise" + }, + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "reference", + "target": 155, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + ] + } + ], + "name": "Promise", + "package": "typescript" + } + } + ] + }, + { + "id": 118, + "name": "get", + "variant": "declaration", + "kind": 2048, + "flags": {}, + "sources": [ { - "id": 204, - "name": "METHOD_NOT_ALLOWED", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "fileName": "lib/request.ts", + "line": 57, + "character": 2 + } + ], + "signatures": [ + { + "id": 119, + "name": "get", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 25, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L25" + "fileName": "lib/request.ts", + "line": 57, + "character": 2 } ], - "type": { - "type": "literal", - "value": 405 - }, - "defaultValue": "405" - }, - { - "id": 218, - "name": "MISDIRECTED", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "typeParameter": [ { - "fileName": "lib/const/http.ts", - "line": 39, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L39" + "id": 120, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {}, + "default": { + "type": "intrinsic", + "name": "unknown" + } } ], - "type": { - "type": "literal", - "value": 421 - }, - "defaultValue": "421" - }, - { - "id": 193, - "name": "MOVED_PERMANENTLY", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 14, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L14" + "id": 121, + "name": "url", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 122, + "name": "params", + "variant": "param", + "kind": 32768, + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Record" + }, + "typeArguments": [ + { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "PropertyKey" + }, + "name": "PropertyKey", + "package": "typescript" + }, + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "Record", + "package": "typescript" + } + }, + { + "id": 123, + "name": "config", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": 73, + "name": "RequestConfig", + "package": "@cc-heart/utils" + }, + "defaultValue": "{}" } ], "type": { - "type": "literal", - "value": 301 - }, - "defaultValue": "301" - }, + "type": "reference", + "target": 49, + "typeArguments": [ + { + "type": "reference", + "target": 120, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + ], + "name": "RequestReturn", + "package": "@cc-heart/utils" + } + } + ] + }, + { + "id": 178, + "name": "isCompleteUrl", + "variant": "declaration", + "kind": 2048, + "flags": { + "isPrivate": true + }, + "sources": [ { - "id": 188, - "name": "NON_AUTHORITATIVE_INFORMATION", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "fileName": "lib/request.ts", + "line": 205, + "character": 10 + } + ], + "signatures": [ + { + "id": 179, + "name": "isCompleteUrl", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 9, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L9" + "fileName": "lib/request.ts", + "line": 205, + "character": 10 } ], - "type": { - "type": "literal", - "value": 203 - }, - "defaultValue": "203" - }, - { - "id": 205, - "name": "NOT_ACCEPTABLE", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 26, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L26" + "id": 180, + "name": "url", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } } ], "type": { - "type": "literal", - "value": 406 - }, - "defaultValue": "406" - }, + "type": "intrinsic", + "name": "boolean" + } + } + ] + }, + { + "id": 174, + "name": "joinUrl", + "variant": "declaration", + "kind": 2048, + "flags": { + "isPrivate": true + }, + "sources": [ { - "id": 203, - "name": "NOT_FOUND", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "fileName": "lib/request.ts", + "line": 200, + "character": 10 + } + ], + "signatures": [ + { + "id": 175, + "name": "joinUrl", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 24, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L24" + "fileName": "lib/request.ts", + "line": 200, + "character": 10 } ], - "type": { - "type": "literal", - "value": 404 - }, - "defaultValue": "404" - }, - { - "id": 224, - "name": "NOT_IMPLEMENTED", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 45, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L45" + "id": 176, + "name": "baseUrl", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 177, + "name": "url", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } } ], "type": { - "type": "literal", - "value": 501 - }, - "defaultValue": "501" - }, + "type": "intrinsic", + "name": "string" + } + } + ] + }, + { + "id": 181, + "name": "normalizeHeaders", + "variant": "declaration", + "kind": 2048, + "flags": { + "isPrivate": true + }, + "sources": [ { - "id": 196, - "name": "NOT_MODIFIED", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "fileName": "lib/request.ts", + "line": 209, + "character": 10 + } + ], + "signatures": [ + { + "id": 182, + "name": "normalizeHeaders", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 17, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L17" + "fileName": "lib/request.ts", + "line": 209, + "character": 10 } ], - "type": { - "type": "literal", - "value": 304 - }, - "defaultValue": "304" - }, - { - "id": 189, - "name": "NO_CONTENT", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 10, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L10" + "id": 183, + "name": "headers", + "variant": "param", + "kind": 32768, + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "HeadersInit" + }, + "name": "HeadersInit", + "package": "undici-types" + } } ], "type": { - "type": "literal", - "value": 204 - }, - "defaultValue": "204" - }, - { - "id": 185, - "name": "OK", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 6, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L6" - } - ], - "type": { - "type": "literal", - "value": 200 - }, - "defaultValue": "200" - }, + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Record" + }, + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "string" + } + ], + "name": "Record", + "package": "typescript" + } + } + ] + }, + { + "id": 196, + "name": "parseResponse", + "variant": "declaration", + "kind": 2048, + "flags": { + "isPrivate": true + }, + "sources": [ { - "id": 191, - "name": "PARTIAL_CONTENT", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "fileName": "lib/request.ts", + "line": 256, + "character": 16 + } + ], + "signatures": [ + { + "id": 197, + "name": "parseResponse", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 12, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L12" + "fileName": "lib/request.ts", + "line": 256, + "character": 16 } ], - "type": { - "type": "literal", - "value": 206 - }, - "defaultValue": "206" - }, - { - "id": 212, - "name": "PAYLOAD_TOO_LARGE", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 33, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L33" + "id": 198, + "name": "response", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/shiki/dist/index.d.ts", + "qualifiedName": "__global.Response" + }, + "name": "Response", + "package": "shiki", + "qualifiedName": "__global.Response" + } } ], "type": { - "type": "literal", - "value": 413 - }, - "defaultValue": "413" - }, + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Promise" + }, + "typeArguments": [ + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "Promise", + "package": "typescript" + } + } + ] + }, + { + "id": 142, + "name": "patch", + "variant": "declaration", + "kind": 2048, + "flags": {}, + "sources": [ { - "id": 201, - "name": "PAYMENT_REQUIRED", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "fileName": "lib/request.ts", + "line": 81, + "character": 2 + } + ], + "signatures": [ + { + "id": 143, + "name": "patch", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 22, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L22" + "fileName": "lib/request.ts", + "line": 81, + "character": 2 } ], - "type": { - "type": "literal", - "value": 402 - }, - "defaultValue": "402" - }, - { - "id": 198, - "name": "PERMANENT_REDIRECT", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "typeParameter": [ { - "fileName": "lib/const/http.ts", - "line": 19, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L19" + "id": 144, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {}, + "default": { + "type": "intrinsic", + "name": "unknown" + } } ], - "type": { - "type": "literal", - "value": 308 - }, - "defaultValue": "308" - }, - { - "id": 211, - "name": "PRECONDITION_FAILED", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 32, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L32" + "id": 145, + "name": "url", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 146, + "name": "data", + "variant": "param", + "kind": 32768, + "flags": { + "isOptional": true + }, + "type": { + "type": "intrinsic", + "name": "unknown" + } + }, + { + "id": 147, + "name": "config", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": 73, + "name": "RequestConfig", + "package": "@cc-heart/utils" + }, + "defaultValue": "{}" } ], "type": { - "type": "literal", - "value": 412 - }, - "defaultValue": "412" - }, + "type": "reference", + "target": 49, + "typeArguments": [ + { + "type": "reference", + "target": 144, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + ], + "name": "RequestReturn", + "package": "@cc-heart/utils" + } + } + ] + }, + { + "id": 130, + "name": "post", + "variant": "declaration", + "kind": 2048, + "flags": {}, + "sources": [ { - "id": 221, - "name": "PRECONDITION_REQUIRED", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "fileName": "lib/request.ts", + "line": 73, + "character": 2 + } + ], + "signatures": [ + { + "id": 131, + "name": "post", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 42, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L42" + "fileName": "lib/request.ts", + "line": 73, + "character": 2 } ], - "type": { - "type": "literal", - "value": 428 - }, - "defaultValue": "428" - }, - { - "id": 183, - "name": "PROCESSING", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "typeParameter": [ { - "fileName": "lib/const/http.ts", - "line": 4, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L4" + "id": 132, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {}, + "default": { + "type": "intrinsic", + "name": "unknown" + } } ], - "type": { - "type": "literal", - "value": 102 - }, - "defaultValue": "102" - }, - { - "id": 206, - "name": "PROXY_AUTHENTICATION_REQUIRED", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 27, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L27" + "id": 133, + "name": "url", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 134, + "name": "data", + "variant": "param", + "kind": 32768, + "flags": { + "isOptional": true + }, + "type": { + "type": "intrinsic", + "name": "unknown" + } + }, + { + "id": 135, + "name": "config", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": 73, + "name": "RequestConfig", + "package": "@cc-heart/utils" + }, + "defaultValue": "{}" } ], "type": { - "type": "literal", - "value": 407 - }, - "defaultValue": "407" - }, + "type": "reference", + "target": 49, + "typeArguments": [ + { + "type": "reference", + "target": 132, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + ], + "name": "RequestReturn", + "package": "@cc-heart/utils" + } + } + ] + }, + { + "id": 136, + "name": "put", + "variant": "declaration", + "kind": 2048, + "flags": {}, + "sources": [ { - "id": 215, - "name": "REQUESTED_RANGE_NOT_SATISFIABLE", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "fileName": "lib/request.ts", + "line": 77, + "character": 2 + } + ], + "signatures": [ + { + "id": 137, + "name": "put", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 36, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L36" + "fileName": "lib/request.ts", + "line": 77, + "character": 2 } ], - "type": { - "type": "literal", - "value": 416 - }, - "defaultValue": "416" - }, - { - "id": 207, - "name": "REQUEST_TIMEOUT", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "typeParameter": [ { - "fileName": "lib/const/http.ts", - "line": 28, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L28" + "id": 138, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {}, + "default": { + "type": "intrinsic", + "name": "unknown" + } } ], - "type": { - "type": "literal", - "value": 408 - }, - "defaultValue": "408" - }, - { - "id": 190, - "name": "RESET_CONTENT", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 11, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L11" + "id": 139, + "name": "url", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 140, + "name": "data", + "variant": "param", + "kind": 32768, + "flags": { + "isOptional": true + }, + "type": { + "type": "intrinsic", + "name": "unknown" + } + }, + { + "id": 141, + "name": "config", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": 73, + "name": "RequestConfig", + "package": "@cc-heart/utils" + }, + "defaultValue": "{}" } ], "type": { - "type": "literal", - "value": 205 - }, - "defaultValue": "205" - }, + "type": "reference", + "target": 49, + "typeArguments": [ + { + "type": "reference", + "target": 138, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + ], + "name": "RequestReturn", + "package": "@cc-heart/utils" + } + } + ] + }, + { + "id": 199, + "name": "removeInterceptor", + "variant": "declaration", + "kind": 2048, + "flags": { + "isPrivate": true + }, + "sources": [ { - "id": 195, - "name": "SEE_OTHER", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "fileName": "lib/request.ts", + "line": 262, + "character": 10 + } + ], + "signatures": [ + { + "id": 200, + "name": "removeInterceptor", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 16, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L16" + "fileName": "lib/request.ts", + "line": 262, + "character": 10 } ], - "type": { - "type": "literal", - "value": 303 - }, - "defaultValue": "303" - }, - { - "id": 226, - "name": "SERVICE_UNAVAILABLE", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "typeParameter": [ { - "fileName": "lib/const/http.ts", - "line": 47, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L47" + "id": 201, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {} } ], - "type": { - "type": "literal", - "value": 503 - }, - "defaultValue": "503" - }, - { - "id": 182, - "name": "SWITCHING_PROTOCOLS", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 3, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L3" + "id": 202, + "name": "interceptors", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "array", + "elementType": { + "type": "reference", + "target": 201, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + } + }, + { + "id": 203, + "name": "interceptor", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": 201, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } } ], "type": { - "type": "literal", - "value": 101 - }, - "defaultValue": "101" - }, + "type": "intrinsic", + "name": "void" + } + } + ] + }, + { + "id": 148, + "name": "request", + "variant": "declaration", + "kind": 2048, + "flags": {}, + "sources": [ { - "id": 197, - "name": "TEMPORARY_REDIRECT", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "fileName": "lib/request.ts", + "line": 85, + "character": 2 + } + ], + "signatures": [ + { + "id": 149, + "name": "request", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 18, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L18" + "fileName": "lib/request.ts", + "line": 85, + "character": 2 } ], - "type": { - "type": "literal", - "value": 307 - }, - "defaultValue": "307" - }, - { - "id": 222, - "name": "TOO_MANY_REQUESTS", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "typeParameter": [ { - "fileName": "lib/const/http.ts", - "line": 43, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L43" + "id": 150, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {}, + "default": { + "type": "intrinsic", + "name": "unknown" + } } ], - "type": { - "type": "literal", - "value": 429 - }, - "defaultValue": "429" - }, - { - "id": 200, - "name": "UNAUTHORIZED", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 21, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L21" + "id": 151, + "name": "url", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 152, + "name": "config", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": 73, + "name": "RequestConfig", + "package": "@cc-heart/utils" + }, + "defaultValue": "{}" } ], "type": { - "type": "literal", - "value": 401 - }, - "defaultValue": "401" - }, + "type": "reference", + "target": 49, + "typeArguments": [ + { + "type": "reference", + "target": 150, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + ], + "name": "RequestReturn", + "package": "@cc-heart/utils" + } + } + ] + }, + { + "id": 192, + "name": "runErrorInterceptors", + "variant": "declaration", + "kind": 2048, + "flags": { + "isPrivate": true + }, + "sources": [ { - "id": 219, - "name": "UNPROCESSABLE_ENTITY", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "fileName": "lib/request.ts", + "line": 245, + "character": 16 + } + ], + "signatures": [ + { + "id": 193, + "name": "runErrorInterceptors", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 40, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L40" + "fileName": "lib/request.ts", + "line": 245, + "character": 16 } ], - "type": { - "type": "literal", - "value": 422 - }, - "defaultValue": "422" - }, - { - "id": 214, - "name": "UNSUPPORTED_MEDIA_TYPE", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 35, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L35" + "id": 194, + "name": "error", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "unknown" + } + }, + { + "id": 195, + "name": "interceptors", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "array", + "elementType": { + "type": "reference", + "target": 69, + "name": "ErrorInterceptor", + "package": "@cc-heart/utils" + } + } } ], "type": { - "type": "literal", - "value": 415 - }, - "defaultValue": "415" - }, + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Promise" + }, + "typeArguments": [ + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Promise", + "package": "typescript" + } + } + ] + }, + { + "id": 184, + "name": "runRequestInterceptors", + "variant": "declaration", + "kind": 2048, + "flags": { + "isPrivate": true + }, + "sources": [ { - "id": 213, - "name": "URI_TOO_LONG", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "fileName": "lib/request.ts", + "line": 223, + "character": 16 + } + ], + "signatures": [ + { + "id": 185, + "name": "runRequestInterceptors", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 34, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L34" + "fileName": "lib/request.ts", + "line": 223, + "character": 16 + } + ], + "parameters": [ + { + "id": 186, + "name": "config", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/@types/node/globals.d.ts", + "qualifiedName": "__global.RequestInit" + }, + "name": "RequestInit", + "package": "@types/node", + "qualifiedName": "__global.RequestInit" + } + }, + { + "id": 187, + "name": "interceptors", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "array", + "elementType": { + "type": "reference", + "target": 59, + "name": "RequestInterceptor", + "package": "@cc-heart/utils" + } + } } ], "type": { - "type": "literal", - "value": 414 - }, - "defaultValue": "414" + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Promise" + }, + "typeArguments": [ + { + "type": "reference", + "target": { + "sourceFileName": "node_modules/@types/node/globals.d.ts", + "qualifiedName": "__global.RequestInit" + }, + "name": "RequestInit", + "package": "@types/node", + "qualifiedName": "__global.RequestInit" + } + ], + "name": "Promise", + "package": "typescript" + } } - ], - "groups": [ + ] + }, + { + "id": 188, + "name": "runResponseInterceptors", + "variant": "declaration", + "kind": 2048, + "flags": { + "isPrivate": true + }, + "sources": [ { - "title": "Properties", - "children": [ - 187, - 192, - 225, - 199, - 208, - 181, - 186, - 184, - 216, - 220, - 202, - 194, - 227, - 209, - 228, - 223, - 217, - 210, - 204, - 218, - 193, - 188, - 205, - 203, - 224, - 196, - 189, - 185, - 191, - 212, - 201, - 198, - 211, - 221, - 183, - 206, - 215, - 207, - 190, - 195, - 226, - 182, - 197, - 222, - 200, - 219, - 214, - 213 - ] + "fileName": "lib/request.ts", + "line": 234, + "character": 16 } ], - "sources": [ + "signatures": [ { - "fileName": "lib/const/http.ts", - "line": 1, - "character": 27, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L1" - } - ] - } - }, - "defaultValue": "..." - }, - { - "id": 240, - "name": "MIME_TYPES", - "variant": "declaration", - "kind": 32, - "flags": { - "isConst": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 64, - "character": 13, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L64" - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 241, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 272, - "name": "7Z", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "id": 189, + "name": "runResponseInterceptors", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 95, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L95" + "fileName": "lib/request.ts", + "line": 234, + "character": 16 } ], - "type": { - "type": "literal", - "value": "application/x-7z-compressed" - }, - "defaultValue": "'application/x-7z-compressed'" - }, - { - "id": 328, - "name": "7ZIP", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 151, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L151" - } - ], - "type": { - "type": "literal", - "value": "application/x-7z-compressed" - }, - "defaultValue": "'application/x-7z-compressed'" - }, - { - "id": 327, - "name": "ALZ", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "id": 190, + "name": "data", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "unknown" + } + }, { - "fileName": "lib/const/http.ts", - "line": 150, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L150" + "id": 191, + "name": "interceptors", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "array", + "elementType": { + "type": "reference", + "target": 63, + "typeArguments": [ + { + "type": "intrinsic", + "name": "any" + }, + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "ResponseInterceptor", + "package": "@cc-heart/utils" + } + } } ], "type": { - "type": "literal", - "value": "application/x-alz" - }, - "defaultValue": "'application/x-alz'" - }, + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Promise" + }, + "typeArguments": [ + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Promise", + "package": "typescript" + } + } + ] + }, + { + "id": 113, + "name": "useErrorInterceptor", + "variant": "declaration", + "kind": 2048, + "flags": {}, + "sources": [ { - "id": 308, - "name": "APK", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "fileName": "lib/request.ts", + "line": 52, + "character": 2 + } + ], + "signatures": [ + { + "id": 114, + "name": "useErrorInterceptor", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 131, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L131" + "fileName": "lib/request.ts", + "line": 52, + "character": 2 } ], - "type": { - "type": "literal", - "value": "application/vnd.android.package-archive" - }, - "defaultValue": "'application/vnd.android.package-archive'" - }, - { - "id": 264, - "name": "AVI", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 87, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L87" + "id": 115, + "name": "interceptor", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": 69, + "name": "ErrorInterceptor", + "package": "@cc-heart/utils" + } } ], "type": { - "type": "literal", - "value": "video/x-msvideo" - }, - "defaultValue": "'video/x-msvideo'" - }, + "type": "reflection", + "declaration": { + "id": 116, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "sources": [ + { + "fileName": "lib/request.ts", + "line": 54, + "character": 11 + } + ], + "signatures": [ + { + "id": 117, + "name": "__type", + "variant": "signature", + "kind": 4096, + "flags": {}, + "sources": [ + { + "fileName": "lib/request.ts", + "line": 54, + "character": 11 + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + } + } + ] + }, + { + "id": 101, + "name": "useRequestInterceptor", + "variant": "declaration", + "kind": 2048, + "flags": {}, + "sources": [ { - "id": 293, - "name": "BAT", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "fileName": "lib/request.ts", + "line": 40, + "character": 2 + } + ], + "signatures": [ + { + "id": 102, + "name": "useRequestInterceptor", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 116, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L116" + "fileName": "lib/request.ts", + "line": 40, + "character": 2 } ], - "type": { - "type": "literal", - "value": "application/x-msdownload" - }, - "defaultValue": "'application/x-msdownload'" - }, - { - "id": 254, - "name": "BMP", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 77, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L77" + "id": 103, + "name": "interceptor", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": 59, + "name": "RequestInterceptor", + "package": "@cc-heart/utils" + } } ], "type": { - "type": "literal", - "value": "image/bmp" - }, - "defaultValue": "'image/bmp'" - }, - { - "id": 275, - "name": "BZ2", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 98, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L98" + "type": "reflection", + "declaration": { + "id": 104, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "sources": [ + { + "fileName": "lib/request.ts", + "line": 42, + "character": 11 + } + ], + "signatures": [ + { + "id": 105, + "name": "__type", + "variant": "signature", + "kind": 4096, + "flags": {}, + "sources": [ + { + "fileName": "lib/request.ts", + "line": 42, + "character": 11 + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] } - ], - "type": { - "type": "literal", - "value": "application/x-bzip2" - }, - "defaultValue": "'application/x-bzip2'" - }, + } + } + ] + }, + { + "id": 106, + "name": "useResponseInterceptor", + "variant": "declaration", + "kind": 2048, + "flags": {}, + "sources": [ { - "id": 318, - "name": "C", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 141, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L141" - } - ], - "type": { - "type": "literal", - "value": "text/x-csrc" - }, - "defaultValue": "'text/x-csrc'" - }, + "fileName": "lib/request.ts", + "line": 45, + "character": 2 + } + ], + "signatures": [ { - "id": 319, - "name": "CPP", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "id": 107, + "name": "useResponseInterceptor", + "variant": "signature", + "kind": 4096, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 142, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L142" + "fileName": "lib/request.ts", + "line": 45, + "character": 2 } ], - "type": { - "type": "literal", - "value": "text/x-c++src" - }, - "defaultValue": "'text/x-c++src'" - }, - { - "id": 320, - "name": "CS", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "typeParameter": [ { - "fileName": "lib/const/http.ts", - "line": 143, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L143" - } - ], - "type": { - "type": "literal", - "value": "text/plain" - }, - "defaultValue": "'text/plain'" - }, - { - "id": 245, - "name": "CSS", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "id": 108, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {}, + "default": { + "type": "intrinsic", + "name": "unknown" + } + }, { - "fileName": "lib/const/http.ts", - "line": 68, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L68" + "id": 109, + "name": "U", + "variant": "typeParam", + "kind": 131072, + "flags": {}, + "default": { + "type": "intrinsic", + "name": "unknown" + } } ], - "type": { - "type": "literal", - "value": "text/css" - }, - "defaultValue": "'text/css'" - }, - { - "id": 246, - "name": "CSV", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 69, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L69" + "id": 110, + "name": "interceptor", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": 63, + "typeArguments": [ + { + "type": "reference", + "target": 108, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + }, + { + "type": "reference", + "target": 109, + "name": "U", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + ], + "name": "ResponseInterceptor", + "package": "@cc-heart/utils" + } } ], "type": { - "type": "literal", - "value": "text/csv" - }, - "defaultValue": "'text/csv'" + "type": "reflection", + "declaration": { + "id": 111, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "sources": [ + { + "fileName": "lib/request.ts", + "line": 49, + "character": 11 + } + ], + "signatures": [ + { + "id": 112, + "name": "__type", + "variant": "signature", + "kind": 4096, + "flags": {}, + "sources": [ + { + "fileName": "lib/request.ts", + "line": 49, + "character": 11 + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + } + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "children": [ + 94 + ] + }, + { + "title": "Properties", + "children": [ + 100, + 99, + 97, + 98 + ] + }, + { + "title": "Methods", + "children": [ + 166, + 160, + 169, + 124, + 153, + 118, + 178, + 174, + 181, + 196, + 142, + 130, + 136, + 199, + 148, + 192, + 184, + 188, + 113, + 101, + 106 + ] + } + ], + "sources": [ + { + "fileName": "lib/request.ts", + "line": 33, + "character": 13 + } + ] + }, + { + "id": 73, + "name": "RequestConfig", + "variant": "declaration", + "kind": 256, + "flags": {}, + "children": [ + { + "id": 82, + "name": "body", + "variant": "declaration", + "kind": 1024, + "flags": { + "isExternal": true, + "isOptional": true + }, + "sources": [ + { + "fileName": "node_modules/undici-types/fetch.d.ts", + "line": 108, + "character": 2 + } + ], + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "BodyInit" }, + "name": "BodyInit", + "package": "undici-types" + }, + "inheritedFrom": { + "type": "reference", + "target": -1, + "name": "RequestInit.body" + } + }, + { + "id": 86, + "name": "credentials", + "variant": "declaration", + "kind": 1024, + "flags": { + "isExternal": true, + "isOptional": true + }, + "sources": [ { - "id": 291, - "name": "DLL", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 114, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L114" - } - ], - "type": { - "type": "literal", - "value": "application/vnd.microsoft.portable-executable" - }, - "defaultValue": "'application/vnd.microsoft.portable-executable'" - }, - { - "id": 309, - "name": "DMG", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 132, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L132" - } - ], - "type": { - "type": "literal", - "value": "application/x-apple-diskimage" - }, - "defaultValue": "'application/x-apple-diskimage'" + "fileName": "node_modules/undici-types/fetch.d.ts", + "line": 112, + "character": 2 + } + ], + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "RequestCredentials" }, + "name": "RequestCredentials", + "package": "undici-types" + }, + "inheritedFrom": { + "type": "reference", + "target": -1, + "name": "RequestInit.credentials" + } + }, + { + "id": 75, + "name": "data", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "sources": [ { - "id": 277, - "name": "DOC", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 100, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L100" - } - ], - "type": { - "type": "literal", - "value": "application/msword" - }, - "defaultValue": "'application/msword'" - }, + "fileName": "lib/request.ts", + "line": 24, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "unknown" + } + }, + { + "id": 91, + "name": "dispatcher", + "variant": "declaration", + "kind": 1024, + "flags": { + "isExternal": true, + "isOptional": true + }, + "sources": [ { - "id": 279, - "name": "DOCX", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 102, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L102" - } - ], - "type": { - "type": "literal", - "value": "application/vnd.openxmlformats-officedocument.wordprocessingml.document" - }, - "defaultValue": "'application/vnd.openxmlformats-officedocument.wordprocessingml.document'" + "fileName": "node_modules/undici-types/fetch.d.ts", + "line": 117, + "character": 2 + } + ], + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/undici-types/dispatcher.d.ts", + "qualifiedName": "Dispatcher" }, + "name": "Dispatcher", + "package": "undici-types" + }, + "inheritedFrom": { + "type": "reference", + "target": -1, + "name": "RequestInit.dispatcher" + } + }, + { + "id": 92, + "name": "duplex", + "variant": "declaration", + "kind": 1024, + "flags": { + "isExternal": true, + "isOptional": true + }, + "sources": [ { - "id": 278, - "name": "DOT", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 101, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L101" - } - ], - "type": { - "type": "literal", - "value": "application/msword" - }, - "defaultValue": "'application/msword'" - }, + "fileName": "node_modules/undici-types/fetch.d.ts", + "line": 118, + "character": 2 + } + ], + "type": { + "type": "literal", + "value": "half" + }, + "inheritedFrom": { + "type": "reference", + "target": -1, + "name": "RequestInit.duplex" + } + }, + { + "id": 78, + "name": "errorInterceptors", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "sources": [ { - "id": 280, - "name": "DOTX", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 103, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L103" - } - ], - "type": { - "type": "literal", - "value": "application/vnd.openxmlformats-officedocument.wordprocessingml.template" - }, - "defaultValue": "'application/vnd.openxmlformats-officedocument.wordprocessingml.template'" - }, + "fileName": "lib/request.ts", + "line": 27, + "character": 2 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "target": 69, + "name": "ErrorInterceptor", + "package": "@cc-heart/utils" + } + } + }, + { + "id": 81, + "name": "headers", + "variant": "declaration", + "kind": 1024, + "flags": { + "isExternal": true, + "isOptional": true + }, + "sources": [ { - "id": 312, - "name": "DWG", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 135, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L135" - } - ], - "type": { - "type": "literal", - "value": "application/acad" - }, - "defaultValue": "'application/acad'" + "fileName": "node_modules/undici-types/fetch.d.ts", + "line": 107, + "character": 2 + } + ], + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "HeadersInit" }, + "name": "HeadersInit", + "package": "undici-types" + }, + "inheritedFrom": { + "type": "reference", + "target": -1, + "name": "RequestInit.headers" + } + }, + { + "id": 84, + "name": "integrity", + "variant": "declaration", + "kind": 1024, + "flags": { + "isExternal": true, + "isOptional": true + }, + "sources": [ { - "id": 313, - "name": "DXF", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 136, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L136" - } - ], - "type": { - "type": "literal", - "value": "application/vnd.dxf" - }, - "defaultValue": "'application/vnd.dxf'" - }, + "fileName": "node_modules/undici-types/fetch.d.ts", + "line": 110, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "inheritedFrom": { + "type": "reference", + "target": -1, + "name": "RequestInit.integrity" + } + }, + { + "id": 80, + "name": "keepalive", + "variant": "declaration", + "kind": 1024, + "flags": { + "isExternal": true, + "isOptional": true + }, + "sources": [ { - "id": 310, - "name": "EML", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 133, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L133" - } - ], - "type": { - "type": "literal", - "value": "message/rfc822" - }, - "defaultValue": "'message/rfc822'" - }, + "fileName": "node_modules/undici-types/fetch.d.ts", + "line": 106, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + }, + "inheritedFrom": { + "type": "reference", + "target": -1, + "name": "RequestInit.keepalive" + } + }, + { + "id": 79, + "name": "method", + "variant": "declaration", + "kind": 1024, + "flags": { + "isExternal": true, + "isOptional": true + }, + "sources": [ { - "id": 298, - "name": "EOT", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 121, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L121" - } - ], - "type": { - "type": "literal", - "value": "application/vnd.ms-fontobject" - }, - "defaultValue": "'application/vnd.ms-fontobject'" - }, + "fileName": "node_modules/undici-types/fetch.d.ts", + "line": 105, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "inheritedFrom": { + "type": "reference", + "target": -1, + "name": "RequestInit.method" + } + }, + { + "id": 87, + "name": "mode", + "variant": "declaration", + "kind": 1024, + "flags": { + "isExternal": true, + "isOptional": true + }, + "sources": [ { - "id": 307, - "name": "EPUB", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 130, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L130" - } - ], - "type": { - "type": "literal", - "value": "application/epub+zip" - }, - "defaultValue": "'application/epub+zip'" + "fileName": "node_modules/undici-types/fetch.d.ts", + "line": 113, + "character": 2 + } + ], + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "RequestMode" }, + "name": "RequestMode", + "package": "undici-types" + }, + "inheritedFrom": { + "type": "reference", + "target": -1, + "name": "RequestInit.mode" + } + }, + { + "id": 74, + "name": "params", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "sources": [ { - "id": 290, - "name": "EXE", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 113, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L113" - } - ], - "type": { - "type": "literal", - "value": "application/vnd.microsoft.portable-executable" + "fileName": "lib/request.ts", + "line": 23, + "character": 2 + } + ], + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Record" + }, + "typeArguments": [ + { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "PropertyKey" + }, + "name": "PropertyKey", + "package": "typescript" }, - "defaultValue": "'application/vnd.microsoft.portable-executable'" + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "Record", + "package": "typescript" + } + }, + { + "id": 83, + "name": "redirect", + "variant": "declaration", + "kind": 1024, + "flags": { + "isExternal": true, + "isOptional": true + }, + "sources": [ + { + "fileName": "node_modules/undici-types/fetch.d.ts", + "line": 109, + "character": 2 + } + ], + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "RequestRedirect" }, + "name": "RequestRedirect", + "package": "undici-types" + }, + "inheritedFrom": { + "type": "reference", + "target": -1, + "name": "RequestInit.redirect" + } + }, + { + "id": 88, + "name": "referrer", + "variant": "declaration", + "kind": 1024, + "flags": { + "isExternal": true, + "isOptional": true + }, + "sources": [ { - "id": 262, - "name": "FLAC", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 85, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L85" - } - ], - "type": { - "type": "literal", - "value": "audio/flac" - }, - "defaultValue": "'audio/flac'" + "fileName": "node_modules/undici-types/fetch.d.ts", + "line": 114, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "inheritedFrom": { + "type": "reference", + "target": -1, + "name": "RequestInit.referrer" + } + }, + { + "id": 89, + "name": "referrerPolicy", + "variant": "declaration", + "kind": 1024, + "flags": { + "isExternal": true, + "isOptional": true + }, + "sources": [ + { + "fileName": "node_modules/undici-types/fetch.d.ts", + "line": 115, + "character": 2 + } + ], + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "ReferrerPolicy" }, + "name": "ReferrerPolicy", + "package": "undici-types" + }, + "inheritedFrom": { + "type": "reference", + "target": -1, + "name": "RequestInit.referrerPolicy" + } + }, + { + "id": 76, + "name": "requestInterceptors", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "sources": [ { - "id": 267, - "name": "FLV", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "fileName": "lib/request.ts", + "line": 25, + "character": 2 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "target": 59, + "name": "RequestInterceptor", + "package": "@cc-heart/utils" + } + } + }, + { + "id": 77, + "name": "responseInterceptors", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "lib/request.ts", + "line": 26, + "character": 2 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "reference", + "target": 63, + "typeArguments": [ { - "fileName": "lib/const/http.ts", - "line": 90, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L90" + "type": "intrinsic", + "name": "any" + }, + { + "type": "intrinsic", + "name": "any" } ], - "type": { - "type": "literal", - "value": "video/x-flv" - }, - "defaultValue": "'video/x-flv'" - }, + "name": "ResponseInterceptor", + "package": "@cc-heart/utils" + } + } + }, + { + "id": 85, + "name": "signal", + "variant": "declaration", + "kind": 1024, + "flags": { + "isExternal": true, + "isOptional": true + }, + "sources": [ { - "id": 253, - "name": "GIF", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 76, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L76" - } - ], - "type": { - "type": "literal", - "value": "image/gif" - }, - "defaultValue": "'image/gif'" + "fileName": "node_modules/undici-types/fetch.d.ts", + "line": 111, + "character": 2 + } + ], + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/@types/node/globals.d.ts", + "qualifiedName": "__global.AbortSignal" }, + "name": "AbortSignal", + "package": "@types/node", + "qualifiedName": "__global.AbortSignal" + }, + "inheritedFrom": { + "type": "reference", + "target": -1, + "name": "RequestInit.signal" + } + }, + { + "id": 90, + "name": "window", + "variant": "declaration", + "kind": 1024, + "flags": { + "isExternal": true, + "isOptional": true + }, + "sources": [ { - "id": 322, - "name": "GO", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 145, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L145" - } - ], - "type": { - "type": "literal", - "value": "text/plain" - }, - "defaultValue": "'text/plain'" - }, + "fileName": "node_modules/undici-types/fetch.d.ts", + "line": 116, + "character": 2 + } + ], + "type": { + "type": "literal", + "value": null + }, + "inheritedFrom": { + "type": "reference", + "target": -1, + "name": "RequestInit.window" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 82, + 86, + 75, + 91, + 92, + 78, + 81, + 84, + 80, + 79, + 87, + 74, + 83, + 88, + 89, + 76, + 77, + 85, + 90 + ] + } + ], + "sources": [ + { + "fileName": "lib/request.ts", + "line": 22, + "character": 17 + } + ], + "extendedTypes": [ + { + "type": "reference", + "target": { + "sourceFileName": "node_modules/@types/node/globals.d.ts", + "qualifiedName": "__global.RequestInit" + }, + "name": "RequestInit", + "package": "@types/node", + "qualifiedName": "__global.RequestInit" + } + ] + }, + { + "id": 49, + "name": "RequestReturn", + "variant": "declaration", + "kind": 256, + "flags": {}, + "children": [ + { + "id": 54, + "name": "abort", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "sources": [ { - "id": 274, - "name": "GZ", + "fileName": "lib/request.ts", + "line": 8, + "character": 2 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 55, + "name": "__type", "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, + "kind": 65536, + "flags": {}, "sources": [ { - "fileName": "lib/const/http.ts", - "line": 97, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L97" + "fileName": "lib/request.ts", + "line": 8, + "character": 9 } ], - "type": { - "type": "literal", - "value": "application/gzip" - }, - "defaultValue": "'application/gzip'" - }, - { - "id": 244, - "name": "HTM", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "signatures": [ { - "fileName": "lib/const/http.ts", - "line": 67, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L67" + "id": 56, + "name": "__type", + "variant": "signature", + "kind": 4096, + "flags": {}, + "sources": [ + { + "fileName": "lib/request.ts", + "line": 8, + "character": 9 + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } } - ], - "type": { - "type": "literal", - "value": "text/html" - }, - "defaultValue": "'text/html'" - }, + ] + } + } + }, + { + "id": 53, + "name": "aborted", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "sources": [ { - "id": 243, - "name": "HTML", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 66, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L66" - } - ], - "type": { - "type": "literal", - "value": "text/html" - }, - "defaultValue": "'text/html'" - }, + "fileName": "lib/request.ts", + "line": 7, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 50, + "name": "data", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "sources": [ { - "id": 257, - "name": "ICO", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 80, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L80" - } - ], - "type": { + "fileName": "lib/request.ts", + "line": 4, + "character": 2 + } + ], + "type": { + "type": "union", + "types": [ + { "type": "literal", - "value": "image/vnd.microsoft.icon" + "value": null }, - "defaultValue": "'image/vnd.microsoft.icon'" - }, + { + "type": "reference", + "target": 58, + "name": "T", + "package": "@cc-heart/utils", + "qualifiedName": "RequestReturn.T", + "refersToTypeParameter": true + } + ] + } + }, + { + "id": 51, + "name": "error", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "sources": [ { - "id": 317, - "name": "JAVA", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 140, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L140" - } - ], - "type": { - "type": "literal", - "value": "text/x-java-source" - }, - "defaultValue": "'text/x-java-source'" - }, + "fileName": "lib/request.ts", + "line": 5, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "unknown" + } + }, + { + "id": 52, + "name": "loading", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "sources": [ { - "id": 249, - "name": "JAVASCRIPT", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 72, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L72" - } - ], - "type": { - "type": "literal", - "value": "application/javascript" - }, - "defaultValue": "'application/javascript'" - }, + "fileName": "lib/request.ts", + "line": 6, + "character": 2 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 57, + "name": "promise", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "sources": [ { - "id": 252, - "name": "JPEG", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 75, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L75" - } - ], - "type": { - "type": "literal", - "value": "image/jpeg" - }, - "defaultValue": "'image/jpeg'" + "fileName": "lib/request.ts", + "line": 9, + "character": 2 + } + ], + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Promise" }, + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "reference", + "target": 58, + "name": "T", + "package": "@cc-heart/utils", + "qualifiedName": "RequestReturn.T", + "refersToTypeParameter": true + } + ] + } + ], + "name": "Promise", + "package": "typescript" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 54, + 53, + 50, + 51, + 52, + 57 + ] + } + ], + "sources": [ + { + "fileName": "lib/request.ts", + "line": 3, + "character": 17 + } + ], + "typeParameters": [ + { + "id": 58, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {} + } + ] + }, + { + "id": 69, + "name": "ErrorInterceptor", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "sources": [ + { + "fileName": "lib/request.ts", + "line": 20, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 70, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "sources": [ { - "id": 251, - "name": "JPG", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 74, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L74" - } - ], - "type": { - "type": "literal", - "value": "image/jpeg" - }, - "defaultValue": "'image/jpeg'" - }, + "fileName": "lib/request.ts", + "line": 20, + "character": 31 + } + ], + "signatures": [ { - "id": 248, - "name": "JSON", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "id": 71, + "name": "__type", + "variant": "signature", + "kind": 4096, + "flags": {}, + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 71, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L71" + "id": 72, + "name": "error", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "unknown" + } } ], "type": { - "type": "literal", - "value": "application/json" - }, - "defaultValue": "'application/json'" - }, + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "unknown" + }, + { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Promise" + }, + "typeArguments": [ + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Promise", + "package": "typescript" + } + ] + } + } + ] + } + } + }, + { + "id": 59, + "name": "RequestInterceptor", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "sources": [ + { + "fileName": "lib/request.ts", + "line": 12, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 60, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "sources": [ { - "id": 299, - "name": "JSONLD", - "variant": "declaration", - "kind": 1024, - "flags": { - "isReadonly": true - }, - "sources": [ + "fileName": "lib/request.ts", + "line": 12, + "character": 33 + } + ], + "signatures": [ + { + "id": 61, + "name": "__type", + "variant": "signature", + "kind": 4096, + "flags": {}, + "parameters": [ { - "fileName": "lib/const/http.ts", - "line": 122, - "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L122" + "id": 62, + "name": "config", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/@types/node/globals.d.ts", + "qualifiedName": "__global.RequestInit" + }, + "name": "RequestInit", + "package": "@types/node", + "qualifiedName": "__global.RequestInit" + } } ], "type": { - "type": "literal", - "value": "application/ld+json" - }, - "defaultValue": "'application/ld+json'" - }, - { - "id": 325, - "name": "KT", - "variant": "declaration", - "kind": 1024, + "type": "union", + "types": [ + { + "type": "reference", + "target": { + "sourceFileName": "node_modules/@types/node/globals.d.ts", + "qualifiedName": "__global.RequestInit" + }, + "name": "RequestInit", + "package": "@types/node", + "qualifiedName": "__global.RequestInit" + }, + { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Promise" + }, + "typeArguments": [ + { + "type": "reference", + "target": { + "sourceFileName": "node_modules/@types/node/globals.d.ts", + "qualifiedName": "__global.RequestInit" + }, + "name": "RequestInit", + "package": "@types/node", + "qualifiedName": "__global.RequestInit" + } + ], + "name": "Promise", + "package": "typescript" + } + ] + } + } + ] + } + } + }, + { + "id": 63, + "name": "ResponseInterceptor", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "sources": [ + { + "fileName": "lib/request.ts", + "line": 16, + "character": 12 + } + ], + "typeParameters": [ + { + "id": 67, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {}, + "default": { + "type": "intrinsic", + "name": "unknown" + } + }, + { + "id": 68, + "name": "U", + "variant": "typeParam", + "kind": 131072, + "flags": {}, + "default": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 64, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "sources": [ + { + "fileName": "lib/request.ts", + "line": 16, + "character": 60 + } + ], + "signatures": [ + { + "id": 65, + "name": "__type", + "variant": "signature", + "kind": 4096, + "flags": {}, + "parameters": [ + { + "id": 66, + "name": "data", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": 67, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "target": 68, + "name": "U", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + }, + { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Promise" + }, + "typeArguments": [ + { + "type": "reference", + "target": 68, + "name": "U", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + ], + "name": "Promise", + "package": "typescript" + } + ] + } + } + ] + } + } + }, + { + "id": 341, + "name": "HTTP_STATUS", + "variant": "declaration", + "kind": 32, + "flags": { + "isConst": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 1, + "character": 13, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L1" + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 342, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "children": [ + { + "id": 349, + "name": "ACCEPTED", + "variant": "declaration", + "kind": 1024, "flags": { "isReadonly": true }, "sources": [ { "fileName": "lib/const/http.ts", - "line": 148, + "line": 8, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L148" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L8" } ], "type": { "type": "literal", - "value": "text/plain" + "value": 202 }, - "defaultValue": "'text/plain'" + "defaultValue": "202" }, { - "id": 304, - "name": "M3U8", + "id": 354, + "name": "AMBIGUOUS", "variant": "declaration", "kind": 1024, "flags": { @@ -2877,20 +4055,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 127, + "line": 13, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L127" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L13" } ], "type": { "type": "literal", - "value": "application/vnd.apple.mpegurl" + "value": 300 }, - "defaultValue": "'application/vnd.apple.mpegurl'" + "defaultValue": "300" }, { - "id": 261, - "name": "M4A", + "id": 387, + "name": "BAD_GATEWAY", "variant": "declaration", "kind": 1024, "flags": { @@ -2899,20 +4077,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 84, + "line": 46, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L84" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L46" } ], "type": { "type": "literal", - "value": "audio/mp4" + "value": 502 }, - "defaultValue": "'audio/mp4'" + "defaultValue": "502" }, { - "id": 300, - "name": "MAP", + "id": 361, + "name": "BAD_REQUEST", "variant": "declaration", "kind": 1024, "flags": { @@ -2921,20 +4099,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 123, + "line": 20, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L123" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L20" } ], "type": { "type": "literal", - "value": "application/json" + "value": 400 }, - "defaultValue": "'application/json'" + "defaultValue": "400" }, { - "id": 269, - "name": "MKV", + "id": 370, + "name": "CONFLICT", "variant": "declaration", "kind": 1024, "flags": { @@ -2943,20 +4121,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 92, + "line": 29, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L92" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L29" } ], "type": { "type": "literal", - "value": "video/x-matroska" + "value": 409 }, - "defaultValue": "'video/x-matroska'" + "defaultValue": "409" }, { - "id": 265, - "name": "MOV", + "id": 343, + "name": "CONTINUE", "variant": "declaration", "kind": 1024, "flags": { @@ -2965,20 +4143,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 88, + "line": 2, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L88" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L2" } ], "type": { "type": "literal", - "value": "video/quicktime" + "value": 100 }, - "defaultValue": "'video/quicktime'" + "defaultValue": "100" }, { - "id": 258, - "name": "MP3", + "id": 348, + "name": "CREATED", "variant": "declaration", "kind": 1024, "flags": { @@ -2987,20 +4165,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 81, + "line": 7, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L81" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L7" } ], "type": { "type": "literal", - "value": "audio/mpeg" + "value": 201 }, - "defaultValue": "'audio/mpeg'" + "defaultValue": "201" }, { - "id": 263, - "name": "MP4", + "id": 346, + "name": "EARLYHINTS", "variant": "declaration", "kind": 1024, "flags": { @@ -3009,20 +4187,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 86, + "line": 5, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L86" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L5" } ], "type": { "type": "literal", - "value": "video/mp4" + "value": 103 }, - "defaultValue": "'video/mp4'" + "defaultValue": "103" }, { - "id": 303, - "name": "MPD", + "id": 378, + "name": "EXPECTATION_FAILED", "variant": "declaration", "kind": 1024, "flags": { @@ -3031,20 +4209,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 126, + "line": 37, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L126" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L37" } ], "type": { "type": "literal", - "value": "application/dash+xml" + "value": 417 }, - "defaultValue": "'application/dash+xml'" + "defaultValue": "417" }, { - "id": 311, - "name": "MSG", + "id": 382, + "name": "FAILED_DEPENDENCY", "variant": "declaration", "kind": 1024, "flags": { @@ -3053,20 +4231,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 134, + "line": 41, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L134" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L41" } ], "type": { "type": "literal", - "value": "application/vnd.ms-outlook" + "value": 424 }, - "defaultValue": "'application/vnd.ms-outlook'" + "defaultValue": "424" }, { - "id": 292, - "name": "MSI", + "id": 364, + "name": "FORBIDDEN", "variant": "declaration", "kind": 1024, "flags": { @@ -3075,20 +4253,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 115, + "line": 23, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L115" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L23" } ], "type": { "type": "literal", - "value": "application/x-msdownload" + "value": 403 }, - "defaultValue": "'application/x-msdownload'" + "defaultValue": "403" }, { - "id": 314, - "name": "OBJ", + "id": 356, + "name": "FOUND", "variant": "declaration", "kind": 1024, "flags": { @@ -3097,20 +4275,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 137, + "line": 15, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L137" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L15" } ], "type": { "type": "literal", - "value": "application/octet-stream" + "value": 302 }, - "defaultValue": "'application/octet-stream'" + "defaultValue": "302" }, { - "id": 260, - "name": "OGG", + "id": 389, + "name": "GATEWAY_TIMEOUT", "variant": "declaration", "kind": 1024, "flags": { @@ -3119,20 +4297,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 83, + "line": 48, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L83" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L48" } ], "type": { "type": "literal", - "value": "audio/ogg" + "value": 504 }, - "defaultValue": "'audio/ogg'" + "defaultValue": "504" }, { - "id": 297, - "name": "OTF", + "id": 371, + "name": "GONE", "variant": "declaration", "kind": 1024, "flags": { @@ -3141,20 +4319,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 120, + "line": 30, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L120" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L30" } ], "type": { "type": "literal", - "value": "font/otf" + "value": 410 }, - "defaultValue": "'font/otf'" + "defaultValue": "410" }, { - "id": 276, - "name": "PDF", + "id": 390, + "name": "HTTP_VERSION_NOT_SUPPORTED", "variant": "declaration", "kind": 1024, "flags": { @@ -3163,20 +4341,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 99, + "line": 49, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L99" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L49" } ], "type": { "type": "literal", - "value": "application/pdf" + "value": 505 }, - "defaultValue": "'application/pdf'" + "defaultValue": "505" }, { - "id": 323, - "name": "PHP", + "id": 385, + "name": "INTERNAL_SERVER_ERROR", "variant": "declaration", "kind": 1024, "flags": { @@ -3185,20 +4363,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 146, + "line": 44, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L146" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L44" } ], "type": { "type": "literal", - "value": "application/x-httpd-php" + "value": 500 }, - "defaultValue": "'application/x-httpd-php'" + "defaultValue": "500" }, { - "id": 250, - "name": "PNG", + "id": 379, + "name": "I_AM_A_TEAPOT", "variant": "declaration", "kind": 1024, "flags": { @@ -3207,20 +4385,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 73, + "line": 38, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L73" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L38" } ], "type": { "type": "literal", - "value": "image/png" + "value": 418 }, - "defaultValue": "'image/png'" + "defaultValue": "418" }, { - "id": 286, - "name": "POT", + "id": 372, + "name": "LENGTH_REQUIRED", "variant": "declaration", "kind": 1024, "flags": { @@ -3229,20 +4407,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 109, + "line": 31, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L109" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L31" } ], "type": { "type": "literal", - "value": "application/vnd.ms-powerpoint" + "value": 411 }, - "defaultValue": "'application/vnd.ms-powerpoint'" + "defaultValue": "411" }, { - "id": 288, - "name": "POTX", + "id": 366, + "name": "METHOD_NOT_ALLOWED", "variant": "declaration", "kind": 1024, "flags": { @@ -3251,20 +4429,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 111, + "line": 25, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L111" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L25" } ], "type": { "type": "literal", - "value": "application/vnd.openxmlformats-officedocument.presentationml.template" + "value": 405 }, - "defaultValue": "'application/vnd.openxmlformats-officedocument.presentationml.template'" + "defaultValue": "405" }, { - "id": 289, - "name": "PPSX", + "id": 380, + "name": "MISDIRECTED", "variant": "declaration", "kind": 1024, "flags": { @@ -3273,20 +4451,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 112, + "line": 39, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L112" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L39" } ], "type": { "type": "literal", - "value": "application/vnd.openxmlformats-officedocument.presentationml.slideshow" + "value": 421 }, - "defaultValue": "'application/vnd.openxmlformats-officedocument.presentationml.slideshow'" + "defaultValue": "421" }, { - "id": 285, - "name": "PPT", + "id": 355, + "name": "MOVED_PERMANENTLY", "variant": "declaration", "kind": 1024, "flags": { @@ -3295,20 +4473,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 108, + "line": 14, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L108" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L14" } ], "type": { "type": "literal", - "value": "application/vnd.ms-powerpoint" + "value": 301 }, - "defaultValue": "'application/vnd.ms-powerpoint'" + "defaultValue": "301" }, { - "id": 287, - "name": "PPTX", + "id": 350, + "name": "NON_AUTHORITATIVE_INFORMATION", "variant": "declaration", "kind": 1024, "flags": { @@ -3317,20 +4495,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 110, + "line": 9, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L110" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L9" } ], "type": { "type": "literal", - "value": "application/vnd.openxmlformats-officedocument.presentationml.presentation" + "value": 203 }, - "defaultValue": "'application/vnd.openxmlformats-officedocument.presentationml.presentation'" + "defaultValue": "203" }, { - "id": 316, - "name": "PY", + "id": 367, + "name": "NOT_ACCEPTABLE", "variant": "declaration", "kind": 1024, "flags": { @@ -3339,20 +4517,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 139, + "line": 26, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L139" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L26" } ], "type": { "type": "literal", - "value": "text/x-python" + "value": 406 }, - "defaultValue": "'text/x-python'" + "defaultValue": "406" }, { - "id": 271, - "name": "RAR", + "id": 365, + "name": "NOT_FOUND", "variant": "declaration", "kind": 1024, "flags": { @@ -3361,20 +4539,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 94, + "line": 24, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L94" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L24" } ], "type": { "type": "literal", - "value": "application/vnd.rar" + "value": 404 }, - "defaultValue": "'application/vnd.rar'" + "defaultValue": "404" }, { - "id": 321, - "name": "RB", + "id": 386, + "name": "NOT_IMPLEMENTED", "variant": "declaration", "kind": 1024, "flags": { @@ -3383,20 +4561,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 144, + "line": 45, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L144" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L45" } ], "type": { "type": "literal", - "value": "application/x-ruby" + "value": 501 }, - "defaultValue": "'application/x-ruby'" + "defaultValue": "501" }, { - "id": 326, - "name": "RTF", + "id": 358, + "name": "NOT_MODIFIED", "variant": "declaration", "kind": 1024, "flags": { @@ -3405,20 +4583,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 149, + "line": 17, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L149" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L17" } ], "type": { "type": "literal", - "value": "application/rtf" + "value": 304 }, - "defaultValue": "'application/rtf'" + "defaultValue": "304" }, { - "id": 315, - "name": "STL", + "id": 351, + "name": "NO_CONTENT", "variant": "declaration", "kind": 1024, "flags": { @@ -3427,20 +4605,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 138, + "line": 10, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L138" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L10" } ], "type": { "type": "literal", - "value": "application/sla" + "value": 204 }, - "defaultValue": "'application/sla'" + "defaultValue": "204" }, { - "id": 256, - "name": "SVG", + "id": 347, + "name": "OK", "variant": "declaration", "kind": 1024, "flags": { @@ -3449,20 +4627,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 79, + "line": 6, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L79" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L6" } ], "type": { "type": "literal", - "value": "image/svg+xml" + "value": 200 }, - "defaultValue": "'image/svg+xml'" + "defaultValue": "200" }, { - "id": 306, - "name": "SWF", + "id": 353, + "name": "PARTIAL_CONTENT", "variant": "declaration", "kind": 1024, "flags": { @@ -3471,20 +4649,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 129, + "line": 12, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L129" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L12" } ], "type": { "type": "literal", - "value": "application/x-shockwave-flash" + "value": 206 }, - "defaultValue": "'application/x-shockwave-flash'" + "defaultValue": "206" }, { - "id": 324, - "name": "SWIFT", + "id": 374, + "name": "PAYLOAD_TOO_LARGE", "variant": "declaration", "kind": 1024, "flags": { @@ -3493,20 +4671,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 147, + "line": 33, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L147" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L33" } ], "type": { "type": "literal", - "value": "text/x-swift" + "value": 413 }, - "defaultValue": "'text/x-swift'" + "defaultValue": "413" }, { - "id": 273, - "name": "TAR", + "id": 363, + "name": "PAYMENT_REQUIRED", "variant": "declaration", "kind": 1024, "flags": { @@ -3515,20 +4693,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 96, + "line": 22, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L96" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L22" } ], "type": { "type": "literal", - "value": "application/x-tar" + "value": 402 }, - "defaultValue": "'application/x-tar'" + "defaultValue": "402" }, { - "id": 305, - "name": "TORRENT", + "id": 360, + "name": "PERMANENT_REDIRECT", "variant": "declaration", "kind": 1024, "flags": { @@ -3537,20 +4715,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 128, + "line": 19, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L128" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L19" } ], "type": { "type": "literal", - "value": "application/x-bittorrent" + "value": 308 }, - "defaultValue": "'application/x-bittorrent'" + "defaultValue": "308" }, { - "id": 302, - "name": "TS", + "id": 373, + "name": "PRECONDITION_FAILED", "variant": "declaration", "kind": 1024, "flags": { @@ -3559,20 +4737,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 125, + "line": 32, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L125" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L32" } ], "type": { "type": "literal", - "value": "video/mp2t" + "value": 412 }, - "defaultValue": "'video/mp2t'" + "defaultValue": "412" }, { - "id": 296, - "name": "TTF", + "id": 383, + "name": "PRECONDITION_REQUIRED", "variant": "declaration", "kind": 1024, "flags": { @@ -3581,20 +4759,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 119, + "line": 42, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L119" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L42" } ], "type": { "type": "literal", - "value": "font/ttf" + "value": 428 }, - "defaultValue": "'font/ttf'" + "defaultValue": "428" }, { - "id": 242, - "name": "TXT", + "id": 345, + "name": "PROCESSING", "variant": "declaration", "kind": 1024, "flags": { @@ -3603,20 +4781,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 65, + "line": 4, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L65" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L4" } ], "type": { "type": "literal", - "value": "text/plain" + "value": 102 }, - "defaultValue": "'text/plain'" + "defaultValue": "102" }, { - "id": 301, - "name": "WASM", + "id": 368, + "name": "PROXY_AUTHENTICATION_REQUIRED", "variant": "declaration", "kind": 1024, "flags": { @@ -3625,20 +4803,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 124, + "line": 27, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L124" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L27" } ], "type": { "type": "literal", - "value": "application/wasm" + "value": 407 }, - "defaultValue": "'application/wasm'" + "defaultValue": "407" }, { - "id": 259, - "name": "WAV", + "id": 377, + "name": "REQUESTED_RANGE_NOT_SATISFIABLE", "variant": "declaration", "kind": 1024, "flags": { @@ -3647,20 +4825,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 82, + "line": 36, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L82" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L36" } ], "type": { "type": "literal", - "value": "audio/wav" + "value": 416 }, - "defaultValue": "'audio/wav'" + "defaultValue": "416" }, { - "id": 268, - "name": "WEBM", + "id": 369, + "name": "REQUEST_TIMEOUT", "variant": "declaration", "kind": 1024, "flags": { @@ -3669,20 +4847,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 91, + "line": 28, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L91" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L28" } ], "type": { "type": "literal", - "value": "video/webm" + "value": 408 }, - "defaultValue": "'video/webm'" + "defaultValue": "408" }, { - "id": 255, - "name": "WEBP", + "id": 352, + "name": "RESET_CONTENT", "variant": "declaration", "kind": 1024, "flags": { @@ -3691,20 +4869,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 78, + "line": 11, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L78" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L11" } ], "type": { "type": "literal", - "value": "image/webp" + "value": 205 }, - "defaultValue": "'image/webp'" + "defaultValue": "205" }, { - "id": 266, - "name": "WMV", + "id": 357, + "name": "SEE_OTHER", "variant": "declaration", "kind": 1024, "flags": { @@ -3713,20 +4891,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 89, + "line": 16, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L89" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L16" } ], "type": { "type": "literal", - "value": "video/x-ms-wmv" + "value": 303 }, - "defaultValue": "'video/x-ms-wmv'" + "defaultValue": "303" }, { - "id": 294, - "name": "WOFF", + "id": 388, + "name": "SERVICE_UNAVAILABLE", "variant": "declaration", "kind": 1024, "flags": { @@ -3735,20 +4913,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 117, + "line": 47, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L117" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L47" } ], "type": { "type": "literal", - "value": "font/woff" + "value": 503 }, - "defaultValue": "'font/woff'" + "defaultValue": "503" }, { - "id": 295, - "name": "WOFF2", + "id": 344, + "name": "SWITCHING_PROTOCOLS", "variant": "declaration", "kind": 1024, "flags": { @@ -3757,20 +4935,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 118, + "line": 3, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L118" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L3" } ], "type": { "type": "literal", - "value": "font/woff2" + "value": 101 }, - "defaultValue": "'font/woff2'" + "defaultValue": "101" }, { - "id": 281, - "name": "XLS", + "id": 359, + "name": "TEMPORARY_REDIRECT", "variant": "declaration", "kind": 1024, "flags": { @@ -3779,20 +4957,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 104, + "line": 18, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L104" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L18" } ], "type": { "type": "literal", - "value": "application/vnd.ms-excel" + "value": 307 }, - "defaultValue": "'application/vnd.ms-excel'" + "defaultValue": "307" }, { - "id": 284, - "name": "XLSM", + "id": 384, + "name": "TOO_MANY_REQUESTS", "variant": "declaration", "kind": 1024, "flags": { @@ -3801,20 +4979,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 107, + "line": 43, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L107" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L43" } ], "type": { "type": "literal", - "value": "application/vnd.ms-excel.sheet.macroEnabled.12" + "value": 429 }, - "defaultValue": "'application/vnd.ms-excel.sheet.macroEnabled.12'" + "defaultValue": "429" }, { - "id": 283, - "name": "XLSX", + "id": 362, + "name": "UNAUTHORIZED", "variant": "declaration", "kind": 1024, "flags": { @@ -3823,20 +5001,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 106, + "line": 21, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L106" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L21" } ], "type": { "type": "literal", - "value": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" + "value": 401 }, - "defaultValue": "'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'" + "defaultValue": "401" }, { - "id": 282, - "name": "XLT", + "id": 381, + "name": "UNPROCESSABLE_ENTITY", "variant": "declaration", "kind": 1024, "flags": { @@ -3845,20 +5023,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 105, + "line": 40, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L105" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L40" } ], "type": { "type": "literal", - "value": "application/vnd.ms-excel" + "value": 422 }, - "defaultValue": "'application/vnd.ms-excel'" + "defaultValue": "422" }, { - "id": 247, - "name": "XML", + "id": 376, + "name": "UNSUPPORTED_MEDIA_TYPE", "variant": "declaration", "kind": 1024, "flags": { @@ -3867,20 +5045,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 70, + "line": 35, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L70" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L35" } ], "type": { "type": "literal", - "value": "application/xml" + "value": 415 }, - "defaultValue": "'application/xml'" + "defaultValue": "415" }, { - "id": 270, - "name": "ZIP", + "id": 375, + "name": "URI_TOO_LONG", "variant": "declaration", "kind": 1024, "flags": { @@ -3889,118 +5067,79 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 93, + "line": 34, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L93" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L34" } ], "type": { "type": "literal", - "value": "application/zip" + "value": 414 }, - "defaultValue": "'application/zip'" + "defaultValue": "414" } ], "groups": [ { "title": "Properties", "children": [ - 272, - 328, - 327, - 308, - 264, - 293, - 254, - 275, - 318, - 319, - 320, - 245, - 246, - 291, - 309, - 277, - 279, - 278, - 280, - 312, - 313, - 310, - 298, - 307, - 290, - 262, - 267, - 253, - 322, - 274, - 244, - 243, - 257, - 317, - 249, - 252, - 251, - 248, - 299, - 325, - 304, - 261, - 300, - 269, - 265, - 258, - 263, - 303, - 311, - 292, - 314, - 260, - 297, - 276, - 323, - 250, - 286, - 288, - 289, - 285, - 287, - 316, - 271, - 321, - 326, - 315, - 256, - 306, - 324, - 273, - 305, - 302, - 296, - 242, - 301, - 259, - 268, - 255, - 266, - 294, - 295, - 281, - 284, - 283, - 282, - 247, - 270 + 349, + 354, + 387, + 361, + 370, + 343, + 348, + 346, + 378, + 382, + 364, + 356, + 389, + 371, + 390, + 385, + 379, + 372, + 366, + 380, + 355, + 350, + 367, + 365, + 386, + 358, + 351, + 347, + 353, + 374, + 363, + 360, + 373, + 383, + 345, + 368, + 377, + 369, + 352, + 357, + 388, + 344, + 359, + 384, + 362, + 381, + 376, + 375 ] } ], "sources": [ { "fileName": "lib/const/http.ts", - "line": 64, - "character": 26, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L64" + "line": 1, + "character": 27, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L1" } ] } @@ -4008,8 +5147,8 @@ "defaultValue": "..." }, { - "id": 229, - "name": "REQUEST_METHOD", + "id": 402, + "name": "MIME_TYPES", "variant": "declaration", "kind": 32, "flags": { @@ -4018,23 +5157,23 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 52, + "line": 64, "character": 13, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L52" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L64" } ], "type": { "type": "reflection", "declaration": { - "id": 230, + "id": 403, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { - "id": 236, - "name": "ALL", + "id": 434, + "name": "7Z", "variant": "declaration", "kind": 1024, "flags": { @@ -4043,20 +5182,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 58, + "line": 95, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L58" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L95" } ], "type": { "type": "literal", - "value": "ALL" + "value": "application/x-7z-compressed" }, - "defaultValue": "'ALL'" + "defaultValue": "'application/x-7z-compressed'" }, { - "id": 234, - "name": "DELETE", + "id": 490, + "name": "7ZIP", "variant": "declaration", "kind": 1024, "flags": { @@ -4065,20 +5204,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 56, + "line": 151, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L56" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L151" } ], "type": { "type": "literal", - "value": "DELETE" + "value": "application/x-7z-compressed" }, - "defaultValue": "'DELETE'" + "defaultValue": "'application/x-7z-compressed'" }, { - "id": 231, - "name": "GET", + "id": 489, + "name": "ALZ", "variant": "declaration", "kind": 1024, "flags": { @@ -4087,20 +5226,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 53, + "line": 150, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L53" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L150" } ], "type": { "type": "literal", - "value": "GET" + "value": "application/x-alz" }, - "defaultValue": "'GET'" + "defaultValue": "'application/x-alz'" }, { - "id": 238, - "name": "HEAD", + "id": 470, + "name": "APK", "variant": "declaration", "kind": 1024, "flags": { @@ -4109,20 +5248,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 60, + "line": 131, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L60" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L131" } ], "type": { "type": "literal", - "value": "HEAD" + "value": "application/vnd.android.package-archive" }, - "defaultValue": "'HEAD'" + "defaultValue": "'application/vnd.android.package-archive'" }, { - "id": 237, - "name": "OPTIONS", + "id": 426, + "name": "AVI", "variant": "declaration", "kind": 1024, "flags": { @@ -4131,20 +5270,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 59, + "line": 87, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L59" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L87" } ], "type": { "type": "literal", - "value": "OPTIONS" + "value": "video/x-msvideo" }, - "defaultValue": "'OPTIONS'" + "defaultValue": "'video/x-msvideo'" }, { - "id": 235, - "name": "PATCH", + "id": 455, + "name": "BAT", "variant": "declaration", "kind": 1024, "flags": { @@ -4153,20 +5292,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 57, + "line": 116, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L57" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L116" } ], "type": { "type": "literal", - "value": "PATCH" + "value": "application/x-msdownload" }, - "defaultValue": "'PATCH'" + "defaultValue": "'application/x-msdownload'" }, { - "id": 232, - "name": "POST", + "id": 416, + "name": "BMP", "variant": "declaration", "kind": 1024, "flags": { @@ -4175,20 +5314,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 54, + "line": 77, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L54" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L77" } ], "type": { "type": "literal", - "value": "POST" + "value": "image/bmp" }, - "defaultValue": "'POST'" + "defaultValue": "'image/bmp'" }, { - "id": 233, - "name": "PUT", + "id": 437, + "name": "BZ2", "variant": "declaration", "kind": 1024, "flags": { @@ -4197,20 +5336,20 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 55, + "line": 98, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L55" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L98" } ], "type": { "type": "literal", - "value": "PUT" + "value": "application/x-bzip2" }, - "defaultValue": "'PUT'" + "defaultValue": "'application/x-bzip2'" }, { - "id": 239, - "name": "SEARCH", + "id": 480, + "name": "C", "variant": "declaration", "kind": 1024, "flags": { @@ -4219,4030 +5358,2154 @@ "sources": [ { "fileName": "lib/const/http.ts", - "line": 61, + "line": 141, "character": 2, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L61" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L141" } ], "type": { "type": "literal", - "value": "SEARCH" + "value": "text/x-csrc" }, - "defaultValue": "'SEARCH'" - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 236, - 234, - 231, - 238, - 237, - 235, - 232, - 233, - 239 - ] - } - ], - "sources": [ - { - "fileName": "lib/const/http.ts", - "line": 52, - "character": 30, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/const/http.ts#L52" - } - ] - } - }, - "defaultValue": "..." - }, - { - "id": 140, - "name": "_toString", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 1, - "character": 13, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L1" - } - ], - "signatures": [ - { - "id": 141, - "name": "_toString", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Returns a string representation of an object." - } - ] - }, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 1, - "character": 13, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L1" - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 87, - "name": "basename", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/url.ts", - "line": 139, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/url.ts#L139" - } - ], - "signatures": [ - { - "id": 88, - "name": "basename", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Returns the last portion of a path, similar to the Unix basename command.\nTrims the query string if it exists.\nOptionally, removes a suffix from the result." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The basename of the path." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "lib/url.ts", - "line": 139, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/url.ts#L139" - } - ], - "parameters": [ + "defaultValue": "'text/x-csrc'" + }, { - "id": 89, - "name": "path", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The path to get the basename from." - } - ] + "id": 481, + "name": "CPP", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 142, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L142" + } + ], "type": { - "type": "intrinsic", - "name": "string" - } + "type": "literal", + "value": "text/x-c++src" + }, + "defaultValue": "'text/x-c++src'" }, { - "id": 90, - "name": "suffix", - "variant": "param", - "kind": 32768, + "id": 482, + "name": "CS", + "variant": "declaration", + "kind": 1024, "flags": { - "isOptional": true - }, - "comment": { - "summary": [ - { - "kind": "text", - "text": "An optional suffix to remove from the basename." - } - ] + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 143, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L143" + } + ], "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 62, - "name": "capitalize", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/string.ts", - "line": 7, - "character": 13, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/string.ts#L7" - } - ], - "signatures": [ - { - "id": 63, - "name": "capitalize", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Capitalizes the first letter of a string." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "- The capitalized string." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "lib/string.ts", - "line": 7, - "character": 26, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/string.ts#L7" - } - ], - "typeParameter": [ - { - "id": 64, - "name": "T", - "variant": "typeParam", - "kind": 131072, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "parameters": [ - { - "id": 65, - "name": "target", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The string to be capitalized." - } - ] + "type": "literal", + "value": "text/plain" }, - "type": { - "type": "reference", - "target": 64, - "name": "T", - "package": "@cc-heart/utils", - "refersToTypeParameter": true - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Capitalize" + "defaultValue": "'text/plain'" }, - "typeArguments": [ - { - "type": "reference", - "target": 64, - "name": "T", - "package": "@cc-heart/utils", - "refersToTypeParameter": true - } - ], - "name": "Capitalize", - "package": "typescript" - } - } - ] - }, - { - "id": 161, - "name": "compose", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/workers.ts", - "line": 91, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L91" - } - ], - "signatures": [ - { - "id": 162, - "name": "compose", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Takes a series of functions and returns a new function that runs these functions in reverse sequence.\nIf a function returns a Promise, the next function is called with the resolved value." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "A new function that takes any number of arguments and composes them through " - }, - { - "kind": "code", - "text": "`fns`" - }, - { - "kind": "text", - "text": "." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "lib/workers.ts", - "line": 91, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L91" - } - ], - "parameters": [ { - "id": 163, - "name": "fns", - "variant": "param", - "kind": 32768, + "id": 407, + "name": "CSS", + "variant": "declaration", + "kind": 1024, "flags": { - "isRest": true - }, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The functions to compose." - } - ] + "isReadonly": true }, - "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": { - "sourceFileName": "typings/helper.ts", - "qualifiedName": "Fn" - }, - "name": "Fn", - "package": "@cc-heart/utils" + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 68, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L68" } - } - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 164, - "name": "__type", + ], + "type": { + "type": "literal", + "value": "text/css" + }, + "defaultValue": "'text/css'" + }, + { + "id": 408, + "name": "CSV", "variant": "declaration", - "kind": 65536, - "flags": {}, + "kind": 1024, + "flags": { + "isReadonly": true + }, "sources": [ { - "fileName": "lib/workers.ts", - "line": 71, - "character": 9, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L71" + "fileName": "lib/const/http.ts", + "line": 69, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L69" } ], - "signatures": [ - { - "id": 165, - "name": "__type", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "lib/workers.ts", - "line": 71, - "character": 9, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L71" - } - ], - "parameters": [ - { - "id": 166, - "name": "args", - "variant": "param", - "kind": 32768, - "flags": { - "isRest": true - }, - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "any" - } - } - } - ], - "type": { - "type": "intrinsic", - "name": "any" - } - } - ] - } - } - } - ] - }, - { - "id": 84, - "name": "convertParamsRouterToRegExp", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/url.ts", - "line": 123, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/url.ts#L123" - } - ], - "signatures": [ - { - "id": 85, - "name": "convertParamsRouterToRegExp", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "convert params routes to regular expressions" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "null or An array contains the RegExp that matches the params and the path for each params parameter" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "lib/url.ts", - "line": 123, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/url.ts#L123" - } - ], - "parameters": [ - { - "id": 86, - "name": "path", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "a params paths" - } - ] - }, "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "union", - "types": [ - { "type": "literal", - "value": null + "value": "text/csv" }, - { - "type": "array", - "elementType": { - "type": "union", - "types": [ - { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "RegExp" - }, - "name": "RegExp", - "package": "typescript" - }, - { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - ] - } - } - ] - } - } - ] - }, - { - "id": 40, - "name": "defineDebounceFn", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/define.ts", - "line": 23, - "character": 13, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/define.ts#L23" - } - ], - "signatures": [ - { - "id": 41, - "name": "defineDebounceFn", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "DefineDebounceFn is a function that creates a debounced function." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "- The debounce function." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "lib/define.ts", - "line": 23, - "character": 13, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/define.ts#L23" - } - ], - "parameters": [ + "defaultValue": "'text/csv'" + }, { - "id": 42, - "name": "fn", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The function to be debounced." - } - ] + "id": 453, + "name": "DLL", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 114, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L114" + } + ], "type": { - "type": "reference", - "target": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "CacheResultFunc" - }, - "name": "CacheResultFunc", - "package": "@cc-heart/utils" - } + "type": "literal", + "value": "application/vnd.microsoft.portable-executable" + }, + "defaultValue": "'application/vnd.microsoft.portable-executable'" }, { - "id": 43, - "name": "delay", - "variant": "param", - "kind": 32768, + "id": 471, + "name": "DMG", + "variant": "declaration", + "kind": 1024, "flags": { - "isOptional": true - }, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The delay in milliseconds to wait before the debounced function is called. Default is 500ms." - } - ] + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 132, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L132" + } + ], "type": { - "type": "intrinsic", - "name": "number" - } + "type": "literal", + "value": "application/x-apple-diskimage" + }, + "defaultValue": "'application/x-apple-diskimage'" }, { - "id": 44, - "name": "immediate", - "variant": "param", - "kind": 32768, + "id": 439, + "name": "DOC", + "variant": "declaration", + "kind": 1024, "flags": { - "isOptional": true - }, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Whether the debounced function should be called immediately before the delay. Default is false." - } - ] + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 100, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L100" + } + ], "type": { - "type": "intrinsic", - "name": "boolean" - } - } - ], - "type": { - "type": "intrinsic", - "name": "any" - } - } - ] - }, - { - "id": 20, - "name": "defineOnceFn", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/define.ts", - "line": 51, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/define.ts#L51" - } - ], - "signatures": [ - { - "id": 21, - "name": "defineOnceFn", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Creates a function that can only be called once." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "- A new function that can only be called once." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "lib/define.ts", - "line": 51, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/define.ts#L51" - } - ], - "typeParameter": [ + "type": "literal", + "value": "application/msword" + }, + "defaultValue": "'application/msword'" + }, { - "id": 22, - "name": "T", - "variant": "typeParam", - "kind": 131072, - "flags": {} - } - ], - "parameters": [ + "id": 441, + "name": "DOCX", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 102, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L102" + } + ], + "type": { + "type": "literal", + "value": "application/vnd.openxmlformats-officedocument.wordprocessingml.document" + }, + "defaultValue": "'application/vnd.openxmlformats-officedocument.wordprocessingml.document'" + }, { - "id": 23, - "name": "fn", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The function to be called once." - } - ] + "id": 440, + "name": "DOT", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 101, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L101" + } + ], "type": { - "type": "reflection", - "declaration": { - "id": 24, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "sources": [ - { - "fileName": "lib/define.ts", - "line": 51, - "character": 36, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/define.ts#L51" - } - ], - "signatures": [ - { - "id": 25, - "name": "__type", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "lib/define.ts", - "line": 51, - "character": 36, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/define.ts#L51" - } - ], - "parameters": [ - { - "id": 26, - "name": "args", - "variant": "param", - "kind": 32768, - "flags": { - "isRest": true - }, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "type": { - "type": "reference", - "target": 22, - "name": "T", - "package": "@cc-heart/utils", - "refersToTypeParameter": true - } - } - ] + "type": "literal", + "value": "application/msword" + }, + "defaultValue": "'application/msword'" + }, + { + "id": 442, + "name": "DOTX", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 103, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L103" } - } - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 27, - "name": "__type", + ], + "type": { + "type": "literal", + "value": "application/vnd.openxmlformats-officedocument.wordprocessingml.template" + }, + "defaultValue": "'application/vnd.openxmlformats-officedocument.wordprocessingml.template'" + }, + { + "id": 474, + "name": "DWG", "variant": "declaration", - "kind": 65536, - "flags": {}, + "kind": 1024, + "flags": { + "isReadonly": true + }, "sources": [ { - "fileName": "lib/define.ts", - "line": 57, - "character": 9, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/define.ts#L57" + "fileName": "lib/const/http.ts", + "line": 135, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L135" } ], - "signatures": [ + "type": { + "type": "literal", + "value": "application/acad" + }, + "defaultValue": "'application/acad'" + }, + { + "id": 475, + "name": "DXF", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ { - "id": 28, - "name": "__type", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "lib/define.ts", - "line": 57, - "character": 9, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/define.ts#L57" - } - ], - "parameters": [ - { - "id": 29, - "name": "this", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "any" - } - }, - { - "id": 30, - "name": "args", - "variant": "param", - "kind": 32768, - "flags": { - "isRest": true - }, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "type": { - "type": "reference", - "target": 22, - "name": "T", - "package": "@cc-heart/utils", - "refersToTypeParameter": true - } + "fileName": "lib/const/http.ts", + "line": 136, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L136" } - ] - } - } - } - ] - }, - { - "id": 35, - "name": "defineSinglePromiseFn", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/define.ts", - "line": 101, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/define.ts#L101" - } - ], - "signatures": [ - { - "id": 36, - "name": "defineSinglePromiseFn", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "defineSinglePromiseFn ensures that the provided function can only be called once at a time.\nIf the function is invoked while it's still executing, it returns the same promise, avoiding multiple calls." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "A function that ensures the provided function is only executed once and returns a promise." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "lib/define.ts", - "line": 101, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/define.ts#L101" - } - ], - "parameters": [ - { - "id": 37, - "name": "fn", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The function to be wrapped, which returns a promise." - } - ] - }, + ], "type": { - "type": "reference", - "target": { - "sourceFileName": "typings/helper.ts", - "qualifiedName": "Fn" - }, - "name": "Fn", - "package": "@cc-heart/utils" - } - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 38, - "name": "__type", + "type": "literal", + "value": "application/vnd.dxf" + }, + "defaultValue": "'application/vnd.dxf'" + }, + { + "id": 472, + "name": "EML", "variant": "declaration", - "kind": 65536, - "flags": {}, + "kind": 1024, + "flags": { + "isReadonly": true + }, "sources": [ { - "fileName": "lib/define.ts", - "line": 104, - "character": 9, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/define.ts#L104" + "fileName": "lib/const/http.ts", + "line": 133, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L133" } ], - "signatures": [ - { - "id": 39, - "name": "__type", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "lib/define.ts", - "line": 104, - "character": 9, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/define.ts#L104" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" - }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "any" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - } - } - } - ] - }, - { - "id": 31, - "name": "defineThrottleFn", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/define.ts", - "line": 72, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/define.ts#L72" - } - ], - "signatures": [ - { - "id": 32, - "name": "defineThrottleFn", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "defineThrottleFn is a function that creates a throttled function." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "- The throttled function." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "lib/define.ts", - "line": 72, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/define.ts#L72" - } - ], - "parameters": [ - { - "id": 33, - "name": "fn", - "variant": "param", - "kind": 32768, - "flags": {}, "type": { - "type": "reference", - "target": { - "sourceFileName": "typings/helper.ts", - "qualifiedName": "Fn" - }, - "name": "Fn", - "package": "@cc-heart/utils" - } + "type": "literal", + "value": "message/rfc822" + }, + "defaultValue": "'message/rfc822'" }, { - "id": 34, - "name": "delay", - "variant": "param", - "kind": 32768, - "flags": {}, + "id": 460, + "name": "EOT", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 121, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L121" + } + ], "type": { - "type": "intrinsic", - "name": "number" + "type": "literal", + "value": "application/vnd.ms-fontobject" }, - "defaultValue": "500" - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "CacheResultFunc" + "defaultValue": "'application/vnd.ms-fontobject'" }, - "name": "CacheResultFunc", - "package": "@cc-heart/utils" - } - } - ] - }, - { - "id": 145, - "name": "executeConcurrency", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/workers.ts", - "line": 4, - "character": 22, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L4" - } - ], - "signatures": [ - { - "id": 146, - "name": "executeConcurrency", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ { - "fileName": "lib/workers.ts", - "line": 4, - "character": 22, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L4" - } - ], - "parameters": [ + "id": 469, + "name": "EPUB", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 130, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L130" + } + ], + "type": { + "type": "literal", + "value": "application/epub+zip" + }, + "defaultValue": "'application/epub+zip'" + }, { - "id": 147, - "name": "tasks", - "variant": "param", - "kind": 32768, - "flags": {}, + "id": 452, + "name": "EXE", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 113, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L113" + } + ], "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": { - "sourceFileName": "typings/helper.ts", - "qualifiedName": "Fn" - }, - "name": "Fn", - "package": "@cc-heart/utils" + "type": "literal", + "value": "application/vnd.microsoft.portable-executable" + }, + "defaultValue": "'application/vnd.microsoft.portable-executable'" + }, + { + "id": 424, + "name": "FLAC", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 85, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L85" } - } + ], + "type": { + "type": "literal", + "value": "audio/flac" + }, + "defaultValue": "'audio/flac'" }, { - "id": 148, - "name": "maxConcurrency", - "variant": "param", - "kind": 32768, - "flags": {}, + "id": 429, + "name": "FLV", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 90, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L90" + } + ], "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" + "type": "literal", + "value": "video/x-flv" + }, + "defaultValue": "'video/x-flv'" }, - "typeArguments": [ - { - "type": "union", - "types": [ - { - "type": "literal", - "value": null - }, - { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "any" - } - } - ] - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 149, - "name": "executeQueue", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/workers.ts", - "line": 35, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L35" - } - ], - "signatures": [ - { - "id": 150, - "name": "executeQueue", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Invokes a queue." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "- A promise that resolves when all tasks are completed." - } - ] - } - ] - }, - "sources": [ { - "fileName": "lib/workers.ts", - "line": 35, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L35" - } - ], - "parameters": [ + "id": 415, + "name": "GIF", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 76, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L76" + } + ], + "type": { + "type": "literal", + "value": "image/gif" + }, + "defaultValue": "'image/gif'" + }, { - "id": 151, - "name": "taskArray", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "An array of tasks to be executed." - } - ] + "id": 484, + "name": "GO", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 145, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L145" + } + ], "type": { - "type": "array", - "elementType": { - "type": "reflection", - "declaration": { - "id": 152, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "sources": [ - { - "fileName": "lib/workers.ts", - "line": 36, - "character": 19, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L36" - } - ], - "signatures": [ - { - "id": 153, - "name": "__type", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "lib/workers.ts", - "line": 36, - "character": 19, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L36" - } - ], - "parameters": [ - { - "id": 154, - "name": "args", - "variant": "param", - "kind": 32768, - "flags": { - "isRest": true - }, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "type": { - "type": "intrinsic", - "name": "any" - } - } - ] - } - } - } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" + "type": "literal", + "value": "text/plain" + }, + "defaultValue": "'text/plain'" }, - "typeArguments": [ - { - "type": "intrinsic", - "name": "void" - } - ], - "name": "Promise", - "package": "typescript" - } - } - ] - }, - { - "id": 3, - "name": "formatDate", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/date.ts", - "line": 57, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/date.ts#L57" - } - ], - "signatures": [ - { - "id": 4, - "name": "formatDate", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Formats a Date object according to the specified formatter string." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The formatted date string" - } - ] + { + "id": 436, + "name": "GZ", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, - { - "tag": "@example", - "content": [ - { - "kind": "code", - "text": "```ts\nconst date = new Date(2024, 0, 1, 12, 30, 45);\nformatDate(date, 'YYYY-MM-DD hh:mm:ss'); // Returns \"2024-01-01 12:30:45\"\nformatDate(date, 'DD/MM/YYYY', true); // Returns \"01/01/2024\" in UTC\n```" - } - ] - } - ] - }, - "sources": [ + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 97, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L97" + } + ], + "type": { + "type": "literal", + "value": "application/gzip" + }, + "defaultValue": "'application/gzip'" + }, { - "fileName": "lib/date.ts", - "line": 57, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/date.ts#L57" - } - ], - "parameters": [ + "id": 406, + "name": "HTM", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 67, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L67" + } + ], + "type": { + "type": "literal", + "value": "text/html" + }, + "defaultValue": "'text/html'" + }, { - "id": 5, - "name": "date", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The Date object to format" - } - ] + "id": 405, + "name": "HTML", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 66, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L66" + } + ], "type": { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Date" - }, - "name": "Date", - "package": "typescript" - } + "type": "literal", + "value": "text/html" + }, + "defaultValue": "'text/html'" }, { - "id": 6, - "name": "formatter", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The format string. Supports YYYY (year), MM (month), DD (day), hh (hours), mm (minutes), ss (seconds)" - } - ] + "id": 419, + "name": "ICO", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 80, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L80" + } + ], "type": { - "type": "intrinsic", - "name": "string" + "type": "literal", + "value": "image/vnd.microsoft.icon" }, - "defaultValue": "'YYYY-MM-DD hh:mm:ss'" + "defaultValue": "'image/vnd.microsoft.icon'" }, { - "id": 7, - "name": "utc", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Whether to use UTC time instead of local time" - } - ] + "id": 479, + "name": "JAVA", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 140, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L140" + } + ], "type": { - "type": "intrinsic", - "name": "boolean" + "type": "literal", + "value": "text/x-java-source" }, - "defaultValue": "false" - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 16, - "name": "formatDateByArray", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/date.ts", - "line": 160, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/date.ts#L160" - } - ], - "signatures": [ - { - "id": 17, - "name": "formatDateByArray", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Formats a date based on an array of numbers, with optional formatting string\n\nThis function expects an array containing year, month, day, hour, minute, and second values. If the array is invalid or does not contain the necessary values, it logs a warning and returns 'Invalid Date'.\nThe function uses the slice method to create a new array containing only the first six elements, and decrements the month value by 1 to convert it from a 1-based index to a 0-based index used by the Date object.\nIt then creates a new Date object using the elements of the new array. If the date is invalid, it logs a warning and returns the date as a string.\nFinally, the function formats the date according to an optional formatting string and returns the formatted date string." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The formatted date string." - } - ] - }, - { - "tag": "@throws", - "content": [ - { - "kind": "text", - "text": "Throws an error if the array is invalid or does not contain the necessary values." - } - ] - }, - { - "tag": "@example", - "content": [ - { - "kind": "code", - "text": "```ts\nconst dateArray = [2024, 2, 19, 10, 30, 0];\nconst formattedDate = formatDateByArray(dateArray, 'MMMM D, YYYY, h:mm A');\nconsole.log(formattedDate);\n```" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "lib/date.ts", - "line": 160, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/date.ts#L160" - } - ], - "parameters": [ + "defaultValue": "'text/x-java-source'" + }, { - "id": 18, - "name": "array", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The array representing the date. This array should contain year, month, day, hour, minute, and second values." - } - ] + "id": 411, + "name": "JAVASCRIPT", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "number" + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 72, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L72" } - } + ], + "type": { + "type": "literal", + "value": "application/javascript" + }, + "defaultValue": "'application/javascript'" }, { - "id": 19, - "name": "formatter", - "variant": "param", - "kind": 32768, + "id": 414, + "name": "JPEG", + "variant": "declaration", + "kind": 1024, "flags": { - "isOptional": true - }, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Optional. A specific format string to format the date. Defaults to 'YYYY-MM-DD HH:mm:ss'." - } - ] + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 75, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L75" + } + ], "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 8, - "name": "formatDateByTimeStamp", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/date.ts", - "line": 105, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/date.ts#L105" - } - ], - "signatures": [ - { - "id": 9, - "name": "formatDateByTimeStamp", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Formats a date based on a given timestamp." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The formatted date string." - } - ] - }, - { - "tag": "@throws", - "content": [ - { - "kind": "text", - "text": "Throws an error if the timestamp is invalid or out of range." - } - ] + "type": "literal", + "value": "image/jpeg" }, - { - "tag": "@example", - "content": [ - { - "kind": "code", - "text": "```ts\nconst timestamp = new Date().getTime();\nconst formattedDate = formatDateByTimeStamp(timestamp);\nconsole.log(formattedDate);\n```" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "lib/date.ts", - "line": 105, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/date.ts#L105" - } - ], - "parameters": [ + "defaultValue": "'image/jpeg'" + }, { - "id": 10, - "name": "timeStamp", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The timestamp to be formatted, in milliseconds." - } - ] + "id": 413, + "name": "JPG", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 74, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L74" + } + ], "type": { - "type": "intrinsic", - "name": "number" - } + "type": "literal", + "value": "image/jpeg" + }, + "defaultValue": "'image/jpeg'" }, { - "id": 11, - "name": "formatter", - "variant": "param", - "kind": 32768, + "id": 410, + "name": "JSON", + "variant": "declaration", + "kind": 1024, "flags": { - "isOptional": true - }, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Optional. A specific format string to format the date. Defaults to 'YYYY-MM-DD HH:mm:ss'." - } - ] + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 71, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L71" + } + ], "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 12, - "name": "formatDateTimeByString", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/date.ts", - "line": 131, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/date.ts#L131" - } - ], - "signatures": [ - { - "id": 13, - "name": "formatDateTimeByString", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Formats a date string into a specified date time format" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The formatted date string." - } - ] - }, - { - "tag": "@throws", - "content": [ - { - "kind": "text", - "text": "Throws an error if the date string is invalid or cannot be parsed into a Date object." - } - ] - }, - { - "tag": "@example", - "content": [ - { - "kind": "code", - "text": "```ts\nconst dateString = '2024-02-19T10:30:00Z';\nconst formattedDateTime = formatDateTimeByString(dateString, 'MMMM D, YYYY, h:mm A');\nconsole.log(formattedDateTime);\n```" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "lib/date.ts", - "line": 131, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/date.ts#L131" - } - ], - "parameters": [ - { - "id": 14, - "name": "dateString", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "A string representing the date." - } - ] + "type": "literal", + "value": "application/json" }, - "type": { - "type": "intrinsic", - "name": "string" - } + "defaultValue": "'application/json'" }, { - "id": 15, - "name": "formatter", - "variant": "param", - "kind": 32768, + "id": 461, + "name": "JSONLD", + "variant": "declaration", + "kind": 1024, "flags": { - "isOptional": true - }, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Optional. A specific format string to format the date. Defaults to 'YYYY-MM-DD HH:mm:ss'." - } - ] + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 122, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L122" + } + ], "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 362, - "name": "formatErrorToString", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/error-handler.ts", - "line": 12, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/error-handler.ts#L12" - } - ], - "signatures": [ - { - "id": 363, - "name": "formatErrorToString", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Formats an error object into a string representation." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The formatted error message." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "lib/error-handler.ts", - "line": 12, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/error-handler.ts#L12" - } - ], - "parameters": [ - { - "id": 364, - "name": "error", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The error to format. It can be an " - }, - { - "kind": "code", - "text": "`Error`" - }, - { - "kind": "text", - "text": " instance, a string, or another object." - } - ] + "type": "literal", + "value": "application/ld+json" }, - "type": { - "type": "intrinsic", - "name": "unknown" - } + "defaultValue": "'application/ld+json'" }, { - "id": 365, - "name": "defaultErrorString", - "variant": "param", - "kind": 32768, + "id": 487, + "name": "KT", + "variant": "declaration", + "kind": 1024, "flags": { - "isOptional": true - }, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The default error message if the error cannot be formatted." - } - ] + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 148, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L148" + } + ], "type": { - "type": "intrinsic", - "name": "string" + "type": "literal", + "value": "text/plain" }, - "defaultValue": "''" + "defaultValue": "'text/plain'" }, { - "id": 366, - "name": "opts", - "variant": "param", - "kind": 32768, + "id": 466, + "name": "M3U8", + "variant": "declaration", + "kind": 1024, "flags": { - "isOptional": true + "isReadonly": true }, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Additional options." - } - ] - }, - "type": { - "type": "reflection", - "declaration": { - "id": 367, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "children": [ - { - "id": 368, - "name": "errorLimit", - "variant": "declaration", - "kind": 1024, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The maximum number of stack trace lines to include." - } - ] - }, - "sources": [ - { - "fileName": "lib/error-handler.ts", - "line": 16, - "character": 4, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/error-handler.ts#L16" - } - ], - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "8" - } - ], - "groups": [ - { - "title": "Properties", - "children": [ - 368 - ] - } - ], - "sources": [ - { - "fileName": "lib/error-handler.ts", - "line": 15, - "character": 9, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/error-handler.ts#L15" - } - ] + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 127, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L127" } + ], + "type": { + "type": "literal", + "value": "application/vnd.apple.mpegurl" }, - "defaultValue": "..." - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 1, - "name": "getCurrentTimeISOString", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/date.ts", - "line": 25, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/date.ts#L25" - } - ], - "signatures": [ - { - "id": 2, - "name": "getCurrentTimeISOString", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Returns the current time in ISO string format." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The current time in ISO string format." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "lib/date.ts", - "line": 25, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/date.ts#L25" - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 127, - "name": "hasOwn", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 137, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L137" - } - ], - "signatures": [ - { - "id": 128, - "name": "hasOwn", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Checks if the given object has its own property." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "Returns true if the object has its own property, otherwise false." - } - ] - } - ] - }, - "sources": [ + "defaultValue": "'application/vnd.apple.mpegurl'" + }, { - "fileName": "lib/validate.ts", - "line": 137, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L137" - } - ], - "parameters": [ + "id": 423, + "name": "M4A", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 84, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L84" + } + ], + "type": { + "type": "literal", + "value": "audio/mp4" + }, + "defaultValue": "'audio/mp4'" + }, { - "id": 129, - "name": "obj", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The object to check." - } - ] + "id": 462, + "name": "MAP", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 123, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L123" + } + ], "type": { - "type": "intrinsic", - "name": "object" - } + "type": "literal", + "value": "application/json" + }, + "defaultValue": "'application/json'" }, { - "id": 130, - "name": "prop", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The property to check." - } - ] + "id": 431, + "name": "MKV", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 92, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L92" + } + ], "type": { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "PropertyKey" - }, - "name": "PropertyKey", - "package": "typescript" - } - } - ], - "type": { - "type": "intrinsic", - "name": "boolean" - } - } - ] - }, - { - "id": 369, - "name": "invokeWithErrorHandlingFactory", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/error-handler.ts", - "line": 51, - "character": 13, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/error-handler.ts#L51" - } - ], - "signatures": [ - { - "id": 370, - "name": "invokeWithErrorHandlingFactory", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Creates a function factory with error handling capabilities" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "Returns a new function that can execute target functions with automatic error handling" - } - ] + "type": "literal", + "value": "video/x-matroska" }, - { - "tag": "@example", - "content": [ - { - "kind": "code", - "text": "```ts\nconst errorHandler = (error) => console.error(error);\nconst safeExecute = invokeWithErrorHandlingFactory(errorHandler);\n\n// Execute regular function\nsafeExecute(() => { throw new Error('test') });\n\n// Execute async function\nsafeExecute(async () => { throw new Error('async test') });\n```" - } - ] - } - ] - }, - "sources": [ - { - "fileName": "lib/error-handler.ts", - "line": 51, - "character": 46, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/error-handler.ts#L51" - } - ], - "parameters": [ + "defaultValue": "'video/x-matroska'" + }, { - "id": 371, - "name": "handleError", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Error handling function to process exceptions during execution" - } - ] + "id": 427, + "name": "MOV", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 88, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L88" + } + ], "type": { - "type": "reference", - "target": { - "sourceFileName": "dist/types/typings/helper.d.ts", - "qualifiedName": "Fn" - }, - "name": "Fn", - "package": "@cc-heart/utils" - } - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 372, - "name": "__type", + "type": "literal", + "value": "video/quicktime" + }, + "defaultValue": "'video/quicktime'" + }, + { + "id": 420, + "name": "MP3", "variant": "declaration", - "kind": 65536, - "flags": {}, + "kind": 1024, + "flags": { + "isReadonly": true + }, "sources": [ { - "fileName": "lib/error-handler.ts", - "line": 52, - "character": 9, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/error-handler.ts#L52" + "fileName": "lib/const/http.ts", + "line": 81, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L81" } ], - "signatures": [ + "type": { + "type": "literal", + "value": "audio/mpeg" + }, + "defaultValue": "'audio/mpeg'" + }, + { + "id": 425, + "name": "MP4", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ { - "id": 373, - "name": "__type", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "lib/error-handler.ts", - "line": 52, - "character": 9, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/error-handler.ts#L52" - } - ], - "parameters": [ - { - "id": 374, - "name": "handler", - "variant": "param", - "kind": 32768, - "flags": {}, - "type": { - "type": "reference", - "target": { - "sourceFileName": "dist/types/typings/helper.d.ts", - "qualifiedName": "Fn" - }, - "name": "Fn", - "package": "@cc-heart/utils" - } - }, - { - "id": 375, - "name": "context", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "type": { - "type": "intrinsic", - "name": "unknown" - } - }, - { - "id": 376, - "name": "args", - "variant": "param", - "kind": 32768, - "flags": { - "isOptional": true - }, - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "unknown" - } - } - } - ], - "type": { - "type": "intrinsic", - "name": "any" - } + "fileName": "lib/const/http.ts", + "line": 86, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L86" } - ] - } - } - } - ] - }, - { - "id": 103, - "name": "isBool", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 49, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L49" - } - ], - "signatures": [ - { - "id": 104, - "name": "isBool", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Checks if the provided value is a boolean." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "Returns true if the value is a boolean, false otherwise." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 49, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L49" - } - ], - "parameters": [ + ], + "type": { + "type": "literal", + "value": "video/mp4" + }, + "defaultValue": "'video/mp4'" + }, { - "id": 105, - "name": "val", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The value to check." - } - ] + "id": 465, + "name": "MPD", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 126, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L126" + } + ], "type": { - "type": "intrinsic", - "name": "unknown" - } - } - ], - "type": { - "type": "predicate", - "name": "val", - "asserts": false, - "targetType": { - "type": "intrinsic", - "name": "boolean" - } - } - } - ] - }, - { - "id": 121, - "name": "isEffectiveNumber", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 110, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L110" - } - ], - "signatures": [ - { - "id": 122, - "name": "isEffectiveNumber", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "determines if it is a valid value other than NaN" - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [] - } - ] - }, - "sources": [ + "type": "literal", + "value": "application/dash+xml" + }, + "defaultValue": "'application/dash+xml'" + }, { - "fileName": "lib/validate.ts", - "line": 110, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L110" - } - ], - "parameters": [ + "id": 473, + "name": "MSG", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 134, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L134" + } + ], + "type": { + "type": "literal", + "value": "application/vnd.ms-outlook" + }, + "defaultValue": "'application/vnd.ms-outlook'" + }, { - "id": 123, - "name": "val", - "variant": "param", - "kind": 32768, - "flags": {}, + "id": 454, + "name": "MSI", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 115, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L115" + } + ], "type": { - "type": "intrinsic", - "name": "unknown" - } - } - ], - "type": { - "type": "predicate", - "name": "val", - "asserts": false, - "targetType": { - "type": "intrinsic", - "name": "number" - } - } - } - ] - }, - { - "id": 115, - "name": "isFalsy", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 91, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L91" - } - ], - "signatures": [ - { - "id": 116, - "name": "isFalsy", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Checks if a value is falsy." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "Returns true if the value is falsy, otherwise false." - } - ] - } - ] - }, - "sources": [ + "type": "literal", + "value": "application/x-msdownload" + }, + "defaultValue": "'application/x-msdownload'" + }, { - "fileName": "lib/validate.ts", - "line": 91, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L91" - } - ], - "parameters": [ + "id": 476, + "name": "OBJ", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 137, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L137" + } + ], + "type": { + "type": "literal", + "value": "application/octet-stream" + }, + "defaultValue": "'application/octet-stream'" + }, { - "id": 117, - "name": "val", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The value to check." - } - ] + "id": 422, + "name": "OGG", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 83, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L83" + } + ], "type": { - "type": "intrinsic", - "name": "unknown" - } - } - ], - "type": { - "type": "predicate", - "name": "val", - "asserts": false, - "targetType": { - "type": "literal", - "value": false - } - } - } - ] - }, - { - "id": 97, - "name": "isFn", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 29, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L29" - } - ], - "signatures": [ - { - "id": 98, - "name": "isFn", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Checks if the given value is a function." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "Returns true if the value is a function, false otherwise." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 29, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L29" - } - ], - "parameters": [ + "type": "literal", + "value": "audio/ogg" + }, + "defaultValue": "'audio/ogg'" + }, { - "id": 99, - "name": "val", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The value to be checked." - } - ] + "id": 459, + "name": "OTF", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 120, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L120" + } + ], "type": { - "type": "intrinsic", - "name": "unknown" - } - } - ], - "type": { - "type": "predicate", - "name": "val", - "asserts": false, - "targetType": { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Function" + "type": "literal", + "value": "font/otf" }, - "name": "Function", - "package": "typescript" - } - } - } - ] - }, - { - "id": 142, - "name": "isNil", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 73, - "character": 13, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L73" - } - ], - "signatures": [ - { - "id": 143, - "name": "isNil", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Checks if the given value is null." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "Returns true if the value is null, false otherwise." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 73, - "character": 13, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L73" - } - ], - "parameters": [ + "defaultValue": "'font/otf'" + }, { - "id": 144, - "name": "val", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The value to check." - } - ] + "id": 438, + "name": "PDF", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 99, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L99" + } + ], "type": { - "type": "intrinsic", - "name": "unknown" - } - } - ], - "type": { - "type": "predicate", - "name": "val", - "asserts": false, - "targetType": { - "type": "literal", - "value": null - } - } - } - ] - }, - { - "id": 109, - "name": "isNull", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 69, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L69" - } - ], - "signatures": [ - { - "id": 110, - "name": "isNull", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Checks if the given value is null." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "Returns true if the value is null, false otherwise." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 69, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L69" - } - ], - "parameters": [ + "type": "literal", + "value": "application/pdf" + }, + "defaultValue": "'application/pdf'" + }, { - "id": 111, - "name": "val", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The value to check." - } - ] + "id": 485, + "name": "PHP", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 146, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L146" + } + ], "type": { - "type": "intrinsic", - "name": "unknown" - } - } - ], - "type": { - "type": "predicate", - "name": "val", - "asserts": false, - "targetType": { - "type": "literal", - "value": null - } - } - } - ] - }, - { - "id": 118, - "name": "isNumber", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 101, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L101" - } - ], - "signatures": [ - { - "id": 119, - "name": "isNumber", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Checks if the given value is a number." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "Returns true if the value is a number, false otherwise." - } - ] - } - ] - }, - "sources": [ + "type": "literal", + "value": "application/x-httpd-php" + }, + "defaultValue": "'application/x-httpd-php'" + }, { - "fileName": "lib/validate.ts", - "line": 101, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L101" - } - ], - "parameters": [ + "id": 412, + "name": "PNG", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 73, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L73" + } + ], + "type": { + "type": "literal", + "value": "image/png" + }, + "defaultValue": "'image/png'" + }, { - "id": 120, - "name": "val", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The value to be checked." - } - ] + "id": 448, + "name": "POT", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 109, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L109" + } + ], "type": { - "type": "intrinsic", - "name": "unknown" - } - } - ], - "type": { - "type": "predicate", - "name": "val", - "asserts": false, - "targetType": { - "type": "intrinsic", - "name": "number" - } - } - } - ] - }, - { - "id": 91, - "name": "isObject", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 9, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L9" - } - ], - "signatures": [ - { - "id": 92, - "name": "isObject", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Checks if the given value is an object." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "Returns true if the value is an object, otherwise false." - } - ] - } - ] - }, - "sources": [ + "type": "literal", + "value": "application/vnd.ms-powerpoint" + }, + "defaultValue": "'application/vnd.ms-powerpoint'" + }, { - "fileName": "lib/validate.ts", - "line": 9, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L9" - } - ], - "parameters": [ + "id": 450, + "name": "POTX", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 111, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L111" + } + ], + "type": { + "type": "literal", + "value": "application/vnd.openxmlformats-officedocument.presentationml.template" + }, + "defaultValue": "'application/vnd.openxmlformats-officedocument.presentationml.template'" + }, { - "id": 93, - "name": "val", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The value to be checked." - } - ] + "id": 451, + "name": "PPSX", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 112, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L112" + } + ], "type": { - "type": "intrinsic", - "name": "unknown" - } - } - ], - "type": { - "type": "predicate", - "name": "val", - "asserts": false, - "targetType": { - "type": "intrinsic", - "name": "object" - } - } - } - ] - }, - { - "id": 112, - "name": "isPrimitive", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 81, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L81" - } - ], - "signatures": [ - { - "id": 113, - "name": "isPrimitive", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Determines whether a value is a primitive." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "Returns " - }, - { - "kind": "code", - "text": "`true`" - }, - { - "kind": "text", - "text": " if the value is a primitive, " - }, - { - "kind": "code", - "text": "`false`" - }, - { - "kind": "text", - "text": " otherwise." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 81, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L81" - } - ], - "parameters": [ + "type": "literal", + "value": "application/vnd.openxmlformats-officedocument.presentationml.slideshow" + }, + "defaultValue": "'application/vnd.openxmlformats-officedocument.presentationml.slideshow'" + }, { - "id": 114, - "name": "val", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The value to check." - } - ] + "id": 447, + "name": "PPT", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 108, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L108" + } + ], "type": { - "type": "intrinsic", - "name": "unknown" - } - } - ], - "type": { - "type": "intrinsic", - "name": "boolean" - } - } - ] - }, - { - "id": 124, - "name": "isPromise", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 121, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L121" - } - ], - "signatures": [ - { - "id": 125, - "name": "isPromise", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Checks if a value is a Promise." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "Returns " - }, - { - "kind": "code", - "text": "`true`" - }, - { - "kind": "text", - "text": " if the value is a Promise, else " - }, - { - "kind": "code", - "text": "`false`" - }, - { - "kind": "text", - "text": "." - } - ] - } - ] - }, - "sources": [ + "type": "literal", + "value": "application/vnd.ms-powerpoint" + }, + "defaultValue": "'application/vnd.ms-powerpoint'" + }, { - "fileName": "lib/validate.ts", - "line": 121, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L121" - } - ], - "parameters": [ + "id": 449, + "name": "PPTX", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 110, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L110" + } + ], + "type": { + "type": "literal", + "value": "application/vnd.openxmlformats-officedocument.presentationml.presentation" + }, + "defaultValue": "'application/vnd.openxmlformats-officedocument.presentationml.presentation'" + }, { - "id": 126, - "name": "val", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The value to check." - } - ] + "id": 478, + "name": "PY", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 139, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L139" + } + ], "type": { - "type": "intrinsic", - "name": "unknown" - } - } - ], - "type": { - "type": "predicate", - "name": "val", - "asserts": false, - "targetType": { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" + "type": "literal", + "value": "text/x-python" }, - "typeArguments": [ + "defaultValue": "'text/x-python'" + }, + { + "id": 433, + "name": "RAR", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ { - "type": "intrinsic", - "name": "unknown" + "fileName": "lib/const/http.ts", + "line": 94, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L94" } ], - "name": "Promise", - "package": "typescript" - } - } - } - ] - }, - { - "id": 134, - "name": "isPropertyKey", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 159, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L159" - } - ], - "signatures": [ - { - "id": 135, - "name": "isPropertyKey", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Checks if a given value is a valid PropertyKey.\nA PropertyKey is a string, number, or symbol that can be used as a property name." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "True if the value is a PropertyKey, false otherwise." - } - ] - } - ] - }, - "sources": [ + "type": { + "type": "literal", + "value": "application/vnd.rar" + }, + "defaultValue": "'application/vnd.rar'" + }, { - "fileName": "lib/validate.ts", - "line": 159, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L159" - } - ], - "parameters": [ - { - "id": 136, - "name": "val", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The value to check." - } - ] + "id": 483, + "name": "RB", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 144, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L144" + } + ], "type": { - "type": "intrinsic", - "name": "unknown" - } - } - ], - "type": { - "type": "predicate", - "name": "val", - "asserts": false, - "targetType": { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "PropertyKey" + "type": "literal", + "value": "application/x-ruby" }, - "name": "PropertyKey", - "package": "typescript" - } - } - } - ] - }, - { - "id": 100, - "name": "isStr", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 39, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L39" - } - ], - "signatures": [ - { - "id": 101, - "name": "isStr", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Checks if the given value is a string." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "Returns true if the value is a string, false otherwise." - } - ] - } - ] - }, - "sources": [ + "defaultValue": "'application/x-ruby'" + }, { - "fileName": "lib/validate.ts", - "line": 39, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L39" - } - ], - "parameters": [ + "id": 488, + "name": "RTF", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 149, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L149" + } + ], + "type": { + "type": "literal", + "value": "application/rtf" + }, + "defaultValue": "'application/rtf'" + }, { - "id": 102, - "name": "val", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The value to be checked." - } - ] + "id": 477, + "name": "STL", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 138, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L138" + } + ], "type": { - "type": "intrinsic", - "name": "unknown" - } - } - ], - "type": { - "type": "predicate", - "name": "val", - "asserts": false, - "targetType": { - "type": "intrinsic", - "name": "string" - } - } - } - ] - }, - { - "id": 94, - "name": "isSymbol", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 20, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L20" - } - ], - "signatures": [ - { - "id": 95, - "name": "isSymbol", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Checks if the given value is an symbol." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "Returns true if the value is an object, otherwise false." - } - ] - } - ] - }, - "sources": [ + "type": "literal", + "value": "application/sla" + }, + "defaultValue": "'application/sla'" + }, { - "fileName": "lib/validate.ts", - "line": 20, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L20" - } - ], - "parameters": [ + "id": 418, + "name": "SVG", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 79, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L79" + } + ], + "type": { + "type": "literal", + "value": "image/svg+xml" + }, + "defaultValue": "'image/svg+xml'" + }, { - "id": 96, - "name": "val", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The value to be checked." - } - ] + "id": 468, + "name": "SWF", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 129, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L129" + } + ], "type": { - "type": "intrinsic", - "name": "unknown" - } - } - ], - "type": { - "type": "predicate", - "name": "val", - "asserts": false, - "targetType": { - "type": "intrinsic", - "name": "symbol" - } - } - } - ] - }, - { - "id": 106, - "name": "isUndef", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 59, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L59" - } - ], - "signatures": [ - { - "id": 107, - "name": "isUndef", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Checks if a value is undefined." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "Returns true if the value is undefined, otherwise false." - } - ] - } - ] - }, - "sources": [ + "type": "literal", + "value": "application/x-shockwave-flash" + }, + "defaultValue": "'application/x-shockwave-flash'" + }, { - "fileName": "lib/validate.ts", - "line": 59, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L59" - } - ], - "parameters": [ + "id": 486, + "name": "SWIFT", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 147, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L147" + } + ], + "type": { + "type": "literal", + "value": "text/x-swift" + }, + "defaultValue": "'text/x-swift'" + }, { - "id": 108, - "name": "val", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The value to check." - } - ] + "id": 435, + "name": "TAR", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 96, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L96" + } + ], "type": { - "type": "intrinsic", - "name": "unknown" - } - } - ], - "type": { - "type": "predicate", - "name": "val", - "asserts": false, - "targetType": { - "type": "intrinsic", - "name": "undefined" - } - } - } - ] - }, - { - "id": 131, - "name": "isValidArray", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 147, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L147" - } - ], - "signatures": [ - { - "id": 132, - "name": "isValidArray", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "An array is considered valid if it is an array and its length is greater than or equal to 0." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "Returns true if the array is valid, false otherwise." - } - ] - } - ] - }, - "sources": [ + "type": "literal", + "value": "application/x-tar" + }, + "defaultValue": "'application/x-tar'" + }, { - "fileName": "lib/validate.ts", - "line": 147, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L147" - } - ], - "parameters": [ + "id": 467, + "name": "TORRENT", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 128, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L128" + } + ], + "type": { + "type": "literal", + "value": "application/x-bittorrent" + }, + "defaultValue": "'application/x-bittorrent'" + }, { - "id": 133, - "name": "arr", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The array to be checked." - } - ] + "id": 464, + "name": "TS", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 125, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L125" + } + ], "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "unknown" + "type": "literal", + "value": "video/mp2t" + }, + "defaultValue": "'video/mp2t'" + }, + { + "id": 458, + "name": "TTF", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 119, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L119" } - } - } - ], - "type": { - "type": "intrinsic", - "name": "boolean" - } - } - ] - }, - { - "id": 137, - "name": "isValidDate", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/validate.ts", - "line": 170, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L170" - } - ], - "signatures": [ - { - "id": 138, - "name": "isValidDate", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Checks if a given date is valid." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "True if the date is valid, false otherwise." - } - ] - } - ] - }, - "sources": [ + ], + "type": { + "type": "literal", + "value": "font/ttf" + }, + "defaultValue": "'font/ttf'" + }, { - "fileName": "lib/validate.ts", - "line": 170, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/validate.ts#L170" - } - ], - "parameters": [ + "id": 404, + "name": "TXT", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 65, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L65" + } + ], + "type": { + "type": "literal", + "value": "text/plain" + }, + "defaultValue": "'text/plain'" + }, { - "id": 139, - "name": "date", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The date to check." - } - ] + "id": 463, + "name": "WASM", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 124, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L124" + } + ], "type": { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Date" - }, - "name": "Date", - "package": "typescript" - } - } - ], - "type": { - "type": "intrinsic", - "name": "boolean" - } - } - ] - }, - { - "id": 54, - "name": "mulSplit", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/string.ts", - "line": 26, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/string.ts#L26" - } - ], - "signatures": [ - { - "id": 55, - "name": "mulSplit", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [], - "blockTags": [ - { - "tag": "@description", - "content": [ - { - "kind": "text", - "text": "Add the number of cuts based on the original split and return all subsets after the cut" - } - ] + "type": "literal", + "value": "application/wasm" }, - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "a new split array, length is num + 1" - } - ] - } - ] - }, - "sources": [ + "defaultValue": "'application/wasm'" + }, { - "fileName": "lib/string.ts", - "line": 26, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/string.ts#L26" - } - ], - "parameters": [ + "id": 421, + "name": "WAV", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 82, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L82" + } + ], + "type": { + "type": "literal", + "value": "audio/wav" + }, + "defaultValue": "'audio/wav'" + }, { - "id": 56, - "name": "str", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "need to split of primitive string" - } - ] + "id": 430, + "name": "WEBM", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 91, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L91" + } + ], "type": { - "type": "intrinsic", - "name": "string" - } + "type": "literal", + "value": "video/webm" + }, + "defaultValue": "'video/webm'" }, { - "id": 57, - "name": "splitStr", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "split params" - } - ] + "id": 417, + "name": "WEBP", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 78, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L78" + } + ], "type": { - "type": "intrinsic", - "name": "string" - } + "type": "literal", + "value": "image/webp" + }, + "defaultValue": "'image/webp'" }, { - "id": 58, - "name": "num", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "split limit" - } - ] + "id": 428, + "name": "WMV", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 89, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L89" + } + ], "type": { - "type": "intrinsic", - "name": "number" + "type": "literal", + "value": "video/x-ms-wmv" }, - "defaultValue": "-1" - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" + "defaultValue": "'video/x-ms-wmv'" + }, + { + "id": 456, + "name": "WOFF", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 117, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L117" + } + ], + "type": { + "type": "literal", + "value": "font/woff" + }, + "defaultValue": "'font/woff'" + }, + { + "id": 457, + "name": "WOFF2", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 118, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L118" + } + ], + "type": { + "type": "literal", + "value": "font/woff2" + }, + "defaultValue": "'font/woff2'" + }, + { + "id": 443, + "name": "XLS", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 104, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L104" + } + ], + "type": { + "type": "literal", + "value": "application/vnd.ms-excel" + }, + "defaultValue": "'application/vnd.ms-excel'" + }, + { + "id": 446, + "name": "XLSM", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 107, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L107" + } + ], + "type": { + "type": "literal", + "value": "application/vnd.ms-excel.sheet.macroEnabled.12" + }, + "defaultValue": "'application/vnd.ms-excel.sheet.macroEnabled.12'" + }, + { + "id": 445, + "name": "XLSX", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 106, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L106" + } + ], + "type": { + "type": "literal", + "value": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" + }, + "defaultValue": "'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'" + }, + { + "id": 444, + "name": "XLT", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 105, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L105" + } + ], + "type": { + "type": "literal", + "value": "application/vnd.ms-excel" + }, + "defaultValue": "'application/vnd.ms-excel'" + }, + { + "id": 409, + "name": "XML", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 70, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L70" + } + ], + "type": { + "type": "literal", + "value": "application/xml" + }, + "defaultValue": "'application/xml'" + }, + { + "id": 432, + "name": "ZIP", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 93, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L93" + } + ], + "type": { + "type": "literal", + "value": "application/zip" + }, + "defaultValue": "'application/zip'" } - } - } - ] - }, - { - "id": 49, - "name": "noop", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/shard.ts", - "line": 6, - "character": 13, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/shard.ts#L6" - } - ], - "signatures": [ - { - "id": 50, - "name": "noop", - "variant": "signature", - "kind": 4096, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "This function does nothing." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "No return value." - } - ] - } - ] - }, - "sources": [ + ], + "groups": [ { - "fileName": "lib/shard.ts", - "line": 6, - "character": 20, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/shard.ts#L6" + "title": "Properties", + "children": [ + 434, + 490, + 489, + 470, + 426, + 455, + 416, + 437, + 480, + 481, + 482, + 407, + 408, + 453, + 471, + 439, + 441, + 440, + 442, + 474, + 475, + 472, + 460, + 469, + 452, + 424, + 429, + 415, + 484, + 436, + 406, + 405, + 419, + 479, + 411, + 414, + 413, + 410, + 461, + 487, + 466, + 423, + 462, + 431, + 427, + 420, + 425, + 465, + 473, + 454, + 476, + 422, + 459, + 438, + 485, + 412, + 448, + 450, + 451, + 447, + 449, + 478, + 433, + 483, + 488, + 477, + 418, + 468, + 486, + 435, + 467, + 464, + 458, + 404, + 463, + 421, + 430, + 417, + 428, + 456, + 457, + 443, + 446, + 445, + 444, + 409, + 432 + ] } ], - "type": { - "type": "intrinsic", - "name": "void" - } + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 64, + "character": 26, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L64" + } + ] } - ] + }, + "defaultValue": "..." }, { - "id": 80, - "name": "objectToQueryString", + "id": 391, + "name": "REQUEST_METHOD", "variant": "declaration", - "kind": 64, - "flags": {}, + "kind": 32, + "flags": { + "isConst": true + }, "sources": [ { - "fileName": "lib/url.ts", - "line": 102, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/url.ts#L102" + "fileName": "lib/const/http.ts", + "line": 52, + "character": 13, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L52" } ], - "signatures": [ - { - "id": 81, - "name": "objectToQueryString", - "variant": "signature", - "kind": 4096, + "type": { + "type": "reflection", + "declaration": { + "id": 392, + "name": "__type", + "variant": "declaration", + "kind": 65536, "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "Converts an object to a query string." - } - ], - "blockTags": [ - { - "tag": "@returns", - "content": [ - { - "kind": "text", - "text": "The query string representation of " - }, - { - "kind": "code", - "text": "`data`" - }, - { - "kind": "text", - "text": "." - } - ] - } - ] - }, - "sources": [ - { - "fileName": "lib/url.ts", - "line": 102, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/url.ts#L102" - } - ], - "typeParameter": [ + "children": [ { - "id": 82, - "name": "T", - "variant": "typeParam", - "kind": 131072, - "flags": {}, + "id": 398, + "name": "ALL", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 58, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L58" + } + ], "type": { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Record" - }, - "typeArguments": [ - { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "PropertyKey" - }, - "name": "PropertyKey", - "package": "typescript" - }, - { - "type": "intrinsic", - "name": "any" - } - ], - "name": "Record", - "package": "typescript" - } - } - ], - "parameters": [ + "type": "literal", + "value": "ALL" + }, + "defaultValue": "'ALL'" + }, { - "id": 83, - "name": "input", - "variant": "param", - "kind": 32768, - "flags": {}, + "id": 396, + "name": "DELETE", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 56, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L56" + } + ], "type": { - "type": "reference", - "target": 82, - "name": "T", - "package": "@cc-heart/utils", - "refersToTypeParameter": true - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] - }, - { - "id": 70, - "name": "parseKey", - "variant": "declaration", - "kind": 64, - "flags": {}, - "sources": [ - { - "fileName": "lib/url.ts", - "line": 4, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/url.ts#L4" - } - ], - "signatures": [ - { - "id": 71, - "name": "parseKey", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ + "type": "literal", + "value": "DELETE" + }, + "defaultValue": "'DELETE'" + }, { - "fileName": "lib/url.ts", - "line": 4, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/url.ts#L4" - } - ], - "parameters": [ + "id": 393, + "name": "GET", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 53, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L53" + } + ], + "type": { + "type": "literal", + "value": "GET" + }, + "defaultValue": "'GET'" + }, { - "id": 72, - "name": "obj", - "variant": "param", - "kind": 32768, - "flags": {}, + "id": 400, + "name": "HEAD", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 60, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L60" + } + ], "type": { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Record" - }, - "typeArguments": [ - { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "PropertyKey" - }, - "name": "PropertyKey", - "package": "typescript" - }, - { - "type": "intrinsic", - "name": "any" - } - ], - "name": "Record", - "package": "typescript" - } + "type": "literal", + "value": "HEAD" + }, + "defaultValue": "'HEAD'" }, { - "id": 73, - "name": "key", - "variant": "param", - "kind": 32768, - "flags": {}, + "id": 399, + "name": "OPTIONS", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 59, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L59" + } + ], "type": { - "type": "intrinsic", - "name": "string" - } + "type": "literal", + "value": "OPTIONS" + }, + "defaultValue": "'OPTIONS'" }, { - "id": 74, - "name": "value", - "variant": "param", - "kind": 32768, - "flags": {}, + "id": 397, + "name": "PATCH", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 57, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L57" + } + ], "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] + "type": "literal", + "value": "PATCH" + }, + "defaultValue": "'PATCH'" + }, + { + "id": 394, + "name": "POST", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 54, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L54" + } + ], + "type": { + "type": "literal", + "value": "POST" + }, + "defaultValue": "'POST'" + }, + { + "id": 395, + "name": "PUT", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 55, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L55" + } + ], + "type": { + "type": "literal", + "value": "PUT" + }, + "defaultValue": "'PUT'" + }, + { + "id": 401, + "name": "SEARCH", + "variant": "declaration", + "kind": 1024, + "flags": { + "isReadonly": true + }, + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 61, + "character": 2, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L61" + } + ], + "type": { + "type": "literal", + "value": "SEARCH" + }, + "defaultValue": "'SEARCH'" + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 398, + 396, + 393, + 400, + 399, + 397, + 394, + 395, + 401 + ] + } + ], + "sources": [ + { + "fileName": "lib/const/http.ts", + "line": 52, + "character": 30, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/const/http.ts#L52" + } + ] + } + }, + "defaultValue": "..." }, { - "id": 155, - "name": "pipe", + "id": 298, + "name": "_toString", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 1, + "character": 13, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L1" + } + ], + "signatures": [ + { + "id": 299, + "name": "_toString", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Returns a string representation of an object." + } + ] + }, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 1, + "character": 13, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L1" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ] + }, + { + "id": 337, + "name": "awaitTo", "variant": "declaration", "kind": 64, "flags": {}, "sources": [ { "fileName": "lib/workers.ts", - "line": 70, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L70" + "line": 138, + "character": 13, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L138" } ], "signatures": [ { - "id": 156, - "name": "pipe", + "id": 338, + "name": "awaitTo", "variant": "signature", "kind": 4096, "flags": {}, @@ -8250,7 +7513,7 @@ "summary": [ { "kind": "text", - "text": "Takes a series of functions and returns a new function that runs these functions in sequence.\nIf a function returns a Promise, the next function is called with the resolved value." + "text": "A helper function that wraps a Promise and returns a tuple of [error, data].\nIf the Promise resolves successfully, the first element of the tuple will be null, and the second element will be the resolved value.\nIf the Promise is rejected, the first element of the tuple will be the error, and the second element will be undefined." } ], "blockTags": [ @@ -8259,15 +7522,7 @@ "content": [ { "kind": "text", - "text": "A new function that takes any number of arguments and pipes them through " - }, - { - "kind": "code", - "text": "`fns`" - }, - { - "kind": "text", - "text": "." + "text": "A Promise that resolves to a tuple of [error, data]." } ] } @@ -8276,120 +7531,112 @@ "sources": [ { "fileName": "lib/workers.ts", - "line": 70, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L70" + "line": 138, + "character": 23, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L138" + } + ], + "typeParameter": [ + { + "id": 339, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {} } ], "parameters": [ { - "id": 157, - "name": "fns", + "id": 340, + "name": "promise", "variant": "param", "kind": 32768, - "flags": { - "isRest": true - }, + "flags": {}, "comment": { "summary": [ { "kind": "text", - "text": "The functions to pipe." + "text": "The Promise to wrap." } ] }, "type": { - "type": "array", - "elementType": { - "type": "reference", - "target": { - "sourceFileName": "typings/helper.ts", - "qualifiedName": "Fn" - }, - "name": "Fn", - "package": "@cc-heart/utils" - } + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Promise" + }, + "typeArguments": [ + { + "type": "reference", + "target": 339, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + ], + "name": "Promise", + "package": "typescript" } } ], "type": { - "type": "reflection", - "declaration": { - "id": 158, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "sources": [ - { - "fileName": "lib/workers.ts", - "line": 71, - "character": 9, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L71" - } - ], - "signatures": [ - { - "id": 159, - "name": "__type", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ - { - "fileName": "lib/workers.ts", - "line": 71, - "character": 9, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L71" - } - ], - "parameters": [ - { - "id": 160, - "name": "args", - "variant": "param", - "kind": 32768, - "flags": { - "isRest": true + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Promise" + }, + "typeArguments": [ + { + "type": "tuple", + "elements": [ + { + "type": "intrinsic", + "name": "unknown" + }, + { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "undefined" }, - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "any" - } + { + "type": "reference", + "target": 339, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true } - } - ], - "type": { - "type": "intrinsic", - "name": "any" + ] } - } - ] - } + ] + } + ], + "name": "Promise", + "package": "typescript" } } ] }, { - "id": 75, - "name": "queryStringToObject", + "id": 242, + "name": "basename", "variant": "declaration", "kind": 64, "flags": {}, "sources": [ { "fileName": "lib/url.ts", - "line": 56, + "line": 139, "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/url.ts#L56" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/url.ts#L139" } ], "signatures": [ { - "id": 76, - "name": "queryStringToObject", + "id": 243, + "name": "basename", "variant": "signature", "kind": 4096, "flags": {}, @@ -8397,51 +7644,16 @@ "summary": [ { "kind": "text", - "text": "Converts a query string to an object." + "text": "Returns the last portion of a path, similar to the Unix basename command.\nTrims the query string if it exists.\nOptionally, removes a suffix from the result." } ], "blockTags": [ - { - "tag": "@example", - "content": [ - { - "kind": "code", - "text": "```ts\n`queryStringToObject('foo=1&bar=2&baz=3')`\n```" - } - ] - }, - { - "tag": "@example", - "content": [ - { - "kind": "code", - "text": "```ts\n`queryStringToObject('foo=&bar=2&baz=3')`\n```" - } - ] - }, - { - "tag": "@example", - "content": [ - { - "kind": "code", - "text": "```ts\n`queryStringToObject('foo[0]=1&foo[1]=2&baz=3')`\n```" - } - ] - }, { "tag": "@returns", "content": [ { "kind": "text", - "text": "The object representation of the query string in " - }, - { - "kind": "code", - "text": "`url`" - }, - { - "kind": "text", - "text": "." + "text": "The basename of the path." } ] } @@ -8450,23 +7662,23 @@ "sources": [ { "fileName": "lib/url.ts", - "line": 56, + "line": 139, "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/url.ts#L56" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/url.ts#L139" } ], - "typeParameter": [ + "parameters": [ { - "id": 77, - "name": "T", - "variant": "typeParam", - "kind": 131072, + "id": 244, + "name": "path", + "variant": "param", + "kind": 32768, "flags": {}, "comment": { "summary": [ { "kind": "text", - "text": "The type of the URL string." + "text": "The path to get the basename from." } ] }, @@ -8476,115 +7688,52 @@ } }, { - "id": 78, - "name": "U", - "variant": "typeParam", - "kind": 131072, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The type of the object to return." - } - ] - }, - "type": { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Record" - }, - "typeArguments": [ - { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "PropertyKey" - }, - "name": "PropertyKey", - "package": "typescript" - }, - { - "type": "intrinsic", - "name": "any" - } - ], - "name": "Record", - "package": "typescript" - }, - "default": { - "type": "reference", - "target": { - "sourceFileName": "typings/url.ts", - "qualifiedName": "QueryStringToObject" - }, - "typeArguments": [ - { - "type": "reference", - "target": 77, - "name": "T", - "package": "@cc-heart/utils", - "refersToTypeParameter": true - } - ], - "name": "QueryStringToObject", - "package": "@cc-heart/utils" - } - } - ], - "parameters": [ - { - "id": 79, - "name": "url", + "id": 245, + "name": "suffix", "variant": "param", "kind": 32768, - "flags": {}, + "flags": { + "isOptional": true + }, "comment": { "summary": [ { "kind": "text", - "text": "The URL string to convert." + "text": "An optional suffix to remove from the basename." } ] }, "type": { - "type": "reference", - "target": 77, - "name": "T", - "package": "@cc-heart/utils", - "refersToTypeParameter": true + "type": "intrinsic", + "name": "string" } } ], "type": { - "type": "reference", - "target": 78, - "name": "U", - "package": "@cc-heart/utils", - "refersToTypeParameter": true + "type": "intrinsic", + "name": "string" } } ] }, { - "id": 45, - "name": "random", + "id": 217, + "name": "capitalize", "variant": "declaration", "kind": 64, "flags": {}, "sources": [ { - "fileName": "lib/random.ts", - "line": 8, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/random.ts#L8" + "fileName": "lib/string.ts", + "line": 7, + "character": 13, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/string.ts#L7" } ], "signatures": [ { - "id": 46, - "name": "random", + "id": 218, + "name": "capitalize", "variant": "signature", "kind": 4096, "flags": {}, @@ -8592,7 +7741,7 @@ "summary": [ { "kind": "text", - "text": "Generates a random integer between min (inclusive) and max (inclusive)." + "text": "Capitalizes the first letter of a string." } ], "blockTags": [ @@ -8601,7 +7750,7 @@ "content": [ { "kind": "text", - "text": "A random integer between min and max." + "text": "- The capitalized string." } ] } @@ -8609,35 +7758,29 @@ }, "sources": [ { - "fileName": "lib/random.ts", - "line": 8, - "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/random.ts#L8" + "fileName": "lib/string.ts", + "line": 7, + "character": 26, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/string.ts#L7" } ], - "parameters": [ + "typeParameter": [ { - "id": 47, - "name": "min", - "variant": "param", - "kind": 32768, + "id": 219, + "name": "T", + "variant": "typeParam", + "kind": 131072, "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The minimum value (inclusive)." - } - ] - }, "type": { "type": "intrinsic", - "name": "number" + "name": "string" } - }, + } + ], + "parameters": [ { - "id": 48, - "name": "max", + "id": 220, + "name": "target", "variant": "param", "kind": 32768, "flags": {}, @@ -8645,41 +7788,58 @@ "summary": [ { "kind": "text", - "text": "The maximum value (inclusive)." + "text": "The string to be capitalized." } ] }, "type": { - "type": "intrinsic", - "name": "number" + "type": "reference", + "target": 219, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true } } ], "type": { - "type": "intrinsic", - "name": "number" + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Capitalize" + }, + "typeArguments": [ + { + "type": "reference", + "target": 219, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + ], + "name": "Capitalize", + "package": "typescript" } } ] }, { - "id": 173, - "name": "setIntervalByTimeout", + "id": 319, + "name": "compose", "variant": "declaration", "kind": 64, "flags": {}, "sources": [ { "fileName": "lib/workers.ts", - "line": 128, - "character": 13, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L128" + "line": 91, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L91" } ], "signatures": [ { - "id": 174, - "name": "setIntervalByTimeout", + "id": 320, + "name": "compose", "variant": "signature", "kind": 4096, "flags": {}, @@ -8687,7 +7847,7 @@ "summary": [ { "kind": "text", - "text": "Executes a given function repeatedly at a specified interval using setTimeout and clearTimeout." + "text": "Takes a series of functions and returns a new function that runs these functions in reverse sequence.\nIf a function returns a Promise, the next function is called with the resolved value." } ], "blockTags": [ @@ -8696,7 +7856,15 @@ "content": [ { "kind": "text", - "text": "A function that, when called, clears the interval and stops the execution of the given function." + "text": "A new function that takes any number of arguments and composes them through " + }, + { + "kind": "code", + "text": "`fns`" + }, + { + "kind": "text", + "text": "." } ] } @@ -8705,60 +7873,46 @@ "sources": [ { "fileName": "lib/workers.ts", - "line": 128, - "character": 13, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L128" + "line": 91, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L91" } ], "parameters": [ { - "id": 175, - "name": "func", + "id": 321, + "name": "fns", "variant": "param", "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The function to be executed." - } - ] + "flags": { + "isRest": true }, - "type": { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Function" - }, - "name": "Function", - "package": "typescript" - } - }, - { - "id": 176, - "name": "delay", - "variant": "param", - "kind": 32768, - "flags": {}, "comment": { "summary": [ { "kind": "text", - "text": "The interval (in milliseconds) at which the function should be executed." + "text": "The functions to compose." } ] }, "type": { - "type": "intrinsic", - "name": "number" + "type": "array", + "elementType": { + "type": "reference", + "target": { + "sourceFileName": "typings/helper.ts", + "qualifiedName": "Fn" + }, + "name": "Fn", + "package": "@cc-heart/utils" + } } } ], "type": { "type": "reflection", "declaration": { - "id": 177, + "id": 322, "name": "__type", "variant": "declaration", "kind": 65536, @@ -8766,14 +7920,14 @@ "sources": [ { "fileName": "lib/workers.ts", - "line": 118, - "character": 24, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L118" + "line": 71, + "character": 9, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L71" } ], "signatures": [ { - "id": 178, + "id": 323, "name": "__type", "variant": "signature", "kind": 4096, @@ -8781,14 +7935,32 @@ "sources": [ { "fileName": "lib/workers.ts", - "line": 118, - "character": 24, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L118" + "line": 71, + "character": 9, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L71" + } + ], + "parameters": [ + { + "id": 324, + "name": "args", + "variant": "param", + "kind": 32768, + "flags": { + "isRest": true + }, + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "any" + } + } } ], "type": { "type": "intrinsic", - "name": "void" + "name": "any" } } ] @@ -8798,23 +7970,23 @@ ] }, { - "id": 167, - "name": "setintervalByTimeout", + "id": 239, + "name": "convertParamsRouterToRegExp", "variant": "declaration", "kind": 64, "flags": {}, "sources": [ { - "fileName": "lib/workers.ts", - "line": 102, + "fileName": "lib/url.ts", + "line": 123, "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L102" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/url.ts#L123" } ], "signatures": [ { - "id": 168, - "name": "setintervalByTimeout", + "id": 240, + "name": "convertParamsRouterToRegExp", "variant": "signature", "kind": 4096, "flags": {}, @@ -8822,7 +7994,7 @@ "summary": [ { "kind": "text", - "text": "Executes a given function repeatedly at a specified interval using setTimeout and clearTimeout." + "text": "convert params routes to regular expressions" } ], "blockTags": [ @@ -8831,7 +8003,7 @@ "content": [ { "kind": "text", - "text": "A function that, when called, clears the interval and stops the execution of the given function." + "text": "null or An array contains the RegExp that matches the params and the path for each params parameter" } ] } @@ -8839,40 +8011,16 @@ }, "sources": [ { - "fileName": "lib/workers.ts", - "line": 102, + "fileName": "lib/url.ts", + "line": 123, "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L102" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/url.ts#L123" } ], "parameters": [ { - "id": 169, - "name": "func", - "variant": "param", - "kind": 32768, - "flags": {}, - "comment": { - "summary": [ - { - "kind": "text", - "text": "The function to be executed." - } - ] - }, - "type": { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Function" - }, - "name": "Function", - "package": "typescript" - } - }, - { - "id": 170, - "name": "delay", + "id": 241, + "name": "path", "variant": "param", "kind": 32768, "flags": {}, @@ -8880,76 +8028,70 @@ "summary": [ { "kind": "text", - "text": "The interval (in milliseconds) at which the function should be executed." + "text": "a params paths" } ] }, "type": { "type": "intrinsic", - "name": "number" + "name": "string" } } ], "type": { - "type": "reflection", - "declaration": { - "id": 171, - "name": "__type", - "variant": "declaration", - "kind": 65536, - "flags": {}, - "sources": [ - { - "fileName": "lib/workers.ts", - "line": 118, - "character": 24, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L118" - } - ], - "signatures": [ - { - "id": 172, - "name": "__type", - "variant": "signature", - "kind": 4096, - "flags": {}, - "sources": [ + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "array", + "elementType": { + "type": "union", + "types": [ { - "fileName": "lib/workers.ts", - "line": 118, - "character": 24, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/workers.ts#L118" + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "RegExp" + }, + "name": "RegExp", + "package": "typescript" + }, + { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "string" + } } - ], - "type": { - "type": "intrinsic", - "name": "void" - } + ] } - ] - } + } + ] } } ] }, { - "id": 51, - "name": "sleep", + "id": 40, + "name": "defineDebounceFn", "variant": "declaration", "kind": 64, "flags": {}, "sources": [ { - "fileName": "lib/shard.ts", - "line": 16, + "fileName": "lib/define.ts", + "line": 23, "character": 13, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/shard.ts#L16" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/define.ts#L23" } ], "signatures": [ { - "id": 52, - "name": "sleep", + "id": 41, + "name": "defineDebounceFn", "variant": "signature", "kind": 4096, "flags": {}, @@ -8957,7 +8099,7 @@ "summary": [ { "kind": "text", - "text": "Sleeps for a given delay." + "text": "DefineDebounceFn is a function that creates a debounced function." } ], "blockTags": [ @@ -8966,7 +8108,7 @@ "content": [ { "kind": "text", - "text": "A promise that resolves after the delay." + "text": "- The debounce function." } ] } @@ -8974,16 +8116,16 @@ }, "sources": [ { - "fileName": "lib/shard.ts", - "line": 16, - "character": 21, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/shard.ts#L16" + "fileName": "lib/define.ts", + "line": 23, + "character": 13, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/define.ts#L23" } ], "parameters": [ { - "id": 53, - "name": "delay", + "id": 42, + "name": "fn", "variant": "param", "kind": 32768, "flags": {}, @@ -8991,7 +8133,33 @@ "summary": [ { "kind": "text", - "text": "The delay, in milliseconds." + "text": "The function to be debounced." + } + ] + }, + "type": { + "type": "reference", + "target": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "CacheResultFunc" + }, + "name": "CacheResultFunc", + "package": "@cc-heart/utils" + } + }, + { + "id": 43, + "name": "delay", + "variant": "param", + "kind": 32768, + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The delay in milliseconds to wait before the debounced function is called. Default is 500ms." } ] }, @@ -8999,44 +8167,54 @@ "type": "intrinsic", "name": "number" } - } - ], - "type": { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Promise" }, - "typeArguments": [ - { + { + "id": 44, + "name": "immediate", + "variant": "param", + "kind": 32768, + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Whether the debounced function should be called immediately before the delay. Default is false." + } + ] + }, + "type": { "type": "intrinsic", - "name": "unknown" + "name": "boolean" } - ], - "name": "Promise", - "package": "typescript" + } + ], + "type": { + "type": "intrinsic", + "name": "any" } } ] }, { - "id": 66, - "name": "unCapitalize", + "id": 20, + "name": "defineOnceFn", "variant": "declaration", "kind": 64, "flags": {}, "sources": [ { - "fileName": "lib/string.ts", - "line": 16, - "character": 13, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/string.ts#L16" + "fileName": "lib/define.ts", + "line": 51, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/define.ts#L51" } ], "signatures": [ { - "id": 67, - "name": "unCapitalize", + "id": 21, + "name": "defineOnceFn", "variant": "signature", "kind": 4096, "flags": {}, @@ -9044,7 +8222,7 @@ "summary": [ { "kind": "text", - "text": "Returns a new string with the first character converted to lowercase." + "text": "Creates a function that can only be called once." } ], "blockTags": [ @@ -9053,7 +8231,7 @@ "content": [ { "kind": "text", - "text": "- The unCapitalized string." + "text": "- A new function that can only be called once." } ] } @@ -9061,29 +8239,25 @@ }, "sources": [ { - "fileName": "lib/string.ts", - "line": 16, - "character": 28, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/string.ts#L16" + "fileName": "lib/define.ts", + "line": 51, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/define.ts#L51" } ], "typeParameter": [ { - "id": 68, + "id": 22, "name": "T", "variant": "typeParam", "kind": 131072, - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } + "flags": {} } ], "parameters": [ { - "id": 69, - "name": "target", + "id": 23, + "name": "fn", "variant": "param", "kind": 32768, "flags": {}, @@ -9091,58 +8265,158 @@ "summary": [ { "kind": "text", - "text": "The string to be unCapitalized." + "text": "The function to be called once." } ] }, "type": { - "type": "reference", - "target": 68, - "name": "T", - "package": "@cc-heart/utils", - "refersToTypeParameter": true + "type": "reflection", + "declaration": { + "id": 24, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "sources": [ + { + "fileName": "lib/define.ts", + "line": 51, + "character": 36, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/define.ts#L51" + } + ], + "signatures": [ + { + "id": 25, + "name": "__type", + "variant": "signature", + "kind": 4096, + "flags": {}, + "sources": [ + { + "fileName": "lib/define.ts", + "line": 51, + "character": 36, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/define.ts#L51" + } + ], + "parameters": [ + { + "id": 26, + "name": "args", + "variant": "param", + "kind": 32768, + "flags": { + "isRest": true + }, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "reference", + "target": 22, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + } + ] + } } } ], "type": { - "type": "reference", - "target": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", - "qualifiedName": "Uncapitalize" - }, - "typeArguments": [ - { - "type": "reference", - "target": 68, - "name": "T", - "package": "@cc-heart/utils", - "refersToTypeParameter": true - } - ], - "name": "Uncapitalize", - "package": "typescript" + "type": "reflection", + "declaration": { + "id": 27, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "sources": [ + { + "fileName": "lib/define.ts", + "line": 57, + "character": 9, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/define.ts#L57" + } + ], + "signatures": [ + { + "id": 28, + "name": "__type", + "variant": "signature", + "kind": 4096, + "flags": {}, + "sources": [ + { + "fileName": "lib/define.ts", + "line": 57, + "character": 9, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/define.ts#L57" + } + ], + "parameters": [ + { + "id": 29, + "name": "this", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "any" + } + }, + { + "id": 30, + "name": "args", + "variant": "param", + "kind": 32768, + "flags": { + "isRest": true + }, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "reference", + "target": 22, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + } + ] + } } } ] }, { - "id": 59, - "name": "underlineToHump", + "id": 35, + "name": "defineSinglePromiseFn", "variant": "declaration", "kind": 64, "flags": {}, "sources": [ { - "fileName": "lib/string.ts", - "line": 43, + "fileName": "lib/define.ts", + "line": 101, "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/string.ts#L43" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/define.ts#L101" } ], "signatures": [ { - "id": 60, - "name": "underlineToHump", + "id": 36, + "name": "defineSinglePromiseFn", "variant": "signature", "kind": 4096, "flags": {}, @@ -9150,7 +8424,7 @@ "summary": [ { "kind": "text", - "text": "Converts an underline-separated string to camel case.\ne.g. underlineToHump('hello_word') => 'helloWord'" + "text": "defineSinglePromiseFn ensures that the provided function can only be called once at a time.\nIf the function is invoked while it's still executing, it returns the same promise, avoiding multiple calls." } ], "blockTags": [ @@ -9159,7 +8433,7 @@ "content": [ { "kind": "text", - "text": "The camel case version of the input string." + "text": "A function that ensures the provided function is only executed once and returns a promise." } ] } @@ -9167,16 +8441,16 @@ }, "sources": [ { - "fileName": "lib/string.ts", - "line": 43, + "fileName": "lib/define.ts", + "line": 101, "character": 16, - "url": "https://github.com/cc-hearts/utils/blob/b8b2bd390005ab95c315c25a2f69b24a3b618801/lib/string.ts#L43" + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/define.ts#L101" } ], "parameters": [ { - "id": 61, - "name": "target", + "id": 37, + "name": "fn", "variant": "param", "kind": 32768, "flags": {}, @@ -9184,1629 +8458,6415 @@ "summary": [ { "kind": "text", - "text": "The underline-separated string to convert." + "text": "The function to be wrapped, which returns a promise." } ] }, "type": { - "type": "intrinsic", - "name": "string" + "type": "reference", + "target": { + "sourceFileName": "typings/helper.ts", + "qualifiedName": "Fn" + }, + "name": "Fn", + "package": "@cc-heart/utils" } } ], "type": { - "type": "intrinsic", - "name": "string" + "type": "reflection", + "declaration": { + "id": 38, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "sources": [ + { + "fileName": "lib/define.ts", + "line": 104, + "character": 9, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/define.ts#L104" + } + ], + "signatures": [ + { + "id": 39, + "name": "__type", + "variant": "signature", + "kind": 4096, + "flags": {}, + "sources": [ + { + "fileName": "lib/define.ts", + "line": 104, + "character": 9, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/define.ts#L104" + } + ], + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Promise" + }, + "typeArguments": [ + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "Promise", + "package": "typescript" + } + } + ] + } } } ] - } - ], - "groups": [ - { - "title": "Classes", - "children": [ - 329 - ] }, { - "title": "Variables", - "children": [ - 179, - 240, - 229 - ] - }, - { - "title": "Functions", - "children": [ - 140, - 87, - 62, - 161, - 84, - 40, - 20, - 35, - 31, - 145, - 149, - 3, - 16, - 8, - 12, - 362, - 1, - 127, - 369, - 103, - 121, - 115, - 97, - 142, - 109, - 118, - 91, - 112, - 124, - 134, - 100, - 94, - 106, - 131, - 137, - 54, - 49, - 80, - 70, - 155, - 75, - 45, - 173, - 167, - 51, - 66, - 59 - ] - } - ], - "packageName": "@cc-heart/utils", - "readme": [ - { - "kind": "text", + "id": 31, + "name": "defineThrottleFn", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/define.ts", + "line": 72, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/define.ts#L72" + } + ], + "signatures": [ + { + "id": 32, + "name": "defineThrottleFn", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "defineThrottleFn is a function that creates a throttled function." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "- The throttled function." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/define.ts", + "line": 72, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/define.ts#L72" + } + ], + "parameters": [ + { + "id": 33, + "name": "fn", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": { + "sourceFileName": "typings/helper.ts", + "qualifiedName": "Fn" + }, + "name": "Fn", + "package": "@cc-heart/utils" + } + }, + { + "id": 34, + "name": "delay", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "500" + } + ], + "type": { + "type": "reference", + "target": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "CacheResultFunc" + }, + "name": "CacheResultFunc", + "package": "@cc-heart/utils" + } + } + ] + }, + { + "id": 303, + "name": "executeConcurrency", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/workers.ts", + "line": 4, + "character": 22, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L4" + } + ], + "signatures": [ + { + "id": 304, + "name": "executeConcurrency", + "variant": "signature", + "kind": 4096, + "flags": {}, + "sources": [ + { + "fileName": "lib/workers.ts", + "line": 4, + "character": 22, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L4" + } + ], + "parameters": [ + { + "id": 305, + "name": "tasks", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "array", + "elementType": { + "type": "reference", + "target": { + "sourceFileName": "typings/helper.ts", + "qualifiedName": "Fn" + }, + "name": "Fn", + "package": "@cc-heart/utils" + } + } + }, + { + "id": 306, + "name": "maxConcurrency", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Promise" + }, + "typeArguments": [ + { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "any" + } + } + ] + } + ], + "name": "Promise", + "package": "typescript" + } + } + ] + }, + { + "id": 307, + "name": "executeQueue", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/workers.ts", + "line": 35, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L35" + } + ], + "signatures": [ + { + "id": 308, + "name": "executeQueue", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Invokes a queue." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "- A promise that resolves when all tasks are completed." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/workers.ts", + "line": 35, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L35" + } + ], + "parameters": [ + { + "id": 309, + "name": "taskArray", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "An array of tasks to be executed." + } + ] + }, + "type": { + "type": "array", + "elementType": { + "type": "reflection", + "declaration": { + "id": 310, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "sources": [ + { + "fileName": "lib/workers.ts", + "line": 36, + "character": 19, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L36" + } + ], + "signatures": [ + { + "id": 311, + "name": "__type", + "variant": "signature", + "kind": 4096, + "flags": {}, + "sources": [ + { + "fileName": "lib/workers.ts", + "line": 36, + "character": 19, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L36" + } + ], + "parameters": [ + { + "id": 312, + "name": "args", + "variant": "param", + "kind": 32768, + "flags": { + "isRest": true + }, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + ] + } + } + } + } + ], + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Promise" + }, + "typeArguments": [ + { + "type": "intrinsic", + "name": "void" + } + ], + "name": "Promise", + "package": "typescript" + } + } + ] + }, + { + "id": 3, + "name": "formatDate", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/date.ts", + "line": 57, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/date.ts#L57" + } + ], + "signatures": [ + { + "id": 4, + "name": "formatDate", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Formats a Date object according to the specified formatter string." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The formatted date string" + } + ] + }, + { + "tag": "@example", + "content": [ + { + "kind": "code", + "text": "```ts\nconst date = new Date(2024, 0, 1, 12, 30, 45);\nformatDate(date, 'YYYY-MM-DD hh:mm:ss'); // Returns \"2024-01-01 12:30:45\"\nformatDate(date, 'DD/MM/YYYY', true); // Returns \"01/01/2024\" in UTC\n```" + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/date.ts", + "line": 57, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/date.ts#L57" + } + ], + "parameters": [ + { + "id": 5, + "name": "date", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The Date object to format" + } + ] + }, + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Date" + }, + "name": "Date", + "package": "typescript" + } + }, + { + "id": 6, + "name": "formatter", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The format string. Supports YYYY (year), MM (month), DD (day), hh (hours), mm (minutes), ss (seconds)" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "'YYYY-MM-DD hh:mm:ss'" + }, + { + "id": 7, + "name": "utc", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Whether to use UTC time instead of local time" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "boolean" + }, + "defaultValue": "false" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ] + }, + { + "id": 16, + "name": "formatDateByArray", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/date.ts", + "line": 160, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/date.ts#L160" + } + ], + "signatures": [ + { + "id": 17, + "name": "formatDateByArray", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Formats a date based on an array of numbers, with optional formatting string\n\nThis function expects an array containing year, month, day, hour, minute, and second values. If the array is invalid or does not contain the necessary values, it logs a warning and returns 'Invalid Date'.\nThe function uses the slice method to create a new array containing only the first six elements, and decrements the month value by 1 to convert it from a 1-based index to a 0-based index used by the Date object.\nIt then creates a new Date object using the elements of the new array. If the date is invalid, it logs a warning and returns the date as a string.\nFinally, the function formats the date according to an optional formatting string and returns the formatted date string." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The formatted date string." + } + ] + }, + { + "tag": "@throws", + "content": [ + { + "kind": "text", + "text": "Throws an error if the array is invalid or does not contain the necessary values." + } + ] + }, + { + "tag": "@example", + "content": [ + { + "kind": "code", + "text": "```ts\nconst dateArray = [2024, 2, 19, 10, 30, 0];\nconst formattedDate = formatDateByArray(dateArray, 'MMMM D, YYYY, h:mm A');\nconsole.log(formattedDate);\n```" + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/date.ts", + "line": 160, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/date.ts#L160" + } + ], + "parameters": [ + { + "id": 18, + "name": "array", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The array representing the date. This array should contain year, month, day, hour, minute, and second values." + } + ] + }, + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "number" + } + } + }, + { + "id": 19, + "name": "formatter", + "variant": "param", + "kind": 32768, + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Optional. A specific format string to format the date. Defaults to 'YYYY-MM-DD HH:mm:ss'." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ] + }, + { + "id": 8, + "name": "formatDateByTimeStamp", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/date.ts", + "line": 105, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/date.ts#L105" + } + ], + "signatures": [ + { + "id": 9, + "name": "formatDateByTimeStamp", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Formats a date based on a given timestamp." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The formatted date string." + } + ] + }, + { + "tag": "@throws", + "content": [ + { + "kind": "text", + "text": "Throws an error if the timestamp is invalid or out of range." + } + ] + }, + { + "tag": "@example", + "content": [ + { + "kind": "code", + "text": "```ts\nconst timestamp = new Date().getTime();\nconst formattedDate = formatDateByTimeStamp(timestamp);\nconsole.log(formattedDate);\n```" + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/date.ts", + "line": 105, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/date.ts#L105" + } + ], + "parameters": [ + { + "id": 10, + "name": "timeStamp", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The timestamp to be formatted, in milliseconds." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 11, + "name": "formatter", + "variant": "param", + "kind": 32768, + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Optional. A specific format string to format the date. Defaults to 'YYYY-MM-DD HH:mm:ss'." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ] + }, + { + "id": 12, + "name": "formatDateTimeByString", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/date.ts", + "line": 131, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/date.ts#L131" + } + ], + "signatures": [ + { + "id": 13, + "name": "formatDateTimeByString", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Formats a date string into a specified date time format" + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The formatted date string." + } + ] + }, + { + "tag": "@throws", + "content": [ + { + "kind": "text", + "text": "Throws an error if the date string is invalid or cannot be parsed into a Date object." + } + ] + }, + { + "tag": "@example", + "content": [ + { + "kind": "code", + "text": "```ts\nconst dateString = '2024-02-19T10:30:00Z';\nconst formattedDateTime = formatDateTimeByString(dateString, 'MMMM D, YYYY, h:mm A');\nconsole.log(formattedDateTime);\n```" + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/date.ts", + "line": 131, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/date.ts#L131" + } + ], + "parameters": [ + { + "id": 14, + "name": "dateString", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "A string representing the date." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 15, + "name": "formatter", + "variant": "param", + "kind": 32768, + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Optional. A specific format string to format the date. Defaults to 'YYYY-MM-DD HH:mm:ss'." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ] + }, + { + "id": 524, + "name": "formatErrorToString", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/error-handler.ts", + "line": 12, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/error-handler.ts#L12" + } + ], + "signatures": [ + { + "id": 525, + "name": "formatErrorToString", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Formats an error object into a string representation." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The formatted error message." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/error-handler.ts", + "line": 12, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/error-handler.ts#L12" + } + ], + "parameters": [ + { + "id": 526, + "name": "error", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The error to format. It can be an " + }, + { + "kind": "code", + "text": "`Error`" + }, + { + "kind": "text", + "text": " instance, a string, or another object." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "unknown" + } + }, + { + "id": 527, + "name": "defaultErrorString", + "variant": "param", + "kind": 32768, + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The default error message if the error cannot be formatted." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "''" + }, + { + "id": 528, + "name": "opts", + "variant": "param", + "kind": 32768, + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Additional options." + } + ] + }, + "type": { + "type": "reflection", + "declaration": { + "id": 529, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "children": [ + { + "id": 530, + "name": "errorLimit", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The maximum number of stack trace lines to include." + } + ] + }, + "sources": [ + { + "fileName": "lib/error-handler.ts", + "line": 16, + "character": 4, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/error-handler.ts#L16" + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "8" + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 530 + ] + } + ], + "sources": [ + { + "fileName": "lib/error-handler.ts", + "line": 15, + "character": 9, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/error-handler.ts#L15" + } + ] + } + }, + "defaultValue": "..." + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ] + }, + { + "id": 1, + "name": "getCurrentTimeISOString", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/date.ts", + "line": 25, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/date.ts#L25" + } + ], + "signatures": [ + { + "id": 2, + "name": "getCurrentTimeISOString", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Returns the current time in ISO string format." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The current time in ISO string format." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/date.ts", + "line": 25, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/date.ts#L25" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ] + }, + { + "id": 282, + "name": "hasOwn", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 137, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L137" + } + ], + "signatures": [ + { + "id": 283, + "name": "hasOwn", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Checks if the given object has its own property." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "Returns true if the object has its own property, otherwise false." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 137, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L137" + } + ], + "parameters": [ + { + "id": 284, + "name": "obj", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The object to check." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "object" + } + }, + { + "id": 285, + "name": "prop", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The property to check." + } + ] + }, + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "PropertyKey" + }, + "name": "PropertyKey", + "package": "typescript" + } + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ] + }, + { + "id": 531, + "name": "invokeWithErrorHandlingFactory", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/error-handler.ts", + "line": 51, + "character": 13, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/error-handler.ts#L51" + } + ], + "signatures": [ + { + "id": 532, + "name": "invokeWithErrorHandlingFactory", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Creates a function factory with error handling capabilities" + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "Returns a new function that can execute target functions with automatic error handling" + } + ] + }, + { + "tag": "@example", + "content": [ + { + "kind": "code", + "text": "```ts\nconst errorHandler = (error) => console.error(error);\nconst safeExecute = invokeWithErrorHandlingFactory(errorHandler);\n\n// Execute regular function\nsafeExecute(() => { throw new Error('test') });\n\n// Execute async function\nsafeExecute(async () => { throw new Error('async test') });\n```" + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/error-handler.ts", + "line": 51, + "character": 46, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/error-handler.ts#L51" + } + ], + "parameters": [ + { + "id": 533, + "name": "handleError", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Error handling function to process exceptions during execution" + } + ] + }, + "type": { + "type": "reference", + "target": { + "sourceFileName": "typings/helper.ts", + "qualifiedName": "Fn" + }, + "name": "Fn", + "package": "@cc-heart/utils" + } + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 534, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "sources": [ + { + "fileName": "lib/error-handler.ts", + "line": 52, + "character": 9, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/error-handler.ts#L52" + } + ], + "signatures": [ + { + "id": 535, + "name": "__type", + "variant": "signature", + "kind": 4096, + "flags": {}, + "sources": [ + { + "fileName": "lib/error-handler.ts", + "line": 52, + "character": 9, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/error-handler.ts#L52" + } + ], + "parameters": [ + { + "id": 536, + "name": "handler", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": { + "sourceFileName": "typings/helper.ts", + "qualifiedName": "Fn" + }, + "name": "Fn", + "package": "@cc-heart/utils" + } + }, + { + "id": 537, + "name": "context", + "variant": "param", + "kind": 32768, + "flags": { + "isOptional": true + }, + "type": { + "type": "intrinsic", + "name": "unknown" + } + }, + { + "id": 538, + "name": "args", + "variant": "param", + "kind": 32768, + "flags": { + "isOptional": true + }, + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "unknown" + } + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + ] + } + } + } + ] + }, + { + "id": 258, + "name": "isBool", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 49, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L49" + } + ], + "signatures": [ + { + "id": 259, + "name": "isBool", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Checks if the provided value is a boolean." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "Returns true if the value is a boolean, false otherwise." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 49, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L49" + } + ], + "parameters": [ + { + "id": 260, + "name": "val", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to check." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "predicate", + "name": "val", + "asserts": false, + "targetType": { + "type": "intrinsic", + "name": "boolean" + } + } + } + ] + }, + { + "id": 276, + "name": "isEffectiveNumber", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 110, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L110" + } + ], + "signatures": [ + { + "id": 277, + "name": "isEffectiveNumber", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "determines if it is a valid value other than NaN" + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [] + } + ] + }, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 110, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L110" + } + ], + "parameters": [ + { + "id": 278, + "name": "val", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "predicate", + "name": "val", + "asserts": false, + "targetType": { + "type": "intrinsic", + "name": "number" + } + } + } + ] + }, + { + "id": 270, + "name": "isFalsy", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 91, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L91" + } + ], + "signatures": [ + { + "id": 271, + "name": "isFalsy", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Checks if a value is falsy." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "Returns true if the value is falsy, otherwise false." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 91, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L91" + } + ], + "parameters": [ + { + "id": 272, + "name": "val", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to check." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "predicate", + "name": "val", + "asserts": false, + "targetType": { + "type": "literal", + "value": false + } + } + } + ] + }, + { + "id": 252, + "name": "isFn", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 29, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L29" + } + ], + "signatures": [ + { + "id": 253, + "name": "isFn", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Checks if the given value is a function." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "Returns true if the value is a function, false otherwise." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 29, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L29" + } + ], + "parameters": [ + { + "id": 254, + "name": "val", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to be checked." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "predicate", + "name": "val", + "asserts": false, + "targetType": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Function" + }, + "name": "Function", + "package": "typescript" + } + } + } + ] + }, + { + "id": 295, + "name": "isMobile", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 180, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L180" + } + ], + "signatures": [ + { + "id": 296, + "name": "isMobile", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Determines whether the provided user agent string belongs to a mobile device." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "Returns true if the UA indicates a mobile device, otherwise false." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 180, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L180" + } + ], + "parameters": [ + { + "id": 297, + "name": "ua", + "variant": "param", + "kind": 32768, + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The user agent string to check." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ] + }, + { + "id": 300, + "name": "isNil", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 73, + "character": 13, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L73" + } + ], + "signatures": [ + { + "id": 301, + "name": "isNil", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Checks if the given value is null." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "Returns true if the value is null, false otherwise." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 73, + "character": 13, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L73" + } + ], + "parameters": [ + { + "id": 302, + "name": "val", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to check." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "predicate", + "name": "val", + "asserts": false, + "targetType": { + "type": "literal", + "value": null + } + } + } + ] + }, + { + "id": 264, + "name": "isNull", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 69, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L69" + } + ], + "signatures": [ + { + "id": 265, + "name": "isNull", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Checks if the given value is null." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "Returns true if the value is null, false otherwise." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 69, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L69" + } + ], + "parameters": [ + { + "id": 266, + "name": "val", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to check." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "predicate", + "name": "val", + "asserts": false, + "targetType": { + "type": "literal", + "value": null + } + } + } + ] + }, + { + "id": 273, + "name": "isNumber", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 101, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L101" + } + ], + "signatures": [ + { + "id": 274, + "name": "isNumber", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Checks if the given value is a number." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "Returns true if the value is a number, false otherwise." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 101, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L101" + } + ], + "parameters": [ + { + "id": 275, + "name": "val", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to be checked." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "predicate", + "name": "val", + "asserts": false, + "targetType": { + "type": "intrinsic", + "name": "number" + } + } + } + ] + }, + { + "id": 246, + "name": "isObject", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 9, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L9" + } + ], + "signatures": [ + { + "id": 247, + "name": "isObject", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Checks if the given value is an object." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "Returns true if the value is an object, otherwise false." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 9, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L9" + } + ], + "parameters": [ + { + "id": 248, + "name": "val", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to be checked." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "predicate", + "name": "val", + "asserts": false, + "targetType": { + "type": "intrinsic", + "name": "object" + } + } + } + ] + }, + { + "id": 267, + "name": "isPrimitive", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 81, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L81" + } + ], + "signatures": [ + { + "id": 268, + "name": "isPrimitive", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Determines whether a value is a primitive." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "Returns " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": " if the value is a primitive, " + }, + { + "kind": "code", + "text": "`false`" + }, + { + "kind": "text", + "text": " otherwise." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 81, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L81" + } + ], + "parameters": [ + { + "id": 269, + "name": "val", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to check." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ] + }, + { + "id": 279, + "name": "isPromise", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 121, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L121" + } + ], + "signatures": [ + { + "id": 280, + "name": "isPromise", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Checks if a value is a Promise." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "Returns " + }, + { + "kind": "code", + "text": "`true`" + }, + { + "kind": "text", + "text": " if the value is a Promise, else " + }, + { + "kind": "code", + "text": "`false`" + }, + { + "kind": "text", + "text": "." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 121, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L121" + } + ], + "parameters": [ + { + "id": 281, + "name": "val", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to check." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "predicate", + "name": "val", + "asserts": false, + "targetType": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Promise" + }, + "typeArguments": [ + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Promise", + "package": "typescript" + } + } + } + ] + }, + { + "id": 289, + "name": "isPropertyKey", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 159, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L159" + } + ], + "signatures": [ + { + "id": 290, + "name": "isPropertyKey", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Checks if a given value is a valid PropertyKey.\nA PropertyKey is a string, number, or symbol that can be used as a property name." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "True if the value is a PropertyKey, false otherwise." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 159, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L159" + } + ], + "parameters": [ + { + "id": 291, + "name": "val", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to check." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "predicate", + "name": "val", + "asserts": false, + "targetType": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "PropertyKey" + }, + "name": "PropertyKey", + "package": "typescript" + } + } + } + ] + }, + { + "id": 255, + "name": "isStr", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 39, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L39" + } + ], + "signatures": [ + { + "id": 256, + "name": "isStr", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Checks if the given value is a string." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "Returns true if the value is a string, false otherwise." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 39, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L39" + } + ], + "parameters": [ + { + "id": 257, + "name": "val", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to be checked." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "predicate", + "name": "val", + "asserts": false, + "targetType": { + "type": "intrinsic", + "name": "string" + } + } + } + ] + }, + { + "id": 249, + "name": "isSymbol", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 20, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L20" + } + ], + "signatures": [ + { + "id": 250, + "name": "isSymbol", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Checks if the given value is an symbol." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "Returns true if the value is an object, otherwise false." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 20, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L20" + } + ], + "parameters": [ + { + "id": 251, + "name": "val", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to be checked." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "predicate", + "name": "val", + "asserts": false, + "targetType": { + "type": "intrinsic", + "name": "symbol" + } + } + } + ] + }, + { + "id": 261, + "name": "isUndef", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 59, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L59" + } + ], + "signatures": [ + { + "id": 262, + "name": "isUndef", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Checks if a value is undefined." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "Returns true if the value is undefined, otherwise false." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 59, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L59" + } + ], + "parameters": [ + { + "id": 263, + "name": "val", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The value to check." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "unknown" + } + } + ], + "type": { + "type": "predicate", + "name": "val", + "asserts": false, + "targetType": { + "type": "intrinsic", + "name": "undefined" + } + } + } + ] + }, + { + "id": 286, + "name": "isValidArray", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 147, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L147" + } + ], + "signatures": [ + { + "id": 287, + "name": "isValidArray", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "An array is considered valid if it is an array and its length is greater than or equal to 0." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "Returns true if the array is valid, false otherwise." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 147, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L147" + } + ], + "parameters": [ + { + "id": 288, + "name": "arr", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The array to be checked." + } + ] + }, + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "unknown" + } + } + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ] + }, + { + "id": 292, + "name": "isValidDate", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 170, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L170" + } + ], + "signatures": [ + { + "id": 293, + "name": "isValidDate", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Checks if a given date is valid." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "True if the date is valid, false otherwise." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/validate.ts", + "line": 170, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/validate.ts#L170" + } + ], + "parameters": [ + { + "id": 294, + "name": "date", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The date to check." + } + ] + }, + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Date" + }, + "name": "Date", + "package": "typescript" + } + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ] + }, + { + "id": 209, + "name": "mulSplit", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/string.ts", + "line": 26, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/string.ts#L26" + } + ], + "signatures": [ + { + "id": 210, + "name": "mulSplit", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [], + "blockTags": [ + { + "tag": "@description", + "content": [ + { + "kind": "text", + "text": "Add the number of cuts based on the original split and return all subsets after the cut" + } + ] + }, + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "a new split array, length is num + 1" + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/string.ts", + "line": 26, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/string.ts#L26" + } + ], + "parameters": [ + { + "id": 211, + "name": "str", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "need to split of primitive string" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 212, + "name": "splitStr", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "split params" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 213, + "name": "num", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "split limit" + } + ] + }, + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "-1" + } + ], + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "string" + } + } + } + ] + }, + { + "id": 204, + "name": "noop", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/shard.ts", + "line": 6, + "character": 13, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/shard.ts#L6" + } + ], + "signatures": [ + { + "id": 205, + "name": "noop", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "This function does nothing." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "No return value." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/shard.ts", + "line": 6, + "character": 20, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/shard.ts#L6" + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + }, + { + "id": 235, + "name": "objectToQueryString", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/url.ts", + "line": 102, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/url.ts#L102" + } + ], + "signatures": [ + { + "id": 236, + "name": "objectToQueryString", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Converts an object to a query string." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The query string representation of " + }, + { + "kind": "code", + "text": "`data`" + }, + { + "kind": "text", + "text": "." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/url.ts", + "line": 102, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/url.ts#L102" + } + ], + "typeParameter": [ + { + "id": 237, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {}, + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Record" + }, + "typeArguments": [ + { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "PropertyKey" + }, + "name": "PropertyKey", + "package": "typescript" + }, + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "Record", + "package": "typescript" + } + } + ], + "parameters": [ + { + "id": 238, + "name": "input", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": 237, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ] + }, + { + "id": 225, + "name": "parseKey", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/url.ts", + "line": 4, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/url.ts#L4" + } + ], + "signatures": [ + { + "id": 226, + "name": "parseKey", + "variant": "signature", + "kind": 4096, + "flags": {}, + "sources": [ + { + "fileName": "lib/url.ts", + "line": 4, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/url.ts#L4" + } + ], + "parameters": [ + { + "id": 227, + "name": "obj", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Record" + }, + "typeArguments": [ + { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "PropertyKey" + }, + "name": "PropertyKey", + "package": "typescript" + }, + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "Record", + "package": "typescript" + } + }, + { + "id": 228, + "name": "key", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 229, + "name": "value", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + }, + { + "id": 313, + "name": "pipe", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/workers.ts", + "line": 70, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L70" + } + ], + "signatures": [ + { + "id": 314, + "name": "pipe", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Takes a series of functions and returns a new function that runs these functions in sequence.\nIf a function returns a Promise, the next function is called with the resolved value." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "A new function that takes any number of arguments and pipes them through " + }, + { + "kind": "code", + "text": "`fns`" + }, + { + "kind": "text", + "text": "." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/workers.ts", + "line": 70, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L70" + } + ], + "parameters": [ + { + "id": 315, + "name": "fns", + "variant": "param", + "kind": 32768, + "flags": { + "isRest": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The functions to pipe." + } + ] + }, + "type": { + "type": "array", + "elementType": { + "type": "reference", + "target": { + "sourceFileName": "typings/helper.ts", + "qualifiedName": "Fn" + }, + "name": "Fn", + "package": "@cc-heart/utils" + } + } + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 316, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "sources": [ + { + "fileName": "lib/workers.ts", + "line": 71, + "character": 9, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L71" + } + ], + "signatures": [ + { + "id": 317, + "name": "__type", + "variant": "signature", + "kind": 4096, + "flags": {}, + "sources": [ + { + "fileName": "lib/workers.ts", + "line": 71, + "character": 9, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L71" + } + ], + "parameters": [ + { + "id": 318, + "name": "args", + "variant": "param", + "kind": 32768, + "flags": { + "isRest": true + }, + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "any" + } + } + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + } + ] + } + } + } + ] + }, + { + "id": 230, + "name": "queryStringToObject", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/url.ts", + "line": 56, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/url.ts#L56" + } + ], + "signatures": [ + { + "id": 231, + "name": "queryStringToObject", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Converts a query string to an object." + } + ], + "blockTags": [ + { + "tag": "@example", + "content": [ + { + "kind": "code", + "text": "```ts\n`queryStringToObject('foo=1&bar=2&baz=3')`\n```" + } + ] + }, + { + "tag": "@example", + "content": [ + { + "kind": "code", + "text": "```ts\n`queryStringToObject('foo=&bar=2&baz=3')`\n```" + } + ] + }, + { + "tag": "@example", + "content": [ + { + "kind": "code", + "text": "```ts\n`queryStringToObject('foo[0]=1&foo[1]=2&baz=3')`\n```" + } + ] + }, + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The object representation of the query string in " + }, + { + "kind": "code", + "text": "`url`" + }, + { + "kind": "text", + "text": "." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/url.ts", + "line": 56, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/url.ts#L56" + } + ], + "typeParameter": [ + { + "id": 232, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The type of the URL string." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 233, + "name": "U", + "variant": "typeParam", + "kind": 131072, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The type of the object to return." + } + ] + }, + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Record" + }, + "typeArguments": [ + { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "PropertyKey" + }, + "name": "PropertyKey", + "package": "typescript" + }, + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "Record", + "package": "typescript" + }, + "default": { + "type": "reference", + "target": { + "sourceFileName": "typings/url.ts", + "qualifiedName": "QueryStringToObject" + }, + "typeArguments": [ + { + "type": "reference", + "target": 232, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + ], + "name": "QueryStringToObject", + "package": "@cc-heart/utils" + } + } + ], + "parameters": [ + { + "id": 234, + "name": "url", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The URL string to convert." + } + ] + }, + "type": { + "type": "reference", + "target": 232, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + } + ], + "type": { + "type": "reference", + "target": 233, + "name": "U", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + } + ] + }, + { + "id": 45, + "name": "random", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/random.ts", + "line": 8, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/random.ts#L8" + } + ], + "signatures": [ + { + "id": 46, + "name": "random", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Generates a random integer between min (inclusive) and max (inclusive)." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "A random integer between min and max." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/random.ts", + "line": 8, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/random.ts#L8" + } + ], + "parameters": [ + { + "id": 47, + "name": "min", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The minimum value (inclusive)." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 48, + "name": "max", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The maximum value (inclusive)." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + } + ] + }, + { + "id": 331, + "name": "setIntervalByTimeout", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/workers.ts", + "line": 128, + "character": 13, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L128" + } + ], + "signatures": [ + { + "id": 332, + "name": "setIntervalByTimeout", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Executes a given function repeatedly at a specified interval using setTimeout and clearTimeout." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "A function that, when called, clears the interval and stops the execution of the given function." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/workers.ts", + "line": 128, + "character": 13, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L128" + } + ], + "parameters": [ + { + "id": 333, + "name": "func", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The function to be executed." + } + ] + }, + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Function" + }, + "name": "Function", + "package": "typescript" + } + }, + { + "id": 334, + "name": "delay", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The interval (in milliseconds) at which the function should be executed." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 335, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "sources": [ + { + "fileName": "lib/workers.ts", + "line": 118, + "character": 24, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L118" + } + ], + "signatures": [ + { + "id": 336, + "name": "__type", + "variant": "signature", + "kind": 4096, + "flags": {}, + "sources": [ + { + "fileName": "lib/workers.ts", + "line": 118, + "character": 24, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L118" + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + } + } + ] + }, + { + "id": 325, + "name": "setintervalByTimeout", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/workers.ts", + "line": 102, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L102" + } + ], + "signatures": [ + { + "id": 326, + "name": "setintervalByTimeout", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Executes a given function repeatedly at a specified interval using setTimeout and clearTimeout." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "A function that, when called, clears the interval and stops the execution of the given function." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/workers.ts", + "line": 102, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L102" + } + ], + "parameters": [ + { + "id": 327, + "name": "func", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The function to be executed." + } + ] + }, + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Function" + }, + "name": "Function", + "package": "typescript" + } + }, + { + "id": 328, + "name": "delay", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The interval (in milliseconds) at which the function should be executed." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 329, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "sources": [ + { + "fileName": "lib/workers.ts", + "line": 118, + "character": 24, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L118" + } + ], + "signatures": [ + { + "id": 330, + "name": "__type", + "variant": "signature", + "kind": 4096, + "flags": {}, + "sources": [ + { + "fileName": "lib/workers.ts", + "line": 118, + "character": 24, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/workers.ts#L118" + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + } + } + ] + }, + { + "id": 206, + "name": "sleep", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/shard.ts", + "line": 16, + "character": 13, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/shard.ts#L16" + } + ], + "signatures": [ + { + "id": 207, + "name": "sleep", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Sleeps for a given delay." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "A promise that resolves after the delay." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/shard.ts", + "line": 16, + "character": 21, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/shard.ts#L16" + } + ], + "parameters": [ + { + "id": 208, + "name": "delay", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The delay, in milliseconds." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Promise" + }, + "typeArguments": [ + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "Promise", + "package": "typescript" + } + } + ] + }, + { + "id": 221, + "name": "unCapitalize", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/string.ts", + "line": 16, + "character": 13, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/string.ts#L16" + } + ], + "signatures": [ + { + "id": 222, + "name": "unCapitalize", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Returns a new string with the first character converted to lowercase." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "- The unCapitalized string." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/string.ts", + "line": 16, + "character": 28, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/string.ts#L16" + } + ], + "typeParameter": [ + { + "id": 223, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "parameters": [ + { + "id": 224, + "name": "target", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The string to be unCapitalized." + } + ] + }, + "type": { + "type": "reference", + "target": 223, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + } + ], + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Uncapitalize" + }, + "typeArguments": [ + { + "type": "reference", + "target": 223, + "name": "T", + "package": "@cc-heart/utils", + "refersToTypeParameter": true + } + ], + "name": "Uncapitalize", + "package": "typescript" + } + } + ] + }, + { + "id": 214, + "name": "underlineToHump", + "variant": "declaration", + "kind": 64, + "flags": {}, + "sources": [ + { + "fileName": "lib/string.ts", + "line": 43, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/string.ts#L43" + } + ], + "signatures": [ + { + "id": 215, + "name": "underlineToHump", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Converts an underline-separated string to camel case.\ne.g. underlineToHump('hello_word') => 'helloWord'" + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "The camel case version of the input string." + } + ] + } + ] + }, + "sources": [ + { + "fileName": "lib/string.ts", + "line": 43, + "character": 16, + "url": "https://github.com/cc-devrox/utils/blob/7cc3574051cd59a263f899739bc047201c40d3ae/lib/string.ts#L43" + } + ], + "parameters": [ + { + "id": 216, + "name": "target", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The underline-separated string to convert." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "children": [ + 491, + 93 + ] + }, + { + "title": "Interfaces", + "children": [ + 73, + 49 + ] + }, + { + "title": "Type Aliases", + "children": [ + 69, + 59, + 63 + ] + }, + { + "title": "Variables", + "children": [ + 341, + 402, + 391 + ] + }, + { + "title": "Functions", + "children": [ + 298, + 337, + 242, + 217, + 319, + 239, + 40, + 20, + 35, + 31, + 303, + 307, + 3, + 16, + 8, + 12, + 524, + 1, + 282, + 531, + 258, + 276, + 270, + 252, + 295, + 300, + 264, + 273, + 246, + 267, + 279, + 289, + 255, + 249, + 261, + 286, + 292, + 209, + 204, + 235, + 225, + 313, + 230, + 45, + 331, + 325, + 206, + 221, + 214 + ] + } + ], + "packageName": "@cc-heart/utils", + "readme": [ + { + "kind": "text", "text": "# @cc-heart/utils\n\n[Docs](https://cc-hearts.github.io/utils/)\n\nA library of JavaScript tools\n\n## Install\n\n" }, - { - "kind": "code", - "text": "```shell\nnpm install @cc-heart/utils\n```" + { + "kind": "code", + "text": "```shell\nnpm install @cc-heart/utils\n```" + }, + { + "kind": "text", + "text": "\n\n## Usage\n\n" + }, + { + "kind": "code", + "text": "```js\nimport { capitalize } from '@cc-heart/utils'\n\ncapitalize('string') // String\n```" + }, + { + "kind": "text", + "text": "\n\n## LICENSE\n\n" + }, + { + "kind": "code", + "text": "`@cc-heart/utils`" + }, + { + "kind": "text", + "text": " is licensed under the [MIT License](./LICENSE)." + } + ], + "symbolIdMap": { + "0": { + "sourceFileName": "index.ts", + "qualifiedName": "" + }, + "1": { + "sourceFileName": "lib/date.ts", + "qualifiedName": "getCurrentTimeISOString" + }, + "2": { + "sourceFileName": "lib/date.ts", + "qualifiedName": "getCurrentTimeISOString" + }, + "3": { + "sourceFileName": "lib/date.ts", + "qualifiedName": "formatDate" + }, + "4": { + "sourceFileName": "lib/date.ts", + "qualifiedName": "formatDate" + }, + "5": { + "sourceFileName": "lib/date.ts", + "qualifiedName": "date" + }, + "6": { + "sourceFileName": "lib/date.ts", + "qualifiedName": "formatter" + }, + "7": { + "sourceFileName": "lib/date.ts", + "qualifiedName": "utc" + }, + "8": { + "sourceFileName": "lib/date.ts", + "qualifiedName": "formatDateByTimeStamp" + }, + "9": { + "sourceFileName": "lib/date.ts", + "qualifiedName": "formatDateByTimeStamp" + }, + "10": { + "sourceFileName": "lib/date.ts", + "qualifiedName": "timeStamp" + }, + "11": { + "sourceFileName": "lib/date.ts", + "qualifiedName": "formatter" + }, + "12": { + "sourceFileName": "lib/date.ts", + "qualifiedName": "formatDateTimeByString" + }, + "13": { + "sourceFileName": "lib/date.ts", + "qualifiedName": "formatDateTimeByString" + }, + "14": { + "sourceFileName": "lib/date.ts", + "qualifiedName": "dateString" + }, + "15": { + "sourceFileName": "lib/date.ts", + "qualifiedName": "formatter" + }, + "16": { + "sourceFileName": "lib/date.ts", + "qualifiedName": "formatDateByArray" + }, + "17": { + "sourceFileName": "lib/date.ts", + "qualifiedName": "formatDateByArray" + }, + "18": { + "sourceFileName": "lib/date.ts", + "qualifiedName": "array" + }, + "19": { + "sourceFileName": "lib/date.ts", + "qualifiedName": "formatter" + }, + "20": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "defineOnceFn" + }, + "21": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "defineOnceFn" + }, + "22": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "T" + }, + "23": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "fn" + }, + "24": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "__type" + }, + "25": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "__type" + }, + "26": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "args" + }, + "27": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "__function" + }, + "28": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "__function" + }, + "29": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "this" + }, + "30": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "args" + }, + "31": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "defineThrottleFn" + }, + "32": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "defineThrottleFn" + }, + "33": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "fn" + }, + "34": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "delay" + }, + "35": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "defineSinglePromiseFn" + }, + "36": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "defineSinglePromiseFn" + }, + "37": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "fn" + }, + "38": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "__function" + }, + "39": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "__function" + }, + "40": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "defineDebounceFn" + }, + "41": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "defineDebounceFn" + }, + "42": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "fn" + }, + "43": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "delay" + }, + "44": { + "sourceFileName": "lib/define.ts", + "qualifiedName": "immediate" + }, + "45": { + "sourceFileName": "lib/random.ts", + "qualifiedName": "random" + }, + "46": { + "sourceFileName": "lib/random.ts", + "qualifiedName": "random" + }, + "47": { + "sourceFileName": "lib/random.ts", + "qualifiedName": "min" + }, + "48": { + "sourceFileName": "lib/random.ts", + "qualifiedName": "max" + }, + "49": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "RequestReturn" + }, + "50": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "RequestReturn.data" + }, + "51": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "RequestReturn.error" + }, + "52": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "RequestReturn.loading" + }, + "53": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "RequestReturn.aborted" + }, + "54": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "RequestReturn.abort" + }, + "55": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "__type" + }, + "56": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "__type" + }, + "57": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "RequestReturn.promise" + }, + "58": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "RequestReturn.T" + }, + "59": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "RequestInterceptor" + }, + "60": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "__type" + }, + "61": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "__type" + }, + "62": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "config" + }, + "63": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "ResponseInterceptor" + }, + "64": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "__type" + }, + "65": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "__type" + }, + "66": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "data" + }, + "67": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "T" + }, + "68": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "U" + }, + "69": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "ErrorInterceptor" + }, + "70": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "__type" + }, + "71": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "__type" + }, + "72": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "error" + }, + "73": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "RequestConfig" + }, + "74": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "RequestConfig.params" + }, + "75": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "RequestConfig.data" + }, + "76": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "RequestConfig.requestInterceptors" + }, + "77": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "RequestConfig.responseInterceptors" + }, + "78": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "RequestConfig.errorInterceptors" + }, + "79": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "RequestInit.method" + }, + "80": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "RequestInit.keepalive" + }, + "81": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "RequestInit.headers" + }, + "82": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "RequestInit.body" + }, + "83": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "RequestInit.redirect" + }, + "84": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "RequestInit.integrity" + }, + "85": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "RequestInit.signal" + }, + "86": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "RequestInit.credentials" + }, + "87": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "RequestInit.mode" + }, + "88": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "RequestInit.referrer" + }, + "89": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "RequestInit.referrerPolicy" + }, + "90": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "RequestInit.window" + }, + "91": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "RequestInit.dispatcher" + }, + "92": { + "sourceFileName": "node_modules/undici-types/fetch.d.ts", + "qualifiedName": "RequestInit.duplex" + }, + "93": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request" + }, + "94": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.__constructor" + }, + "95": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request" + }, + "96": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "baseUrl" + }, + "97": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.requestInterceptors" + }, + "98": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.responseInterceptors" + }, + "99": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.errorInterceptors" + }, + "100": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.baseUrl" + }, + "101": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.useRequestInterceptor" + }, + "102": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.useRequestInterceptor" + }, + "103": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "interceptor" + }, + "104": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "__function" + }, + "105": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "__function" + }, + "106": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.useResponseInterceptor" + }, + "107": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.useResponseInterceptor" + }, + "108": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "T" + }, + "109": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "U" + }, + "110": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "interceptor" + }, + "111": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "__function" + }, + "112": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "__function" + }, + "113": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.useErrorInterceptor" + }, + "114": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.useErrorInterceptor" + }, + "115": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "interceptor" + }, + "116": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "__function" + }, + "117": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "__function" + }, + "118": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.get" + }, + "119": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.get" + }, + "120": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "T" + }, + "121": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "url" + }, + "122": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "params" + }, + "123": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "config" + }, + "124": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.delete" + }, + "125": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.delete" + }, + "126": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "T" + }, + "127": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "url" + }, + "128": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "params" + }, + "129": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "config" + }, + "130": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.post" + }, + "131": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.post" + }, + "132": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "T" + }, + "133": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "url" + }, + "134": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "data" + }, + "135": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "config" + }, + "136": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.put" + }, + "137": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.put" + }, + "138": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "T" + }, + "139": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "url" + }, + "140": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "data" + }, + "141": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "config" }, - { - "kind": "text", - "text": "\n\n## Usage\n\n" + "142": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.patch" }, - { - "kind": "code", - "text": "```js\nimport { capitalize } from '@cc-heart/utils'\n\ncapitalize('string') // String\n```" + "143": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.patch" }, - { - "kind": "text", - "text": "\n\n## LICENSE\n\n" + "144": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "T" }, - { - "kind": "code", - "text": "`@cc-heart/utils`" + "145": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "url" }, - { - "kind": "text", - "text": " is licensed under the [MIT License](./LICENSE)." - } - ], - "symbolIdMap": { - "0": { - "sourceFileName": "index.ts", - "qualifiedName": "" + "146": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "data" }, - "1": { - "sourceFileName": "lib/date.ts", - "qualifiedName": "getCurrentTimeISOString" + "147": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "config" }, - "2": { - "sourceFileName": "lib/date.ts", - "qualifiedName": "getCurrentTimeISOString" + "148": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.request" }, - "3": { - "sourceFileName": "lib/date.ts", - "qualifiedName": "formatDate" + "149": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.request" }, - "4": { - "sourceFileName": "lib/date.ts", - "qualifiedName": "formatDate" + "150": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "T" }, - "5": { - "sourceFileName": "lib/date.ts", - "qualifiedName": "date" + "151": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "url" }, - "6": { - "sourceFileName": "lib/date.ts", - "qualifiedName": "formatter" + "152": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "config" }, - "7": { - "sourceFileName": "lib/date.ts", - "qualifiedName": "utc" + "153": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.execute" }, - "8": { - "sourceFileName": "lib/date.ts", - "qualifiedName": "formatDateByTimeStamp" + "154": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.execute" }, - "9": { - "sourceFileName": "lib/date.ts", - "qualifiedName": "formatDateByTimeStamp" + "155": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "T" }, - "10": { - "sourceFileName": "lib/date.ts", - "qualifiedName": "timeStamp" + "156": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "url" }, - "11": { - "sourceFileName": "lib/date.ts", - "qualifiedName": "formatter" + "157": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "config" }, - "12": { - "sourceFileName": "lib/date.ts", - "qualifiedName": "formatDateTimeByString" + "158": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "controller" }, - "13": { - "sourceFileName": "lib/date.ts", - "qualifiedName": "formatDateTimeByString" + "159": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "result" }, - "14": { - "sourceFileName": "lib/date.ts", - "qualifiedName": "dateString" + "160": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.buildRequestInit" }, - "15": { - "sourceFileName": "lib/date.ts", - "qualifiedName": "formatter" + "161": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.buildRequestInit" }, - "16": { - "sourceFileName": "lib/date.ts", - "qualifiedName": "formatDateByArray" + "162": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "method" }, - "17": { - "sourceFileName": "lib/date.ts", - "qualifiedName": "formatDateByArray" + "163": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "data" }, - "18": { - "sourceFileName": "lib/date.ts", - "qualifiedName": "array" + "164": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "config" }, - "19": { - "sourceFileName": "lib/date.ts", - "qualifiedName": "formatter" + "165": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "controller" }, - "20": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "defineOnceFn" + "166": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.buildBody" }, - "21": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "defineOnceFn" + "167": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.buildBody" }, - "22": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "T" + "168": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "data" }, - "23": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "fn" + "169": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.buildUrl" }, - "24": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "__type" + "170": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.buildUrl" }, - "25": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "__type" + "171": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "url" }, - "26": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "args" + "172": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "method" }, - "27": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "__function" + "173": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "params" }, - "28": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "__function" + "174": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.joinUrl" }, - "29": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "this" + "175": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.joinUrl" }, - "30": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "args" + "176": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "baseUrl" }, - "31": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "defineThrottleFn" + "177": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "url" }, - "32": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "defineThrottleFn" + "178": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.isCompleteUrl" }, - "33": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "fn" + "179": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.isCompleteUrl" }, - "34": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "delay" + "180": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "url" }, - "35": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "defineSinglePromiseFn" + "181": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.normalizeHeaders" }, - "36": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "defineSinglePromiseFn" + "182": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.normalizeHeaders" }, - "37": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "fn" + "183": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "headers" }, - "38": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "__function" + "184": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.runRequestInterceptors" }, - "39": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "__function" + "185": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.runRequestInterceptors" }, - "40": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "defineDebounceFn" + "186": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "config" }, - "41": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "defineDebounceFn" + "187": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "interceptors" }, - "42": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "fn" + "188": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.runResponseInterceptors" }, - "43": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "delay" + "189": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.runResponseInterceptors" }, - "44": { - "sourceFileName": "lib/define.ts", - "qualifiedName": "immediate" + "190": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "data" }, - "45": { - "sourceFileName": "lib/random.ts", - "qualifiedName": "random" + "191": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "interceptors" }, - "46": { - "sourceFileName": "lib/random.ts", - "qualifiedName": "random" + "192": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.runErrorInterceptors" }, - "47": { - "sourceFileName": "lib/random.ts", - "qualifiedName": "min" + "193": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.runErrorInterceptors" }, - "48": { - "sourceFileName": "lib/random.ts", - "qualifiedName": "max" + "194": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "error" }, - "49": { + "195": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "interceptors" + }, + "196": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.parseResponse" + }, + "197": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.parseResponse" + }, + "198": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "response" + }, + "199": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.removeInterceptor" + }, + "200": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "Request.removeInterceptor" + }, + "201": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "T" + }, + "202": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "interceptors" + }, + "203": { + "sourceFileName": "lib/request.ts", + "qualifiedName": "interceptor" + }, + "204": { "sourceFileName": "lib/shard.ts", "qualifiedName": "noop" }, - "50": { + "205": { "sourceFileName": "lib/shard.ts", "qualifiedName": "noop" }, - "51": { + "206": { "sourceFileName": "lib/shard.ts", "qualifiedName": "sleep" }, - "52": { + "207": { "sourceFileName": "lib/shard.ts", "qualifiedName": "sleep" }, - "53": { + "208": { "sourceFileName": "lib/shard.ts", "qualifiedName": "delay" }, - "54": { + "209": { "sourceFileName": "lib/string.ts", "qualifiedName": "mulSplit" }, - "55": { + "210": { "sourceFileName": "lib/string.ts", "qualifiedName": "mulSplit" }, - "56": { + "211": { "sourceFileName": "lib/string.ts", "qualifiedName": "str" }, - "57": { + "212": { "sourceFileName": "lib/string.ts", "qualifiedName": "splitStr" }, - "58": { + "213": { "sourceFileName": "lib/string.ts", "qualifiedName": "num" }, - "59": { + "214": { "sourceFileName": "lib/string.ts", "qualifiedName": "underlineToHump" }, - "60": { + "215": { "sourceFileName": "lib/string.ts", "qualifiedName": "underlineToHump" }, - "61": { + "216": { "sourceFileName": "lib/string.ts", "qualifiedName": "target" }, - "62": { + "217": { "sourceFileName": "lib/string.ts", "qualifiedName": "capitalize" }, - "63": { + "218": { "sourceFileName": "lib/string.ts", "qualifiedName": "capitalize" }, - "64": { + "219": { "sourceFileName": "lib/string.ts", "qualifiedName": "T" }, - "65": { + "220": { "sourceFileName": "lib/string.ts", "qualifiedName": "target" }, - "66": { + "221": { "sourceFileName": "lib/string.ts", "qualifiedName": "unCapitalize" }, - "67": { + "222": { "sourceFileName": "lib/string.ts", "qualifiedName": "unCapitalize" }, - "68": { + "223": { "sourceFileName": "lib/string.ts", "qualifiedName": "T" }, - "69": { + "224": { "sourceFileName": "lib/string.ts", "qualifiedName": "target" }, - "70": { + "225": { "sourceFileName": "lib/url.ts", "qualifiedName": "parseKey" }, - "71": { + "226": { "sourceFileName": "lib/url.ts", "qualifiedName": "parseKey" }, - "72": { + "227": { "sourceFileName": "lib/url.ts", "qualifiedName": "obj" }, - "73": { + "228": { "sourceFileName": "lib/url.ts", "qualifiedName": "key" }, - "74": { + "229": { "sourceFileName": "lib/url.ts", "qualifiedName": "value" }, - "75": { + "230": { "sourceFileName": "lib/url.ts", "qualifiedName": "queryStringToObject" }, - "76": { + "231": { "sourceFileName": "lib/url.ts", "qualifiedName": "queryStringToObject" }, - "77": { + "232": { "sourceFileName": "lib/url.ts", "qualifiedName": "T" }, - "78": { + "233": { "sourceFileName": "lib/url.ts", "qualifiedName": "U" }, - "79": { + "234": { "sourceFileName": "lib/url.ts", "qualifiedName": "url" }, - "80": { + "235": { "sourceFileName": "lib/url.ts", "qualifiedName": "objectToQueryString" }, - "81": { + "236": { "sourceFileName": "lib/url.ts", "qualifiedName": "objectToQueryString" }, - "82": { + "237": { "sourceFileName": "lib/url.ts", "qualifiedName": "T" }, - "83": { + "238": { "sourceFileName": "lib/url.ts", "qualifiedName": "input" }, - "84": { + "239": { "sourceFileName": "lib/url.ts", "qualifiedName": "convertParamsRouterToRegExp" }, - "85": { + "240": { "sourceFileName": "lib/url.ts", "qualifiedName": "convertParamsRouterToRegExp" }, - "86": { + "241": { "sourceFileName": "lib/url.ts", "qualifiedName": "path" }, - "87": { + "242": { "sourceFileName": "lib/url.ts", "qualifiedName": "basename" }, - "88": { + "243": { "sourceFileName": "lib/url.ts", "qualifiedName": "basename" }, - "89": { + "244": { "sourceFileName": "lib/url.ts", "qualifiedName": "path" }, - "90": { + "245": { "sourceFileName": "lib/url.ts", "qualifiedName": "suffix" }, - "91": { + "246": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isObject" }, - "92": { + "247": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isObject" }, - "93": { + "248": { "sourceFileName": "lib/validate.ts", "qualifiedName": "val" }, - "94": { + "249": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isSymbol" }, - "95": { + "250": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isSymbol" }, - "96": { + "251": { "sourceFileName": "lib/validate.ts", "qualifiedName": "val" }, - "97": { + "252": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isFn" }, - "98": { + "253": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isFn" }, - "99": { + "254": { "sourceFileName": "lib/validate.ts", "qualifiedName": "val" }, - "100": { + "255": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isStr" }, - "101": { + "256": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isStr" }, - "102": { + "257": { "sourceFileName": "lib/validate.ts", "qualifiedName": "val" }, - "103": { + "258": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isBool" }, - "104": { + "259": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isBool" }, - "105": { + "260": { "sourceFileName": "lib/validate.ts", "qualifiedName": "val" }, - "106": { + "261": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isUndef" }, - "107": { + "262": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isUndef" }, - "108": { + "263": { "sourceFileName": "lib/validate.ts", "qualifiedName": "val" }, - "109": { + "264": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isNull" }, - "110": { + "265": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isNull" }, - "111": { + "266": { "sourceFileName": "lib/validate.ts", "qualifiedName": "val" }, - "112": { + "267": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isPrimitive" }, - "113": { + "268": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isPrimitive" }, - "114": { + "269": { "sourceFileName": "lib/validate.ts", "qualifiedName": "val" }, - "115": { + "270": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isFalsy" }, - "116": { + "271": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isFalsy" }, - "117": { + "272": { "sourceFileName": "lib/validate.ts", "qualifiedName": "val" }, - "118": { + "273": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isNumber" }, - "119": { + "274": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isNumber" }, - "120": { + "275": { "sourceFileName": "lib/validate.ts", "qualifiedName": "val" }, - "121": { + "276": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isEffectiveNumber" }, - "122": { + "277": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isEffectiveNumber" }, - "123": { + "278": { "sourceFileName": "lib/validate.ts", "qualifiedName": "val" }, - "124": { + "279": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isPromise" }, - "125": { + "280": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isPromise" }, - "126": { + "281": { "sourceFileName": "lib/validate.ts", "qualifiedName": "val" }, - "127": { + "282": { "sourceFileName": "lib/validate.ts", "qualifiedName": "hasOwn" }, - "128": { + "283": { "sourceFileName": "lib/validate.ts", "qualifiedName": "hasOwn" }, - "129": { + "284": { "sourceFileName": "lib/validate.ts", "qualifiedName": "obj" }, - "130": { + "285": { "sourceFileName": "lib/validate.ts", "qualifiedName": "prop" }, - "131": { + "286": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isValidArray" }, - "132": { + "287": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isValidArray" }, - "133": { + "288": { "sourceFileName": "lib/validate.ts", "qualifiedName": "arr" }, - "134": { + "289": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isPropertyKey" }, - "135": { + "290": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isPropertyKey" }, - "136": { + "291": { "sourceFileName": "lib/validate.ts", "qualifiedName": "val" }, - "137": { + "292": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isValidDate" }, - "138": { + "293": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isValidDate" }, - "139": { + "294": { "sourceFileName": "lib/validate.ts", "qualifiedName": "date" }, - "140": { + "295": { + "sourceFileName": "lib/validate.ts", + "qualifiedName": "isMobile" + }, + "296": { + "sourceFileName": "lib/validate.ts", + "qualifiedName": "isMobile" + }, + "297": { + "sourceFileName": "lib/validate.ts", + "qualifiedName": "ua" + }, + "298": { "sourceFileName": "lib/validate.ts", "qualifiedName": "_toString" }, - "141": { - "sourceFileName": "node_modules/.pnpm/typescript@5.5.4/node_modules/typescript/lib/lib.es5.d.ts", + "299": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", "qualifiedName": "_toString" }, - "142": { + "300": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isNil" }, - "143": { + "301": { "sourceFileName": "lib/validate.ts", "qualifiedName": "isNil" }, - "144": { + "302": { "sourceFileName": "lib/validate.ts", "qualifiedName": "val" }, - "145": { + "303": { "sourceFileName": "lib/workers.ts", "qualifiedName": "executeConcurrency" }, - "146": { + "304": { "sourceFileName": "lib/workers.ts", "qualifiedName": "executeConcurrency" }, - "147": { + "305": { "sourceFileName": "lib/workers.ts", "qualifiedName": "tasks" }, - "148": { + "306": { "sourceFileName": "lib/workers.ts", "qualifiedName": "maxConcurrency" }, - "149": { + "307": { "sourceFileName": "lib/workers.ts", "qualifiedName": "executeQueue" }, - "150": { + "308": { "sourceFileName": "lib/workers.ts", "qualifiedName": "executeQueue" }, - "151": { + "309": { "sourceFileName": "lib/workers.ts", "qualifiedName": "taskArray" }, - "152": { + "310": { "sourceFileName": "lib/workers.ts", "qualifiedName": "__type" }, - "153": { + "311": { "sourceFileName": "lib/workers.ts", "qualifiedName": "__type" }, - "154": { + "312": { "sourceFileName": "lib/workers.ts", "qualifiedName": "args" }, - "155": { + "313": { "sourceFileName": "lib/workers.ts", "qualifiedName": "pipe" }, - "156": { + "314": { "sourceFileName": "lib/workers.ts", "qualifiedName": "pipe" }, - "157": { + "315": { "sourceFileName": "lib/workers.ts", "qualifiedName": "fns" }, - "158": { + "316": { "sourceFileName": "lib/workers.ts", "qualifiedName": "__function" }, - "159": { + "317": { "sourceFileName": "lib/workers.ts", "qualifiedName": "__function" }, - "160": { + "318": { "sourceFileName": "lib/workers.ts", "qualifiedName": "args" }, - "161": { + "319": { "sourceFileName": "lib/workers.ts", "qualifiedName": "compose" }, - "162": { + "320": { "sourceFileName": "lib/workers.ts", "qualifiedName": "compose" }, - "163": { + "321": { "sourceFileName": "lib/workers.ts", "qualifiedName": "fns" }, - "164": { + "322": { "sourceFileName": "lib/workers.ts", "qualifiedName": "__function" }, - "165": { + "323": { "sourceFileName": "lib/workers.ts", "qualifiedName": "__function" }, - "166": { + "324": { "sourceFileName": "lib/workers.ts", "qualifiedName": "args" }, - "167": { + "325": { "sourceFileName": "lib/workers.ts", "qualifiedName": "setintervalByTimeout" }, - "168": { + "326": { "sourceFileName": "lib/workers.ts", "qualifiedName": "setintervalByTimeout" }, - "169": { + "327": { "sourceFileName": "lib/workers.ts", "qualifiedName": "func" }, - "170": { + "328": { "sourceFileName": "lib/workers.ts", "qualifiedName": "delay" }, - "171": { + "329": { "sourceFileName": "lib/workers.ts", "qualifiedName": "__function" }, - "172": { + "330": { "sourceFileName": "lib/workers.ts", "qualifiedName": "__function" }, - "173": { + "331": { "sourceFileName": "lib/workers.ts", "qualifiedName": "setIntervalByTimeout" }, - "174": { + "332": { "sourceFileName": "lib/workers.ts", "qualifiedName": "setIntervalByTimeout" }, - "175": { + "333": { "sourceFileName": "lib/workers.ts", "qualifiedName": "func" }, - "176": { + "334": { "sourceFileName": "lib/workers.ts", "qualifiedName": "delay" }, - "177": { + "335": { "sourceFileName": "lib/workers.ts", "qualifiedName": "__function" }, - "178": { + "336": { "sourceFileName": "lib/workers.ts", "qualifiedName": "__function" }, - "179": { + "337": { + "sourceFileName": "lib/workers.ts", + "qualifiedName": "awaitTo" + }, + "338": { + "sourceFileName": "lib/workers.ts", + "qualifiedName": "awaitTo" + }, + "339": { + "sourceFileName": "lib/workers.ts", + "qualifiedName": "T" + }, + "340": { + "sourceFileName": "lib/workers.ts", + "qualifiedName": "promise" + }, + "341": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "HTTP_STATUS" }, - "180": { + "342": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object" }, - "181": { + "343": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.CONTINUE" }, - "182": { + "344": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.SWITCHING_PROTOCOLS" }, - "183": { + "345": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.PROCESSING" }, - "184": { + "346": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.EARLYHINTS" }, - "185": { + "347": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.OK" }, - "186": { + "348": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.CREATED" }, - "187": { + "349": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.ACCEPTED" }, - "188": { + "350": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.NON_AUTHORITATIVE_INFORMATION" }, - "189": { + "351": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.NO_CONTENT" }, - "190": { + "352": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.RESET_CONTENT" }, - "191": { + "353": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.PARTIAL_CONTENT" }, - "192": { + "354": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.AMBIGUOUS" }, - "193": { + "355": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.MOVED_PERMANENTLY" }, - "194": { + "356": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.FOUND" }, - "195": { + "357": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.SEE_OTHER" }, - "196": { + "358": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.NOT_MODIFIED" }, - "197": { + "359": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.TEMPORARY_REDIRECT" }, - "198": { + "360": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.PERMANENT_REDIRECT" }, - "199": { + "361": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.BAD_REQUEST" }, - "200": { + "362": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.UNAUTHORIZED" }, - "201": { + "363": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.PAYMENT_REQUIRED" }, - "202": { + "364": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.FORBIDDEN" }, - "203": { + "365": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.NOT_FOUND" }, - "204": { + "366": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.METHOD_NOT_ALLOWED" }, - "205": { + "367": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.NOT_ACCEPTABLE" }, - "206": { + "368": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.PROXY_AUTHENTICATION_REQUIRED" }, - "207": { + "369": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.REQUEST_TIMEOUT" }, - "208": { + "370": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.CONFLICT" }, - "209": { + "371": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.GONE" }, - "210": { + "372": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.LENGTH_REQUIRED" }, - "211": { + "373": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.PRECONDITION_FAILED" }, - "212": { + "374": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.PAYLOAD_TOO_LARGE" }, - "213": { + "375": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.URI_TOO_LONG" }, - "214": { + "376": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.UNSUPPORTED_MEDIA_TYPE" }, - "215": { + "377": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.REQUESTED_RANGE_NOT_SATISFIABLE" }, - "216": { + "378": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.EXPECTATION_FAILED" }, - "217": { + "379": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.I_AM_A_TEAPOT" }, - "218": { + "380": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.MISDIRECTED" }, - "219": { + "381": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.UNPROCESSABLE_ENTITY" }, - "220": { + "382": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.FAILED_DEPENDENCY" }, - "221": { + "383": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.PRECONDITION_REQUIRED" }, - "222": { + "384": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.TOO_MANY_REQUESTS" }, - "223": { + "385": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.INTERNAL_SERVER_ERROR" }, - "224": { + "386": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.NOT_IMPLEMENTED" }, - "225": { + "387": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.BAD_GATEWAY" }, - "226": { + "388": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.SERVICE_UNAVAILABLE" }, - "227": { + "389": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.GATEWAY_TIMEOUT" }, - "228": { + "390": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.HTTP_VERSION_NOT_SUPPORTED" }, - "229": { + "391": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "REQUEST_METHOD" }, - "230": { + "392": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object" }, - "231": { + "393": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.GET" }, - "232": { + "394": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.POST" }, - "233": { + "395": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.PUT" }, - "234": { + "396": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.DELETE" }, - "235": { + "397": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.PATCH" }, - "236": { + "398": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.ALL" }, - "237": { + "399": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.OPTIONS" }, - "238": { + "400": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.HEAD" }, - "239": { + "401": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.SEARCH" }, - "240": { + "402": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "MIME_TYPES" }, - "241": { + "403": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object" }, - "242": { + "404": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.TXT" }, - "243": { + "405": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.HTML" }, - "244": { + "406": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.HTM" }, - "245": { + "407": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.CSS" }, - "246": { + "408": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.CSV" }, - "247": { + "409": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.XML" }, - "248": { + "410": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.JSON" }, - "249": { + "411": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.JAVASCRIPT" }, - "250": { + "412": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.PNG" }, - "251": { + "413": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.JPG" }, - "252": { + "414": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.JPEG" }, - "253": { + "415": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.GIF" }, - "254": { + "416": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.BMP" }, - "255": { + "417": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.WEBP" }, - "256": { + "418": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.SVG" }, - "257": { + "419": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.ICO" }, - "258": { + "420": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.MP3" }, - "259": { + "421": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.WAV" }, - "260": { + "422": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.OGG" }, - "261": { + "423": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.M4A" }, - "262": { + "424": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.FLAC" }, - "263": { + "425": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.MP4" }, - "264": { + "426": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.AVI" }, - "265": { + "427": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.MOV" }, - "266": { + "428": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.WMV" }, - "267": { + "429": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.FLV" }, - "268": { + "430": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.WEBM" }, - "269": { + "431": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.MKV" }, - "270": { + "432": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.ZIP" }, - "271": { + "433": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.RAR" }, - "272": { + "434": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.7Z" }, - "273": { + "435": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.TAR" }, - "274": { + "436": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.GZ" }, - "275": { + "437": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.BZ2" }, - "276": { + "438": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.PDF" }, - "277": { + "439": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.DOC" }, - "278": { + "440": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.DOT" }, - "279": { + "441": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.DOCX" }, - "280": { + "442": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.DOTX" }, - "281": { + "443": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.XLS" }, - "282": { + "444": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.XLT" }, - "283": { + "445": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.XLSX" }, - "284": { + "446": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.XLSM" }, - "285": { + "447": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.PPT" }, - "286": { + "448": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.POT" }, - "287": { + "449": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.PPTX" }, - "288": { + "450": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.POTX" }, - "289": { + "451": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.PPSX" }, - "290": { + "452": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.EXE" }, - "291": { + "453": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.DLL" }, - "292": { + "454": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.MSI" }, - "293": { + "455": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.BAT" }, - "294": { + "456": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.WOFF" }, - "295": { + "457": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.WOFF2" }, - "296": { + "458": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.TTF" }, - "297": { + "459": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.OTF" }, - "298": { + "460": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.EOT" }, - "299": { + "461": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.JSONLD" }, - "300": { + "462": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.MAP" }, - "301": { + "463": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.WASM" }, - "302": { + "464": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.TS" }, - "303": { + "465": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.MPD" }, - "304": { + "466": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.M3U8" }, - "305": { + "467": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.TORRENT" }, - "306": { + "468": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.SWF" }, - "307": { + "469": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.EPUB" }, - "308": { + "470": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.APK" }, - "309": { + "471": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.DMG" }, - "310": { + "472": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.EML" }, - "311": { + "473": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.MSG" }, - "312": { + "474": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.DWG" }, - "313": { + "475": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.DXF" }, - "314": { + "476": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.OBJ" }, - "315": { + "477": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.STL" }, - "316": { + "478": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.PY" }, - "317": { + "479": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.JAVA" }, - "318": { + "480": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.C" }, - "319": { + "481": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.CPP" }, - "320": { + "482": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.CS" }, - "321": { + "483": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.RB" }, - "322": { + "484": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.GO" }, - "323": { + "485": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.PHP" }, - "324": { + "486": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.SWIFT" }, - "325": { + "487": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.KT" }, - "326": { + "488": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.RTF" }, - "327": { + "489": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.ALZ" }, - "328": { + "490": { "sourceFileName": "lib/const/http.ts", "qualifiedName": "__object.7ZIP" }, - "329": { + "491": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger" }, - "330": { + "492": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger.__constructor" }, - "331": { + "493": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger" }, - "332": { + "494": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "level" }, - "333": { + "495": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger.level" }, - "334": { + "496": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger.setLevel" }, - "335": { + "497": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger.setLevel" }, - "336": { + "498": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "level" }, - "337": { + "499": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger.log" }, - "338": { + "500": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger.log" }, - "339": { + "501": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "level" }, - "340": { + "502": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "message" }, - "341": { + "503": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger.error" }, - "342": { + "504": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger.error" }, - "343": { + "505": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "message" }, - "344": { + "506": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger.warn" }, - "345": { + "507": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger.warn" }, - "346": { + "508": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "message" }, - "347": { + "509": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger.info" }, - "348": { + "510": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger.info" }, - "349": { + "511": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "message" }, - "350": { + "512": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger.debug" }, - "351": { + "513": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger.debug" }, - "352": { + "514": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "message" }, - "353": { + "515": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger.trace" }, - "354": { + "516": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger.trace" }, - "355": { + "517": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "message" }, - "356": { + "518": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger.start" }, - "357": { + "519": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger.start" }, - "358": { + "520": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "message" }, - "359": { + "521": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger.success" }, - "360": { + "522": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "Logger.success" }, - "361": { + "523": { "sourceFileName": "lib/log/index.ts", "qualifiedName": "message" }, - "362": { + "524": { "sourceFileName": "lib/error-handler.ts", "qualifiedName": "formatErrorToString" }, - "363": { + "525": { "sourceFileName": "lib/error-handler.ts", "qualifiedName": "formatErrorToString" }, - "364": { + "526": { "sourceFileName": "lib/error-handler.ts", "qualifiedName": "error" }, - "365": { + "527": { "sourceFileName": "lib/error-handler.ts", "qualifiedName": "defaultErrorString" }, - "366": { + "528": { "sourceFileName": "lib/error-handler.ts", "qualifiedName": "opts" }, - "367": { + "529": { "sourceFileName": "lib/error-handler.ts", "qualifiedName": "__object" }, - "368": { + "530": { "sourceFileName": "lib/error-handler.ts", "qualifiedName": "__object.errorLimit" }, - "369": { + "531": { "sourceFileName": "lib/error-handler.ts", "qualifiedName": "invokeWithErrorHandlingFactory" }, - "370": { + "532": { "sourceFileName": "lib/error-handler.ts", "qualifiedName": "invokeWithErrorHandlingFactory" }, - "371": { + "533": { "sourceFileName": "lib/error-handler.ts", "qualifiedName": "handleError" }, - "372": { + "534": { "sourceFileName": "lib/error-handler.ts", "qualifiedName": "__function" }, - "373": { + "535": { "sourceFileName": "lib/error-handler.ts", "qualifiedName": "__function" }, - "374": { + "536": { "sourceFileName": "lib/error-handler.ts", "qualifiedName": "handler" }, - "375": { + "537": { "sourceFileName": "lib/error-handler.ts", "qualifiedName": "context" }, - "376": { + "538": { "sourceFileName": "lib/error-handler.ts", "qualifiedName": "args" } diff --git a/docs/functions/_toString.html b/docs/functions/_toString.html index 6c47fc15..989efbf6 100644 --- a/docs/functions/_toString.html +++ b/docs/functions/_toString.html @@ -1,2 +1,2 @@ _toString | @cc-heart/utils

Function _toString

  • Returns a string representation of an object.

    -

    Returns string

\ No newline at end of file +

Returns string

\ No newline at end of file diff --git a/docs/functions/awaitTo.html b/docs/functions/awaitTo.html new file mode 100644 index 00000000..a9a93ffc --- /dev/null +++ b/docs/functions/awaitTo.html @@ -0,0 +1,6 @@ +awaitTo | @cc-heart/utils

Function awaitTo

  • A helper function that wraps a Promise and returns a tuple of [error, data]. +If the Promise resolves successfully, the first element of the tuple will be null, and the second element will be the resolved value. +If the Promise is rejected, the first element of the tuple will be the error, and the second element will be undefined.

    +

    Type Parameters

    • T

    Parameters

    • promise: Promise<T>

      The Promise to wrap.

      +

    Returns Promise<[unknown, undefined | T]>

    A Promise that resolves to a tuple of [error, data].

    +
\ No newline at end of file diff --git a/docs/functions/basename.html b/docs/functions/basename.html index 4cc7faee..817fcbe3 100644 --- a/docs/functions/basename.html +++ b/docs/functions/basename.html @@ -4,4 +4,4 @@

Parameters

  • path: string

    The path to get the basename from.

  • Optional suffix: string

    An optional suffix to remove from the basename.

Returns string

The basename of the path.

-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/capitalize.html b/docs/functions/capitalize.html index 7824225b..7da23cdb 100644 --- a/docs/functions/capitalize.html +++ b/docs/functions/capitalize.html @@ -3,4 +3,4 @@

Returns Capitalize<T>

  • The capitalized string.
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/compose.html b/docs/functions/compose.html index 3b88074a..d540bb42 100644 --- a/docs/functions/compose.html +++ b/docs/functions/compose.html @@ -2,4 +2,4 @@ If a function returns a Promise, the next function is called with the resolved value.

Parameters

  • Rest ...fns: Fn[]

    The functions to compose.

Returns ((...args) => any)

A new function that takes any number of arguments and composes them through fns.

-
    • (...args): any
    • Parameters

      • Rest ...args: any[]

      Returns any

\ No newline at end of file +
    • (...args): any
    • Parameters

      • Rest ...args: any[]

      Returns any

\ No newline at end of file diff --git a/docs/functions/convertParamsRouterToRegExp.html b/docs/functions/convertParamsRouterToRegExp.html index 9a2b9c67..dff0a394 100644 --- a/docs/functions/convertParamsRouterToRegExp.html +++ b/docs/functions/convertParamsRouterToRegExp.html @@ -1,4 +1,4 @@ convertParamsRouterToRegExp | @cc-heart/utils

Function convertParamsRouterToRegExp

  • convert params routes to regular expressions

    Parameters

    • path: string

      a params paths

    Returns null | (RegExp | string[])[]

    null or An array contains the RegExp that matches the params and the path for each params parameter

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/defineDebounceFn.html b/docs/functions/defineDebounceFn.html index 654f1efc..f9e3e522 100644 --- a/docs/functions/defineDebounceFn.html +++ b/docs/functions/defineDebounceFn.html @@ -5,4 +5,4 @@

Returns any

  • The debounce function.
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/defineOnceFn.html b/docs/functions/defineOnceFn.html index 93520c79..d3250323 100644 --- a/docs/functions/defineOnceFn.html +++ b/docs/functions/defineOnceFn.html @@ -3,4 +3,4 @@
    • (...args): T
    • Parameters

      • Rest ...args: any

      Returns T

Returns ((this, ...args) => T)

  • A new function that can only be called once.
-
    • (this, ...args): T
    • Parameters

      • this: any
      • Rest ...args: any

      Returns T

\ No newline at end of file +
    • (this, ...args): T
    • Parameters

      • this: any
      • Rest ...args: any

      Returns T

\ No newline at end of file diff --git a/docs/functions/defineSinglePromiseFn.html b/docs/functions/defineSinglePromiseFn.html index e135b3c4..a554a929 100644 --- a/docs/functions/defineSinglePromiseFn.html +++ b/docs/functions/defineSinglePromiseFn.html @@ -2,4 +2,4 @@ If the function is invoked while it's still executing, it returns the same promise, avoiding multiple calls.

Parameters

  • fn: Fn

    The function to be wrapped, which returns a promise.

Returns (() => Promise<any>)

A function that ensures the provided function is only executed once and returns a promise.

-
    • (): Promise<any>
    • Returns Promise<any>

\ No newline at end of file +
    • (): Promise<any>
    • Returns Promise<any>

\ No newline at end of file diff --git a/docs/functions/defineThrottleFn.html b/docs/functions/defineThrottleFn.html index afac8e9a..79002b15 100644 --- a/docs/functions/defineThrottleFn.html +++ b/docs/functions/defineThrottleFn.html @@ -2,4 +2,4 @@

Parameters

  • fn: Fn
  • delay: number = 500

Returns CacheResultFunc

  • The throttled function.
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/executeConcurrency.html b/docs/functions/executeConcurrency.html index 262554e6..ba63845c 100644 --- a/docs/functions/executeConcurrency.html +++ b/docs/functions/executeConcurrency.html @@ -1 +1 @@ -executeConcurrency | @cc-heart/utils

Function executeConcurrency

  • Parameters

    • tasks: Fn[]
    • maxConcurrency: number

    Returns Promise<null | any[]>

\ No newline at end of file +executeConcurrency | @cc-heart/utils

Function executeConcurrency

  • Parameters

    • tasks: Fn[]
    • maxConcurrency: number

    Returns Promise<null | any[]>

\ No newline at end of file diff --git a/docs/functions/executeQueue.html b/docs/functions/executeQueue.html index 1845b17e..b0ab10f7 100644 --- a/docs/functions/executeQueue.html +++ b/docs/functions/executeQueue.html @@ -3,4 +3,4 @@

Returns Promise<void>

  • A promise that resolves when all tasks are completed.
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/formatDate.html b/docs/functions/formatDate.html index 4c6b932b..a181fef2 100644 --- a/docs/functions/formatDate.html +++ b/docs/functions/formatDate.html @@ -5,4 +5,4 @@

Returns string

The formatted date string

Example

const date = new Date(2024, 0, 1, 12, 30, 45);
formatDate(date, 'YYYY-MM-DD hh:mm:ss'); // Returns "2024-01-01 12:30:45"
formatDate(date, 'DD/MM/YYYY', true); // Returns "01/01/2024" in UTC
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/formatDateByArray.html b/docs/functions/formatDateByArray.html index 402bbe50..01fdcaea 100644 --- a/docs/functions/formatDateByArray.html +++ b/docs/functions/formatDateByArray.html @@ -9,4 +9,4 @@

Throws

Throws an error if the array is invalid or does not contain the necessary values.

Example

const dateArray = [2024, 2, 19, 10, 30, 0];
const formattedDate = formatDateByArray(dateArray, 'MMMM D, YYYY, h:mm A');
console.log(formattedDate);
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/formatDateByTimeStamp.html b/docs/functions/formatDateByTimeStamp.html index 7fc1687d..28bd48de 100644 --- a/docs/functions/formatDateByTimeStamp.html +++ b/docs/functions/formatDateByTimeStamp.html @@ -5,4 +5,4 @@

Throws

Throws an error if the timestamp is invalid or out of range.

Example

const timestamp = new Date().getTime();
const formattedDate = formatDateByTimeStamp(timestamp);
console.log(formattedDate);
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/formatDateTimeByString.html b/docs/functions/formatDateTimeByString.html index 7411a8a8..3a146b23 100644 --- a/docs/functions/formatDateTimeByString.html +++ b/docs/functions/formatDateTimeByString.html @@ -5,4 +5,4 @@

Throws

Throws an error if the date string is invalid or cannot be parsed into a Date object.

Example

const dateString = '2024-02-19T10:30:00Z';
const formattedDateTime = formatDateTimeByString(dateString, 'MMMM D, YYYY, h:mm A');
console.log(formattedDateTime);
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/formatErrorToString.html b/docs/functions/formatErrorToString.html index c0f76025..31f6ef20 100644 --- a/docs/functions/formatErrorToString.html +++ b/docs/functions/formatErrorToString.html @@ -4,4 +4,4 @@
  • Optional opts: {
        errorLimit: number;
    } = ...

    Additional options.

    • errorLimit: number

      The maximum number of stack trace lines to include.

  • Returns string

    The formatted error message.

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/getCurrentTimeISOString.html b/docs/functions/getCurrentTimeISOString.html index c197b169..1a646511 100644 --- a/docs/functions/getCurrentTimeISOString.html +++ b/docs/functions/getCurrentTimeISOString.html @@ -1,3 +1,3 @@ getCurrentTimeISOString | @cc-heart/utils

    Function getCurrentTimeISOString

    • Returns the current time in ISO string format.

      Returns string

      The current time in ISO string format.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/hasOwn.html b/docs/functions/hasOwn.html index f7d7a341..b2a8fa5a 100644 --- a/docs/functions/hasOwn.html +++ b/docs/functions/hasOwn.html @@ -2,4 +2,4 @@

    Parameters

    • obj: object

      The object to check.

    • prop: PropertyKey

      The property to check.

    Returns boolean

    Returns true if the object has its own property, otherwise false.

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/invokeWithErrorHandlingFactory.html b/docs/functions/invokeWithErrorHandlingFactory.html index c0ac923b..1b54e264 100644 --- a/docs/functions/invokeWithErrorHandlingFactory.html +++ b/docs/functions/invokeWithErrorHandlingFactory.html @@ -3,4 +3,4 @@

    Returns ((handler, context?, args?) => any)

    Returns a new function that can execute target functions with automatic error handling

      • (handler, context?, args?): any
      • Parameters

        • handler: Fn
        • Optional context: unknown
        • Optional args: unknown[]

        Returns any

    Example

    const errorHandler = (error) => console.error(error);
    const safeExecute = invokeWithErrorHandlingFactory(errorHandler);

    // Execute regular function
    safeExecute(() => { throw new Error('test') });

    // Execute async function
    safeExecute(async () => { throw new Error('async test') });
    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/isBool.html b/docs/functions/isBool.html index bb4dcaab..62076a0f 100644 --- a/docs/functions/isBool.html +++ b/docs/functions/isBool.html @@ -1,4 +1,4 @@ isBool | @cc-heart/utils

    Function isBool

    • Checks if the provided value is a boolean.

      Parameters

      • val: unknown

        The value to check.

      Returns val is boolean

      Returns true if the value is a boolean, false otherwise.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/isEffectiveNumber.html b/docs/functions/isEffectiveNumber.html index 9f99ecbc..ab3913e4 100644 --- a/docs/functions/isEffectiveNumber.html +++ b/docs/functions/isEffectiveNumber.html @@ -1,2 +1,2 @@ isEffectiveNumber | @cc-heart/utils

    Function isEffectiveNumber

    • determines if it is a valid value other than NaN

      -

      Parameters

      • val: unknown

      Returns val is number

    \ No newline at end of file +

    Parameters

    • val: unknown

    Returns val is number

    \ No newline at end of file diff --git a/docs/functions/isFalsy.html b/docs/functions/isFalsy.html index 4739641c..3b94799b 100644 --- a/docs/functions/isFalsy.html +++ b/docs/functions/isFalsy.html @@ -1,4 +1,4 @@ isFalsy | @cc-heart/utils

    Function isFalsy

    • Checks if a value is falsy.

      Parameters

      • val: unknown

        The value to check.

      Returns val is false

      Returns true if the value is falsy, otherwise false.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/isFn.html b/docs/functions/isFn.html index f5e9f0c0..4ce0a079 100644 --- a/docs/functions/isFn.html +++ b/docs/functions/isFn.html @@ -1,4 +1,4 @@ isFn | @cc-heart/utils

    Function isFn

    • Checks if the given value is a function.

      Parameters

      • val: unknown

        The value to be checked.

      Returns val is Function

      Returns true if the value is a function, false otherwise.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/isMobile.html b/docs/functions/isMobile.html new file mode 100644 index 00000000..bda759d9 --- /dev/null +++ b/docs/functions/isMobile.html @@ -0,0 +1,4 @@ +isMobile | @cc-heart/utils

    Function isMobile

    • Determines whether the provided user agent string belongs to a mobile device.

      +

      Parameters

      • Optional ua: string

        The user agent string to check.

        +

      Returns boolean

      Returns true if the UA indicates a mobile device, otherwise false.

      +
    \ No newline at end of file diff --git a/docs/functions/isNil.html b/docs/functions/isNil.html index 0a006d8d..7df6f24d 100644 --- a/docs/functions/isNil.html +++ b/docs/functions/isNil.html @@ -1,4 +1,4 @@ isNil | @cc-heart/utils

    Function isNil

    • Checks if the given value is null.

      Parameters

      • val: unknown

        The value to check.

      Returns val is null

      Returns true if the value is null, false otherwise.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/isNull.html b/docs/functions/isNull.html index 0b3dd9f9..046249c5 100644 --- a/docs/functions/isNull.html +++ b/docs/functions/isNull.html @@ -1,4 +1,4 @@ isNull | @cc-heart/utils

    Function isNull

    • Checks if the given value is null.

      Parameters

      • val: unknown

        The value to check.

      Returns val is null

      Returns true if the value is null, false otherwise.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/isNumber.html b/docs/functions/isNumber.html index f66dd035..399c050a 100644 --- a/docs/functions/isNumber.html +++ b/docs/functions/isNumber.html @@ -1,4 +1,4 @@ isNumber | @cc-heart/utils

    Function isNumber

    • Checks if the given value is a number.

      Parameters

      • val: unknown

        The value to be checked.

      Returns val is number

      Returns true if the value is a number, false otherwise.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/isObject.html b/docs/functions/isObject.html index c75b2d15..080afc73 100644 --- a/docs/functions/isObject.html +++ b/docs/functions/isObject.html @@ -1,4 +1,4 @@ isObject | @cc-heart/utils

    Function isObject

    • Checks if the given value is an object.

      Parameters

      • val: unknown

        The value to be checked.

      Returns val is object

      Returns true if the value is an object, otherwise false.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/isPrimitive.html b/docs/functions/isPrimitive.html index fe1ad88d..2a0d924e 100644 --- a/docs/functions/isPrimitive.html +++ b/docs/functions/isPrimitive.html @@ -1,4 +1,4 @@ isPrimitive | @cc-heart/utils

    Function isPrimitive

    • Determines whether a value is a primitive.

      Parameters

      • val: unknown

        The value to check.

      Returns boolean

      Returns true if the value is a primitive, false otherwise.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/isPromise.html b/docs/functions/isPromise.html index b0c5db70..ded87a62 100644 --- a/docs/functions/isPromise.html +++ b/docs/functions/isPromise.html @@ -1,4 +1,4 @@ isPromise | @cc-heart/utils

    Function isPromise

    • Checks if a value is a Promise.

      Parameters

      • val: unknown

        The value to check.

      Returns val is Promise<unknown>

      Returns true if the value is a Promise, else false.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/isPropertyKey.html b/docs/functions/isPropertyKey.html index 0c999f31..3653c5d8 100644 --- a/docs/functions/isPropertyKey.html +++ b/docs/functions/isPropertyKey.html @@ -2,4 +2,4 @@ A PropertyKey is a string, number, or symbol that can be used as a property name.

    Parameters

    • val: unknown

      The value to check.

    Returns val is PropertyKey

    True if the value is a PropertyKey, false otherwise.

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/isStr.html b/docs/functions/isStr.html index be3bb958..913944ad 100644 --- a/docs/functions/isStr.html +++ b/docs/functions/isStr.html @@ -1,4 +1,4 @@ isStr | @cc-heart/utils

    Function isStr

    • Checks if the given value is a string.

      Parameters

      • val: unknown

        The value to be checked.

      Returns val is string

      Returns true if the value is a string, false otherwise.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/isSymbol.html b/docs/functions/isSymbol.html index ad46c267..0ee9ea7b 100644 --- a/docs/functions/isSymbol.html +++ b/docs/functions/isSymbol.html @@ -1,4 +1,4 @@ isSymbol | @cc-heart/utils

    Function isSymbol

    • Checks if the given value is an symbol.

      Parameters

      • val: unknown

        The value to be checked.

      Returns val is symbol

      Returns true if the value is an object, otherwise false.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/isUndef.html b/docs/functions/isUndef.html index 61ad6af0..eb649e00 100644 --- a/docs/functions/isUndef.html +++ b/docs/functions/isUndef.html @@ -1,4 +1,4 @@ isUndef | @cc-heart/utils

    Function isUndef

    • Checks if a value is undefined.

      Parameters

      • val: unknown

        The value to check.

      Returns val is undefined

      Returns true if the value is undefined, otherwise false.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/isValidArray.html b/docs/functions/isValidArray.html index 27e42b3b..26718b12 100644 --- a/docs/functions/isValidArray.html +++ b/docs/functions/isValidArray.html @@ -1,4 +1,4 @@ isValidArray | @cc-heart/utils

    Function isValidArray

    • An array is considered valid if it is an array and its length is greater than or equal to 0.

      Parameters

      • arr: unknown[]

        The array to be checked.

      Returns boolean

      Returns true if the array is valid, false otherwise.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/isValidDate.html b/docs/functions/isValidDate.html index 8bbfa918..70727b43 100644 --- a/docs/functions/isValidDate.html +++ b/docs/functions/isValidDate.html @@ -1,4 +1,4 @@ isValidDate | @cc-heart/utils

    Function isValidDate

    • Checks if a given date is valid.

      Parameters

      • date: Date

        The date to check.

      Returns boolean

      True if the date is valid, false otherwise.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/mulSplit.html b/docs/functions/mulSplit.html index 97804a6b..06da7ec8 100644 --- a/docs/functions/mulSplit.html +++ b/docs/functions/mulSplit.html @@ -3,4 +3,4 @@
  • num: number = -1

    split limit

  • Returns string[]

    a new split array, length is num + 1

    Description

    Add the number of cuts based on the original split and return all subsets after the cut

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/noop.html b/docs/functions/noop.html index 3f78e43b..cbaa1151 100644 --- a/docs/functions/noop.html +++ b/docs/functions/noop.html @@ -1,3 +1,3 @@ noop | @cc-heart/utils

    Function noop

    • This function does nothing.

      Returns void

      No return value.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/objectToQueryString.html b/docs/functions/objectToQueryString.html index 61e2ef62..1d1d355f 100644 --- a/docs/functions/objectToQueryString.html +++ b/docs/functions/objectToQueryString.html @@ -1,3 +1,3 @@ objectToQueryString | @cc-heart/utils

    Function objectToQueryString

    • Converts an object to a query string.

      Type Parameters

      • T extends Record<PropertyKey, any>

      Parameters

      • input: T

      Returns string

      The query string representation of data.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/parseKey.html b/docs/functions/parseKey.html index b7dc626c..406b6f2b 100644 --- a/docs/functions/parseKey.html +++ b/docs/functions/parseKey.html @@ -1 +1 @@ -parseKey | @cc-heart/utils

    Function parseKey

    • Parameters

      • obj: Record<PropertyKey, any>
      • key: string
      • value: any

      Returns void

    \ No newline at end of file +parseKey | @cc-heart/utils

    Function parseKey

    • Parameters

      • obj: Record<PropertyKey, any>
      • key: string
      • value: any

      Returns void

    \ No newline at end of file diff --git a/docs/functions/pipe.html b/docs/functions/pipe.html index cf8292c7..d7244053 100644 --- a/docs/functions/pipe.html +++ b/docs/functions/pipe.html @@ -2,4 +2,4 @@ If a function returns a Promise, the next function is called with the resolved value.

    Parameters

    • Rest ...fns: Fn[]

      The functions to pipe.

    Returns ((...args) => any)

    A new function that takes any number of arguments and pipes them through fns.

    -
      • (...args): any
      • Parameters

        • Rest ...args: any[]

        Returns any

    \ No newline at end of file +
      • (...args): any
      • Parameters

        • Rest ...args: any[]

        Returns any

    \ No newline at end of file diff --git a/docs/functions/queryStringToObject.html b/docs/functions/queryStringToObject.html index 2d57d058..9f6ab9f5 100644 --- a/docs/functions/queryStringToObject.html +++ b/docs/functions/queryStringToObject.html @@ -9,4 +9,4 @@

    Example

    `queryStringTo
     

    Example

    `queryStringToObject('foo[0]=1&foo[1]=2&baz=3')`
     
    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/random.html b/docs/functions/random.html index 1d339823..20dbd08e 100644 --- a/docs/functions/random.html +++ b/docs/functions/random.html @@ -2,4 +2,4 @@

    Parameters

    • min: number

      The minimum value (inclusive).

    • max: number

      The maximum value (inclusive).

    Returns number

    A random integer between min and max.

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/setIntervalByTimeout.html b/docs/functions/setIntervalByTimeout.html index f468dad6..10965178 100644 --- a/docs/functions/setIntervalByTimeout.html +++ b/docs/functions/setIntervalByTimeout.html @@ -2,4 +2,4 @@

    Parameters

    • func: Function

      The function to be executed.

    • delay: number

      The interval (in milliseconds) at which the function should be executed.

    Returns (() => void)

    A function that, when called, clears the interval and stops the execution of the given function.

    -
      • (): void
      • Returns void

    \ No newline at end of file +
      • (): void
      • Returns void

    \ No newline at end of file diff --git a/docs/functions/setintervalByTimeout-1.html b/docs/functions/setintervalByTimeout-1.html index 46def87d..f9924df4 100644 --- a/docs/functions/setintervalByTimeout-1.html +++ b/docs/functions/setintervalByTimeout-1.html @@ -2,4 +2,4 @@

    Parameters

    • func: Function

      The function to be executed.

    • delay: number

      The interval (in milliseconds) at which the function should be executed.

    Returns (() => void)

    A function that, when called, clears the interval and stops the execution of the given function.

    -
      • (): void
      • Returns void

    \ No newline at end of file +
      • (): void
      • Returns void

    \ No newline at end of file diff --git a/docs/functions/sleep.html b/docs/functions/sleep.html index b3e59446..96cbbf74 100644 --- a/docs/functions/sleep.html +++ b/docs/functions/sleep.html @@ -1,4 +1,4 @@ sleep | @cc-heart/utils

    Function sleep

    • Sleeps for a given delay.

      Parameters

      • delay: number

        The delay, in milliseconds.

      Returns Promise<unknown>

      A promise that resolves after the delay.

      -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/unCapitalize.html b/docs/functions/unCapitalize.html index f513f1ea..383dfd01 100644 --- a/docs/functions/unCapitalize.html +++ b/docs/functions/unCapitalize.html @@ -3,4 +3,4 @@

    Returns Uncapitalize<T>

    • The unCapitalized string.
    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/functions/underlineToHump.html b/docs/functions/underlineToHump.html index 106ef7ab..900ce665 100644 --- a/docs/functions/underlineToHump.html +++ b/docs/functions/underlineToHump.html @@ -2,4 +2,4 @@ e.g. underlineToHump('hello_word') => 'helloWord'

    Parameters

    • target: string

      The underline-separated string to convert.

    Returns string

    The camel case version of the input string.

    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/interfaces/RequestConfig.html b/docs/interfaces/RequestConfig.html new file mode 100644 index 00000000..8c047d20 --- /dev/null +++ b/docs/interfaces/RequestConfig.html @@ -0,0 +1,20 @@ +RequestConfig | @cc-heart/utils

    Interface RequestConfig

    interface RequestConfig {
        body?: BodyInit;
        credentials?: RequestCredentials;
        data?: unknown;
        dispatcher?: Dispatcher;
        duplex?: "half";
        errorInterceptors?: ErrorInterceptor[];
        headers?: HeadersInit;
        integrity?: string;
        keepalive?: boolean;
        method?: string;
        mode?: RequestMode;
        params?: Record<PropertyKey, any>;
        redirect?: RequestRedirect;
        referrer?: string;
        referrerPolicy?: ReferrerPolicy;
        requestInterceptors?: RequestInterceptor[];
        responseInterceptors?: ResponseInterceptor<any, any>[];
        signal?: AbortSignal;
        window?: null;
    }

    Hierarchy

    • RequestInit
      • RequestConfig

    Properties

    body?: BodyInit
    credentials?: RequestCredentials
    data?: unknown
    dispatcher?: Dispatcher
    duplex?: "half"
    errorInterceptors?: ErrorInterceptor[]
    headers?: HeadersInit
    integrity?: string
    keepalive?: boolean
    method?: string
    mode?: RequestMode
    params?: Record<PropertyKey, any>
    redirect?: RequestRedirect
    referrer?: string
    referrerPolicy?: ReferrerPolicy
    requestInterceptors?: RequestInterceptor[]
    responseInterceptors?: ResponseInterceptor<any, any>[]
    signal?: AbortSignal
    window?: null
    \ No newline at end of file diff --git a/docs/interfaces/RequestReturn.html b/docs/interfaces/RequestReturn.html new file mode 100644 index 00000000..281a59cd --- /dev/null +++ b/docs/interfaces/RequestReturn.html @@ -0,0 +1,7 @@ +RequestReturn | @cc-heart/utils

    Interface RequestReturn<T>

    interface RequestReturn<T> {
        abort: (() => void);
        aborted: boolean;
        data: null | T;
        error: unknown;
        loading: boolean;
        promise: Promise<null | T>;
    }

    Type Parameters

    • T

    Properties

    abort: (() => void)

    Type declaration

      • (): void
      • Returns void

    aborted: boolean
    data: null | T
    error: unknown
    loading: boolean
    promise: Promise<null | T>
    \ No newline at end of file diff --git a/docs/modules.html b/docs/modules.html index a2bbb101..7b0f3fc0 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -1,8 +1,15 @@ @cc-heart/utils

    @cc-heart/utils

    Index

    Classes

    Interfaces

    Type Aliases

    Variables

    Functions

    _toString +awaitTo basename capitalize compose @@ -25,6 +32,7 @@ isEffectiveNumber isFalsy isFn +isMobile isNil isNull isNumber diff --git a/docs/types/ErrorInterceptor.html b/docs/types/ErrorInterceptor.html new file mode 100644 index 00000000..c38ecf75 --- /dev/null +++ b/docs/types/ErrorInterceptor.html @@ -0,0 +1 @@ +ErrorInterceptor | @cc-heart/utils

    Type alias ErrorInterceptor

    ErrorInterceptor: ((error) => unknown | Promise<unknown>)

    Type declaration

      • (error): unknown | Promise<unknown>
      • Parameters

        • error: unknown

        Returns unknown | Promise<unknown>

    \ No newline at end of file diff --git a/docs/types/RequestInterceptor.html b/docs/types/RequestInterceptor.html new file mode 100644 index 00000000..05713d46 --- /dev/null +++ b/docs/types/RequestInterceptor.html @@ -0,0 +1 @@ +RequestInterceptor | @cc-heart/utils

    Type alias RequestInterceptor

    RequestInterceptor: ((config) => RequestInit | Promise<RequestInit>)

    Type declaration

      • (config): RequestInit | Promise<RequestInit>
      • Parameters

        • config: RequestInit

        Returns RequestInit | Promise<RequestInit>

    \ No newline at end of file diff --git a/docs/types/ResponseInterceptor.html b/docs/types/ResponseInterceptor.html new file mode 100644 index 00000000..f7c0475c --- /dev/null +++ b/docs/types/ResponseInterceptor.html @@ -0,0 +1 @@ +ResponseInterceptor | @cc-heart/utils

    Type alias ResponseInterceptor<T, U>

    ResponseInterceptor<T, U>: ((data) => U | Promise<U>)

    Type Parameters

    • T = unknown
    • U = unknown

    Type declaration

      • (data): U | Promise<U>
      • Parameters

        • data: T

        Returns U | Promise<U>

    \ No newline at end of file diff --git a/docs/variables/HTTP_STATUS.html b/docs/variables/HTTP_STATUS.html index eb2560f0..cfd6510c 100644 --- a/docs/variables/HTTP_STATUS.html +++ b/docs/variables/HTTP_STATUS.html @@ -1 +1 @@ -HTTP_STATUS | @cc-heart/utils

    Variable HTTP_STATUSConst

    HTTP_STATUS: {
        ACCEPTED: 202;
        AMBIGUOUS: 300;
        BAD_GATEWAY: 502;
        BAD_REQUEST: 400;
        CONFLICT: 409;
        CONTINUE: 100;
        CREATED: 201;
        EARLYHINTS: 103;
        EXPECTATION_FAILED: 417;
        FAILED_DEPENDENCY: 424;
        FORBIDDEN: 403;
        FOUND: 302;
        GATEWAY_TIMEOUT: 504;
        GONE: 410;
        HTTP_VERSION_NOT_SUPPORTED: 505;
        INTERNAL_SERVER_ERROR: 500;
        I_AM_A_TEAPOT: 418;
        LENGTH_REQUIRED: 411;
        METHOD_NOT_ALLOWED: 405;
        MISDIRECTED: 421;
        MOVED_PERMANENTLY: 301;
        NON_AUTHORITATIVE_INFORMATION: 203;
        NOT_ACCEPTABLE: 406;
        NOT_FOUND: 404;
        NOT_IMPLEMENTED: 501;
        NOT_MODIFIED: 304;
        NO_CONTENT: 204;
        OK: 200;
        PARTIAL_CONTENT: 206;
        PAYLOAD_TOO_LARGE: 413;
        PAYMENT_REQUIRED: 402;
        PERMANENT_REDIRECT: 308;
        PRECONDITION_FAILED: 412;
        PRECONDITION_REQUIRED: 428;
        PROCESSING: 102;
        PROXY_AUTHENTICATION_REQUIRED: 407;
        REQUESTED_RANGE_NOT_SATISFIABLE: 416;
        REQUEST_TIMEOUT: 408;
        RESET_CONTENT: 205;
        SEE_OTHER: 303;
        SERVICE_UNAVAILABLE: 503;
        SWITCHING_PROTOCOLS: 101;
        TEMPORARY_REDIRECT: 307;
        TOO_MANY_REQUESTS: 429;
        UNAUTHORIZED: 401;
        UNPROCESSABLE_ENTITY: 422;
        UNSUPPORTED_MEDIA_TYPE: 415;
        URI_TOO_LONG: 414;
    } = ...

    Type declaration

    • Readonly ACCEPTED: 202
    • Readonly AMBIGUOUS: 300
    • Readonly BAD_GATEWAY: 502
    • Readonly BAD_REQUEST: 400
    • Readonly CONFLICT: 409
    • Readonly CONTINUE: 100
    • Readonly CREATED: 201
    • Readonly EARLYHINTS: 103
    • Readonly EXPECTATION_FAILED: 417
    • Readonly FAILED_DEPENDENCY: 424
    • Readonly FORBIDDEN: 403
    • Readonly FOUND: 302
    • Readonly GATEWAY_TIMEOUT: 504
    • Readonly GONE: 410
    • Readonly HTTP_VERSION_NOT_SUPPORTED: 505
    • Readonly INTERNAL_SERVER_ERROR: 500
    • Readonly I_AM_A_TEAPOT: 418
    • Readonly LENGTH_REQUIRED: 411
    • Readonly METHOD_NOT_ALLOWED: 405
    • Readonly MISDIRECTED: 421
    • Readonly MOVED_PERMANENTLY: 301
    • Readonly NON_AUTHORITATIVE_INFORMATION: 203
    • Readonly NOT_ACCEPTABLE: 406
    • Readonly NOT_FOUND: 404
    • Readonly NOT_IMPLEMENTED: 501
    • Readonly NOT_MODIFIED: 304
    • Readonly NO_CONTENT: 204
    • Readonly OK: 200
    • Readonly PARTIAL_CONTENT: 206
    • Readonly PAYLOAD_TOO_LARGE: 413
    • Readonly PAYMENT_REQUIRED: 402
    • Readonly PERMANENT_REDIRECT: 308
    • Readonly PRECONDITION_FAILED: 412
    • Readonly PRECONDITION_REQUIRED: 428
    • Readonly PROCESSING: 102
    • Readonly PROXY_AUTHENTICATION_REQUIRED: 407
    • Readonly REQUESTED_RANGE_NOT_SATISFIABLE: 416
    • Readonly REQUEST_TIMEOUT: 408
    • Readonly RESET_CONTENT: 205
    • Readonly SEE_OTHER: 303
    • Readonly SERVICE_UNAVAILABLE: 503
    • Readonly SWITCHING_PROTOCOLS: 101
    • Readonly TEMPORARY_REDIRECT: 307
    • Readonly TOO_MANY_REQUESTS: 429
    • Readonly UNAUTHORIZED: 401
    • Readonly UNPROCESSABLE_ENTITY: 422
    • Readonly UNSUPPORTED_MEDIA_TYPE: 415
    • Readonly URI_TOO_LONG: 414
    \ No newline at end of file +HTTP_STATUS | @cc-heart/utils

    Variable HTTP_STATUSConst

    HTTP_STATUS: {
        ACCEPTED: 202;
        AMBIGUOUS: 300;
        BAD_GATEWAY: 502;
        BAD_REQUEST: 400;
        CONFLICT: 409;
        CONTINUE: 100;
        CREATED: 201;
        EARLYHINTS: 103;
        EXPECTATION_FAILED: 417;
        FAILED_DEPENDENCY: 424;
        FORBIDDEN: 403;
        FOUND: 302;
        GATEWAY_TIMEOUT: 504;
        GONE: 410;
        HTTP_VERSION_NOT_SUPPORTED: 505;
        INTERNAL_SERVER_ERROR: 500;
        I_AM_A_TEAPOT: 418;
        LENGTH_REQUIRED: 411;
        METHOD_NOT_ALLOWED: 405;
        MISDIRECTED: 421;
        MOVED_PERMANENTLY: 301;
        NON_AUTHORITATIVE_INFORMATION: 203;
        NOT_ACCEPTABLE: 406;
        NOT_FOUND: 404;
        NOT_IMPLEMENTED: 501;
        NOT_MODIFIED: 304;
        NO_CONTENT: 204;
        OK: 200;
        PARTIAL_CONTENT: 206;
        PAYLOAD_TOO_LARGE: 413;
        PAYMENT_REQUIRED: 402;
        PERMANENT_REDIRECT: 308;
        PRECONDITION_FAILED: 412;
        PRECONDITION_REQUIRED: 428;
        PROCESSING: 102;
        PROXY_AUTHENTICATION_REQUIRED: 407;
        REQUESTED_RANGE_NOT_SATISFIABLE: 416;
        REQUEST_TIMEOUT: 408;
        RESET_CONTENT: 205;
        SEE_OTHER: 303;
        SERVICE_UNAVAILABLE: 503;
        SWITCHING_PROTOCOLS: 101;
        TEMPORARY_REDIRECT: 307;
        TOO_MANY_REQUESTS: 429;
        UNAUTHORIZED: 401;
        UNPROCESSABLE_ENTITY: 422;
        UNSUPPORTED_MEDIA_TYPE: 415;
        URI_TOO_LONG: 414;
    } = ...

    Type declaration

    • Readonly ACCEPTED: 202
    • Readonly AMBIGUOUS: 300
    • Readonly BAD_GATEWAY: 502
    • Readonly BAD_REQUEST: 400
    • Readonly CONFLICT: 409
    • Readonly CONTINUE: 100
    • Readonly CREATED: 201
    • Readonly EARLYHINTS: 103
    • Readonly EXPECTATION_FAILED: 417
    • Readonly FAILED_DEPENDENCY: 424
    • Readonly FORBIDDEN: 403
    • Readonly FOUND: 302
    • Readonly GATEWAY_TIMEOUT: 504
    • Readonly GONE: 410
    • Readonly HTTP_VERSION_NOT_SUPPORTED: 505
    • Readonly INTERNAL_SERVER_ERROR: 500
    • Readonly I_AM_A_TEAPOT: 418
    • Readonly LENGTH_REQUIRED: 411
    • Readonly METHOD_NOT_ALLOWED: 405
    • Readonly MISDIRECTED: 421
    • Readonly MOVED_PERMANENTLY: 301
    • Readonly NON_AUTHORITATIVE_INFORMATION: 203
    • Readonly NOT_ACCEPTABLE: 406
    • Readonly NOT_FOUND: 404
    • Readonly NOT_IMPLEMENTED: 501
    • Readonly NOT_MODIFIED: 304
    • Readonly NO_CONTENT: 204
    • Readonly OK: 200
    • Readonly PARTIAL_CONTENT: 206
    • Readonly PAYLOAD_TOO_LARGE: 413
    • Readonly PAYMENT_REQUIRED: 402
    • Readonly PERMANENT_REDIRECT: 308
    • Readonly PRECONDITION_FAILED: 412
    • Readonly PRECONDITION_REQUIRED: 428
    • Readonly PROCESSING: 102
    • Readonly PROXY_AUTHENTICATION_REQUIRED: 407
    • Readonly REQUESTED_RANGE_NOT_SATISFIABLE: 416
    • Readonly REQUEST_TIMEOUT: 408
    • Readonly RESET_CONTENT: 205
    • Readonly SEE_OTHER: 303
    • Readonly SERVICE_UNAVAILABLE: 503
    • Readonly SWITCHING_PROTOCOLS: 101
    • Readonly TEMPORARY_REDIRECT: 307
    • Readonly TOO_MANY_REQUESTS: 429
    • Readonly UNAUTHORIZED: 401
    • Readonly UNPROCESSABLE_ENTITY: 422
    • Readonly UNSUPPORTED_MEDIA_TYPE: 415
    • Readonly URI_TOO_LONG: 414
    \ No newline at end of file diff --git a/docs/variables/MIME_TYPES.html b/docs/variables/MIME_TYPES.html index 015614cd..868e95f2 100644 --- a/docs/variables/MIME_TYPES.html +++ b/docs/variables/MIME_TYPES.html @@ -1 +1 @@ -MIME_TYPES | @cc-heart/utils

    Variable MIME_TYPESConst

    MIME_TYPES: {
        7Z: "application/x-7z-compressed";
        7ZIP: "application/x-7z-compressed";
        ALZ: "application/x-alz";
        APK: "application/vnd.android.package-archive";
        AVI: "video/x-msvideo";
        BAT: "application/x-msdownload";
        BMP: "image/bmp";
        BZ2: "application/x-bzip2";
        C: "text/x-csrc";
        CPP: "text/x-c++src";
        CS: "text/plain";
        CSS: "text/css";
        CSV: "text/csv";
        DLL: "application/vnd.microsoft.portable-executable";
        DMG: "application/x-apple-diskimage";
        DOC: "application/msword";
        DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
        DOT: "application/msword";
        DOTX: "application/vnd.openxmlformats-officedocument.wordprocessingml.template";
        DWG: "application/acad";
        DXF: "application/vnd.dxf";
        EML: "message/rfc822";
        EOT: "application/vnd.ms-fontobject";
        EPUB: "application/epub+zip";
        EXE: "application/vnd.microsoft.portable-executable";
        FLAC: "audio/flac";
        FLV: "video/x-flv";
        GIF: "image/gif";
        GO: "text/plain";
        GZ: "application/gzip";
        HTM: "text/html";
        HTML: "text/html";
        ICO: "image/vnd.microsoft.icon";
        JAVA: "text/x-java-source";
        JAVASCRIPT: "application/javascript";
        JPEG: "image/jpeg";
        JPG: "image/jpeg";
        JSON: "application/json";
        JSONLD: "application/ld+json";
        KT: "text/plain";
        M3U8: "application/vnd.apple.mpegurl";
        M4A: "audio/mp4";
        MAP: "application/json";
        MKV: "video/x-matroska";
        MOV: "video/quicktime";
        MP3: "audio/mpeg";
        MP4: "video/mp4";
        MPD: "application/dash+xml";
        MSG: "application/vnd.ms-outlook";
        MSI: "application/x-msdownload";
        OBJ: "application/octet-stream";
        OGG: "audio/ogg";
        OTF: "font/otf";
        PDF: "application/pdf";
        PHP: "application/x-httpd-php";
        PNG: "image/png";
        POT: "application/vnd.ms-powerpoint";
        POTX: "application/vnd.openxmlformats-officedocument.presentationml.template";
        PPSX: "application/vnd.openxmlformats-officedocument.presentationml.slideshow";
        PPT: "application/vnd.ms-powerpoint";
        PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation";
        PY: "text/x-python";
        RAR: "application/vnd.rar";
        RB: "application/x-ruby";
        RTF: "application/rtf";
        STL: "application/sla";
        SVG: "image/svg+xml";
        SWF: "application/x-shockwave-flash";
        SWIFT: "text/x-swift";
        TAR: "application/x-tar";
        TORRENT: "application/x-bittorrent";
        TS: "video/mp2t";
        TTF: "font/ttf";
        TXT: "text/plain";
        WASM: "application/wasm";
        WAV: "audio/wav";
        WEBM: "video/webm";
        WEBP: "image/webp";
        WMV: "video/x-ms-wmv";
        WOFF: "font/woff";
        WOFF2: "font/woff2";
        XLS: "application/vnd.ms-excel";
        XLSM: "application/vnd.ms-excel.sheet.macroEnabled.12";
        XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
        XLT: "application/vnd.ms-excel";
        XML: "application/xml";
        ZIP: "application/zip";
    } = ...

    Type declaration

    • Readonly 7Z: "application/x-7z-compressed"
    • Readonly 7ZIP: "application/x-7z-compressed"
    • Readonly ALZ: "application/x-alz"
    • Readonly APK: "application/vnd.android.package-archive"
    • Readonly AVI: "video/x-msvideo"
    • Readonly BAT: "application/x-msdownload"
    • Readonly BMP: "image/bmp"
    • Readonly BZ2: "application/x-bzip2"
    • Readonly C: "text/x-csrc"
    • Readonly CPP: "text/x-c++src"
    • Readonly CS: "text/plain"
    • Readonly CSS: "text/css"
    • Readonly CSV: "text/csv"
    • Readonly DLL: "application/vnd.microsoft.portable-executable"
    • Readonly DMG: "application/x-apple-diskimage"
    • Readonly DOC: "application/msword"
    • Readonly DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
    • Readonly DOT: "application/msword"
    • Readonly DOTX: "application/vnd.openxmlformats-officedocument.wordprocessingml.template"
    • Readonly DWG: "application/acad"
    • Readonly DXF: "application/vnd.dxf"
    • Readonly EML: "message/rfc822"
    • Readonly EOT: "application/vnd.ms-fontobject"
    • Readonly EPUB: "application/epub+zip"
    • Readonly EXE: "application/vnd.microsoft.portable-executable"
    • Readonly FLAC: "audio/flac"
    • Readonly FLV: "video/x-flv"
    • Readonly GIF: "image/gif"
    • Readonly GO: "text/plain"
    • Readonly GZ: "application/gzip"
    • Readonly HTM: "text/html"
    • Readonly HTML: "text/html"
    • Readonly ICO: "image/vnd.microsoft.icon"
    • Readonly JAVA: "text/x-java-source"
    • Readonly JAVASCRIPT: "application/javascript"
    • Readonly JPEG: "image/jpeg"
    • Readonly JPG: "image/jpeg"
    • Readonly JSON: "application/json"
    • Readonly JSONLD: "application/ld+json"
    • Readonly KT: "text/plain"
    • Readonly M3U8: "application/vnd.apple.mpegurl"
    • Readonly M4A: "audio/mp4"
    • Readonly MAP: "application/json"
    • Readonly MKV: "video/x-matroska"
    • Readonly MOV: "video/quicktime"
    • Readonly MP3: "audio/mpeg"
    • Readonly MP4: "video/mp4"
    • Readonly MPD: "application/dash+xml"
    • Readonly MSG: "application/vnd.ms-outlook"
    • Readonly MSI: "application/x-msdownload"
    • Readonly OBJ: "application/octet-stream"
    • Readonly OGG: "audio/ogg"
    • Readonly OTF: "font/otf"
    • Readonly PDF: "application/pdf"
    • Readonly PHP: "application/x-httpd-php"
    • Readonly PNG: "image/png"
    • Readonly POT: "application/vnd.ms-powerpoint"
    • Readonly POTX: "application/vnd.openxmlformats-officedocument.presentationml.template"
    • Readonly PPSX: "application/vnd.openxmlformats-officedocument.presentationml.slideshow"
    • Readonly PPT: "application/vnd.ms-powerpoint"
    • Readonly PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
    • Readonly PY: "text/x-python"
    • Readonly RAR: "application/vnd.rar"
    • Readonly RB: "application/x-ruby"
    • Readonly RTF: "application/rtf"
    • Readonly STL: "application/sla"
    • Readonly SVG: "image/svg+xml"
    • Readonly SWF: "application/x-shockwave-flash"
    • Readonly SWIFT: "text/x-swift"
    • Readonly TAR: "application/x-tar"
    • Readonly TORRENT: "application/x-bittorrent"
    • Readonly TS: "video/mp2t"
    • Readonly TTF: "font/ttf"
    • Readonly TXT: "text/plain"
    • Readonly WASM: "application/wasm"
    • Readonly WAV: "audio/wav"
    • Readonly WEBM: "video/webm"
    • Readonly WEBP: "image/webp"
    • Readonly WMV: "video/x-ms-wmv"
    • Readonly WOFF: "font/woff"
    • Readonly WOFF2: "font/woff2"
    • Readonly XLS: "application/vnd.ms-excel"
    • Readonly XLSM: "application/vnd.ms-excel.sheet.macroEnabled.12"
    • Readonly XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
    • Readonly XLT: "application/vnd.ms-excel"
    • Readonly XML: "application/xml"
    • Readonly ZIP: "application/zip"
    \ No newline at end of file +MIME_TYPES | @cc-heart/utils

    Variable MIME_TYPESConst

    MIME_TYPES: {
        7Z: "application/x-7z-compressed";
        7ZIP: "application/x-7z-compressed";
        ALZ: "application/x-alz";
        APK: "application/vnd.android.package-archive";
        AVI: "video/x-msvideo";
        BAT: "application/x-msdownload";
        BMP: "image/bmp";
        BZ2: "application/x-bzip2";
        C: "text/x-csrc";
        CPP: "text/x-c++src";
        CS: "text/plain";
        CSS: "text/css";
        CSV: "text/csv";
        DLL: "application/vnd.microsoft.portable-executable";
        DMG: "application/x-apple-diskimage";
        DOC: "application/msword";
        DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
        DOT: "application/msword";
        DOTX: "application/vnd.openxmlformats-officedocument.wordprocessingml.template";
        DWG: "application/acad";
        DXF: "application/vnd.dxf";
        EML: "message/rfc822";
        EOT: "application/vnd.ms-fontobject";
        EPUB: "application/epub+zip";
        EXE: "application/vnd.microsoft.portable-executable";
        FLAC: "audio/flac";
        FLV: "video/x-flv";
        GIF: "image/gif";
        GO: "text/plain";
        GZ: "application/gzip";
        HTM: "text/html";
        HTML: "text/html";
        ICO: "image/vnd.microsoft.icon";
        JAVA: "text/x-java-source";
        JAVASCRIPT: "application/javascript";
        JPEG: "image/jpeg";
        JPG: "image/jpeg";
        JSON: "application/json";
        JSONLD: "application/ld+json";
        KT: "text/plain";
        M3U8: "application/vnd.apple.mpegurl";
        M4A: "audio/mp4";
        MAP: "application/json";
        MKV: "video/x-matroska";
        MOV: "video/quicktime";
        MP3: "audio/mpeg";
        MP4: "video/mp4";
        MPD: "application/dash+xml";
        MSG: "application/vnd.ms-outlook";
        MSI: "application/x-msdownload";
        OBJ: "application/octet-stream";
        OGG: "audio/ogg";
        OTF: "font/otf";
        PDF: "application/pdf";
        PHP: "application/x-httpd-php";
        PNG: "image/png";
        POT: "application/vnd.ms-powerpoint";
        POTX: "application/vnd.openxmlformats-officedocument.presentationml.template";
        PPSX: "application/vnd.openxmlformats-officedocument.presentationml.slideshow";
        PPT: "application/vnd.ms-powerpoint";
        PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation";
        PY: "text/x-python";
        RAR: "application/vnd.rar";
        RB: "application/x-ruby";
        RTF: "application/rtf";
        STL: "application/sla";
        SVG: "image/svg+xml";
        SWF: "application/x-shockwave-flash";
        SWIFT: "text/x-swift";
        TAR: "application/x-tar";
        TORRENT: "application/x-bittorrent";
        TS: "video/mp2t";
        TTF: "font/ttf";
        TXT: "text/plain";
        WASM: "application/wasm";
        WAV: "audio/wav";
        WEBM: "video/webm";
        WEBP: "image/webp";
        WMV: "video/x-ms-wmv";
        WOFF: "font/woff";
        WOFF2: "font/woff2";
        XLS: "application/vnd.ms-excel";
        XLSM: "application/vnd.ms-excel.sheet.macroEnabled.12";
        XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
        XLT: "application/vnd.ms-excel";
        XML: "application/xml";
        ZIP: "application/zip";
    } = ...

    Type declaration

    • Readonly 7Z: "application/x-7z-compressed"
    • Readonly 7ZIP: "application/x-7z-compressed"
    • Readonly ALZ: "application/x-alz"
    • Readonly APK: "application/vnd.android.package-archive"
    • Readonly AVI: "video/x-msvideo"
    • Readonly BAT: "application/x-msdownload"
    • Readonly BMP: "image/bmp"
    • Readonly BZ2: "application/x-bzip2"
    • Readonly C: "text/x-csrc"
    • Readonly CPP: "text/x-c++src"
    • Readonly CS: "text/plain"
    • Readonly CSS: "text/css"
    • Readonly CSV: "text/csv"
    • Readonly DLL: "application/vnd.microsoft.portable-executable"
    • Readonly DMG: "application/x-apple-diskimage"
    • Readonly DOC: "application/msword"
    • Readonly DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
    • Readonly DOT: "application/msword"
    • Readonly DOTX: "application/vnd.openxmlformats-officedocument.wordprocessingml.template"
    • Readonly DWG: "application/acad"
    • Readonly DXF: "application/vnd.dxf"
    • Readonly EML: "message/rfc822"
    • Readonly EOT: "application/vnd.ms-fontobject"
    • Readonly EPUB: "application/epub+zip"
    • Readonly EXE: "application/vnd.microsoft.portable-executable"
    • Readonly FLAC: "audio/flac"
    • Readonly FLV: "video/x-flv"
    • Readonly GIF: "image/gif"
    • Readonly GO: "text/plain"
    • Readonly GZ: "application/gzip"
    • Readonly HTM: "text/html"
    • Readonly HTML: "text/html"
    • Readonly ICO: "image/vnd.microsoft.icon"
    • Readonly JAVA: "text/x-java-source"
    • Readonly JAVASCRIPT: "application/javascript"
    • Readonly JPEG: "image/jpeg"
    • Readonly JPG: "image/jpeg"
    • Readonly JSON: "application/json"
    • Readonly JSONLD: "application/ld+json"
    • Readonly KT: "text/plain"
    • Readonly M3U8: "application/vnd.apple.mpegurl"
    • Readonly M4A: "audio/mp4"
    • Readonly MAP: "application/json"
    • Readonly MKV: "video/x-matroska"
    • Readonly MOV: "video/quicktime"
    • Readonly MP3: "audio/mpeg"
    • Readonly MP4: "video/mp4"
    • Readonly MPD: "application/dash+xml"
    • Readonly MSG: "application/vnd.ms-outlook"
    • Readonly MSI: "application/x-msdownload"
    • Readonly OBJ: "application/octet-stream"
    • Readonly OGG: "audio/ogg"
    • Readonly OTF: "font/otf"
    • Readonly PDF: "application/pdf"
    • Readonly PHP: "application/x-httpd-php"
    • Readonly PNG: "image/png"
    • Readonly POT: "application/vnd.ms-powerpoint"
    • Readonly POTX: "application/vnd.openxmlformats-officedocument.presentationml.template"
    • Readonly PPSX: "application/vnd.openxmlformats-officedocument.presentationml.slideshow"
    • Readonly PPT: "application/vnd.ms-powerpoint"
    • Readonly PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
    • Readonly PY: "text/x-python"
    • Readonly RAR: "application/vnd.rar"
    • Readonly RB: "application/x-ruby"
    • Readonly RTF: "application/rtf"
    • Readonly STL: "application/sla"
    • Readonly SVG: "image/svg+xml"
    • Readonly SWF: "application/x-shockwave-flash"
    • Readonly SWIFT: "text/x-swift"
    • Readonly TAR: "application/x-tar"
    • Readonly TORRENT: "application/x-bittorrent"
    • Readonly TS: "video/mp2t"
    • Readonly TTF: "font/ttf"
    • Readonly TXT: "text/plain"
    • Readonly WASM: "application/wasm"
    • Readonly WAV: "audio/wav"
    • Readonly WEBM: "video/webm"
    • Readonly WEBP: "image/webp"
    • Readonly WMV: "video/x-ms-wmv"
    • Readonly WOFF: "font/woff"
    • Readonly WOFF2: "font/woff2"
    • Readonly XLS: "application/vnd.ms-excel"
    • Readonly XLSM: "application/vnd.ms-excel.sheet.macroEnabled.12"
    • Readonly XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
    • Readonly XLT: "application/vnd.ms-excel"
    • Readonly XML: "application/xml"
    • Readonly ZIP: "application/zip"
    \ No newline at end of file diff --git a/docs/variables/REQUEST_METHOD.html b/docs/variables/REQUEST_METHOD.html index cf809919..5e1e29a4 100644 --- a/docs/variables/REQUEST_METHOD.html +++ b/docs/variables/REQUEST_METHOD.html @@ -1 +1 @@ -REQUEST_METHOD | @cc-heart/utils

    Variable REQUEST_METHODConst

    REQUEST_METHOD: {
        ALL: "ALL";
        DELETE: "DELETE";
        GET: "GET";
        HEAD: "HEAD";
        OPTIONS: "OPTIONS";
        PATCH: "PATCH";
        POST: "POST";
        PUT: "PUT";
        SEARCH: "SEARCH";
    } = ...

    Type declaration

    • Readonly ALL: "ALL"
    • Readonly DELETE: "DELETE"
    • Readonly GET: "GET"
    • Readonly HEAD: "HEAD"
    • Readonly OPTIONS: "OPTIONS"
    • Readonly PATCH: "PATCH"
    • Readonly POST: "POST"
    • Readonly PUT: "PUT"
    • Readonly SEARCH: "SEARCH"
    \ No newline at end of file +REQUEST_METHOD | @cc-heart/utils

    Variable REQUEST_METHODConst

    REQUEST_METHOD: {
        ALL: "ALL";
        DELETE: "DELETE";
        GET: "GET";
        HEAD: "HEAD";
        OPTIONS: "OPTIONS";
        PATCH: "PATCH";
        POST: "POST";
        PUT: "PUT";
        SEARCH: "SEARCH";
    } = ...

    Type declaration

    • Readonly ALL: "ALL"
    • Readonly DELETE: "DELETE"
    • Readonly GET: "GET"
    • Readonly HEAD: "HEAD"
    • Readonly OPTIONS: "OPTIONS"
    • Readonly PATCH: "PATCH"
    • Readonly POST: "POST"
    • Readonly PUT: "PUT"
    • Readonly SEARCH: "SEARCH"
    \ No newline at end of file diff --git a/lib/error-handler.ts b/lib/error-handler.ts index b2edd196..c2b61771 100644 --- a/lib/error-handler.ts +++ b/lib/error-handler.ts @@ -1,5 +1,5 @@ import { isFn, isObject, isStr, isPromise } from './validate' -import type { Fn } from '../dist/types/helper' +import type { Fn } from '../typings/helper' /** * Formats an error object into a string representation. @@ -66,4 +66,3 @@ export const invokeWithErrorHandlingFactory = (handleError: Fn) => { return res } } - diff --git a/lib/index.ts b/lib/index.ts index 00687f36..59f98816 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -1,6 +1,7 @@ export * from './date' export * from './define' export * from './random' +export * from './request' export * from './shard' export * from './string' export * from './url' diff --git a/lib/request.ts b/lib/request.ts new file mode 100644 index 00000000..5535f54b --- /dev/null +++ b/lib/request.ts @@ -0,0 +1,604 @@ +import { objectToQueryString } from './url' +import { MIME_TYPES } from './const/http' + +// ─── Thenable handle (可 await 的返回结果) ─── + +export interface RequestHandle { + then: ( + onfulfilled?: ((value: T) => R1 | PromiseLike) | null, + onrejected?: ((reason: unknown) => R2 | PromiseLike) | null + ) => Promise + catch: ( + onrejected?: ((reason: unknown) => R | PromiseLike) | null + ) => Promise + finally: (onfinally?: (() => void) | null) => Promise + abort: () => void +} + +// ─── 拦截器类型 ─── + +export type RequestInterceptor = ( + config: RequestInit +) => RequestInit | Promise + +export type ResponseInterceptor = ( + data: T +) => U | Promise + +export type ErrorInterceptor = (error: unknown) => unknown | Promise + +// ─── 缓存配置 ─── + +export interface CacheConfig { + /** Time-to-live in milliseconds. */ + ttl: number +} + +// ─── 请求配置 ─── + +export interface RequestConfig extends RequestInit { + params?: Record + data?: unknown + requestInterceptors?: RequestInterceptor[] + responseInterceptors?: ResponseInterceptor[] + errorInterceptors?: ErrorInterceptor[] + /** Request timeout in milliseconds. 0 or undefined = no timeout. */ + timeout?: number + /** Max retry count on failure. 0 = no retry. */ + retry?: number + /** Delay between retries in milliseconds. */ + retryDelay?: number + /** Response cache configuration. `true` = default TTL (5000ms). */ + cache?: boolean | CacheConfig + /** Download progress callback. Receives (loadedBytes, totalBytes). */ + onDownloadProgress?: (loaded: number, total: number) => void + + // ─── 生命周期回调 ─── + onSuccess?: (data: unknown) => void + onError?: (error: unknown) => void + onAbort?: () => void + onFinally?: () => void +} + +const BODY_METHODS = ['POST', 'PUT', 'PATCH'] +const QUERY_METHODS = ['GET', 'DELETE'] +const DEFAULT_CACHE_TTL = 5000 + +function sleep(ms: number) { + return new Promise((resolve) => setTimeout(resolve, ms)) +} + +interface CacheEntry { + data: unknown + expiry: number +} + +/** + * HTTP client with interceptors, timeout, retry, cache, deduplication, and download progress. + * + * ### Basic usage + * ```ts + * const api = new Request('https://api.example.com') + * + * // Directly awaitable + * const user = await api.get('/users/1') + * + * // Lifecycle callbacks + * await api.get('/users', { + * onSuccess: setUsers, + * onError: toast.error, + * onFinally: () => setLoading(false), + * }) + * ``` + * + * ### Composable best practice + * + * Prefer small focused instances over one instance with all interceptors: + * ```ts + * // ── Building blocks (pure functions, reusable) ── + * const addAuth: RequestInterceptor = (config) => ({ + * ...config, + * headers: { ...config.headers, Authorization: `Bearer ${getToken()}` } + * }) + * const addLang: RequestInterceptor = (config) => ({ + * ...config, + * headers: { ...config.headers, 'Accept-Language': 'zh-CN' } + * }) + * + * // ── Compose: each instance handles one concern ── + * const authApi = new Request('https://api.example.com') + * authApi.useRequestInterceptor(addAuth) + * authApi.useRequestInterceptor(addLang) + * + * const publicApi = new Request('https://open.api.com') + * + * // ── Or use per-request interceptors ── + * api.get('/users', {}, { + * requestInterceptors: [addAuth], + * onSuccess: setUsers, + * }) + * ``` + */ +export class Request { + private requestInterceptors: RequestInterceptor[] = [] + private responseInterceptors: ResponseInterceptor[] = [] + private errorInterceptors: ErrorInterceptor[] = [] + private cacheMap = new Map() + private inflightMap = new Map>() + + constructor(private readonly baseUrl = '') { + // + } + + useRequestInterceptor(interceptor: RequestInterceptor) { + this.requestInterceptors.push(interceptor) + return () => this.removeInterceptor(this.requestInterceptors, interceptor) + } + + useResponseInterceptor( + interceptor: ResponseInterceptor + ) { + this.responseInterceptors.push(interceptor) + return () => this.removeInterceptor(this.responseInterceptors, interceptor) + } + + useErrorInterceptor(interceptor: ErrorInterceptor) { + this.errorInterceptors.push(interceptor) + return () => this.removeInterceptor(this.errorInterceptors, interceptor) + } + + // ─── 快捷方法 ─── + + get( + url: string, + params?: Record, + config: RequestConfig = {} + ) { + return this.request(url, { ...config, method: 'GET', params }) + } + + delete( + url: string, + params?: Record, + config: RequestConfig = {} + ) { + return this.request(url, { ...config, method: 'DELETE', params }) + } + + post(url: string, data?: unknown, config: RequestConfig = {}) { + return this.request(url, { ...config, method: 'POST', data }) + } + + put(url: string, data?: unknown, config: RequestConfig = {}) { + return this.request(url, { ...config, method: 'PUT', data }) + } + + patch(url: string, data?: unknown, config: RequestConfig = {}) { + return this.request(url, { ...config, method: 'PATCH', data }) + } + + /** Clear the in-memory response cache. */ + clearCache() { + this.cacheMap.clear() + } + + // ─── 核心:request ─── + + request( + url: string, + config: RequestConfig = {} + ): RequestHandle { + const controller = new AbortController() + const promise = this.execute(url, config, controller) + + // onAbort 在 abort() 时直接触发 + const handle = { + then: (onfulfilled?: any, onrejected?: any) => + (promise as Promise).then(onfulfilled, onrejected), + catch: (onrejected?: any) => + (promise as Promise).catch(onrejected), + finally: (onfinally?: any) => + (promise as Promise).finally(onfinally), + abort: () => { + controller.abort() + } + } as RequestHandle + + return handle + } + + // ─── 内部:execute ─── + + private buildCacheKey(method: string, url: string): string { + return `${method}:${url}` + } + + private async execute( + url: string, + config: RequestConfig, + controller: AbortController + ): Promise { + const { + params, + data, + requestInterceptors = [], + responseInterceptors = [], + errorInterceptors = [], + timeout, + retry = 0, + retryDelay = 0, + cache, + onDownloadProgress, + // 剥离回调,不下传到 RequestInit + onSuccess, + onError, + onAbort: _onAbort, + onFinally, + ...requestConfig + } = config + + const method = (requestConfig.method ?? 'GET').toUpperCase() + const requestUrl = this.buildUrl(url, method, params) + const cacheKey = this.buildCacheKey(method, requestUrl) + + // ── Cache hit (GET only) ── + if (method === 'GET' && cache) { + const cached = this.cacheMap.get(cacheKey) + if (cached && cached.expiry > Date.now()) { + onSuccess?.(cached.data) + onFinally?.() + return cached.data as T + } + } + + // ── Dedup (GET only) ── + if (method === 'GET' && this.inflightMap.has(cacheKey)) { + try { + const dedupData = await this.inflightMap.get(cacheKey)! + onSuccess?.(dedupData) + onFinally?.() + return dedupData as T + } catch { + // 上游失败了,fall through 重新发起 + } + } + + const maxRetries = retry + + const executePromise = this.executeWithRetry( + requestUrl, + method, + data, + requestConfig, + controller, + requestInterceptors, + responseInterceptors, + errorInterceptors, + onDownloadProgress, + timeout, + maxRetries, + retryDelay, + cache, + cacheKey + ) + + if (method === 'GET') { + this.inflightMap.set(cacheKey, executePromise) + } + + try { + const resultData = await executePromise + config.onSuccess?.(resultData) + return resultData + } catch (error) { + if ( + controller.signal.aborted || + (error as Error)?.name === 'AbortError' + ) { + config.onAbort?.() + } else { + config.onError?.(error) + } + throw error + } finally { + if (method === 'GET') { + this.inflightMap.delete(cacheKey) + } + config.onFinally?.() + } + } + + // ─── 内部:executeWithRetry ─── + + private async executeWithRetry( + requestUrl: string, + method: string, + data: unknown, + requestConfig: RequestInit, + controller: AbortController, + requestInterceptors: RequestInterceptor[], + responseInterceptors: ResponseInterceptor[], + errorInterceptors: ErrorInterceptor[], + onDownloadProgress: ((loaded: number, total: number) => void) | undefined, + timeout: number | undefined, + maxRetries: number, + retryDelayMs: number, + cache: boolean | CacheConfig | undefined, + cacheKey: string + ): Promise { + for (let attempt = 0; attempt <= maxRetries; attempt++) { + const attemptController = new AbortController() + + const onUserAbort = () => { + if (controller.signal.aborted) { + attemptController.abort() + } + } + controller.signal.addEventListener('abort', onUserAbort) + + let attemptTimeoutId: ReturnType | undefined + if (timeout && timeout > 0) { + attemptTimeoutId = setTimeout(() => { + const err = new Error('Request timed out') + err.name = 'TimeoutError' + attemptController.abort(err) + }, timeout) + } + + try { + if (controller.signal.aborted) { + const err = new Error('The operation was aborted') + err.name = 'AbortError' + throw err + } + + let requestInit = this.buildRequestInit( + method, + data, + requestConfig, + attemptController + ) + + requestInit = await this.runRequestInterceptors(requestInit, [ + ...this.requestInterceptors, + ...requestInterceptors + ]) + + const response = await fetch(requestUrl, requestInit) + + let responseData: unknown + if (onDownloadProgress && response.body) { + responseData = await this.readResponseWithProgress( + response, + onDownloadProgress + ) + } else { + responseData = await this.parseResponse(response) + } + + responseData = await this.runResponseInterceptors(responseData, [ + ...this.responseInterceptors, + ...responseInterceptors + ]) + + // ── Cache write-back (GET only) ── + if (method === 'GET' && cache) { + const ttl = + typeof cache === 'object' ? cache.ttl : DEFAULT_CACHE_TTL + this.cacheMap.set(cacheKey, { + data: responseData, + expiry: Date.now() + ttl + }) + } + + return responseData as T + } catch (error) { + if (controller.signal.aborted) { + throw error + } + + if (attempt < maxRetries) { + if (retryDelayMs > 0) { + await sleep(retryDelayMs) + } + continue + } + + // 最后一次尝试:执行 errorInterceptors 后 throw + const processedError = await this.runErrorInterceptors(error, [ + ...this.errorInterceptors, + ...errorInterceptors + ]) + throw processedError + } finally { + clearTimeout(attemptTimeoutId) + controller.signal.removeEventListener('abort', onUserAbort) + } + } + + // unreachable + throw new Error('Unreachable') + } + + // ─── 进度读取 ─── + + private async readResponseWithProgress( + response: Response, + onProgress: (loaded: number, total: number) => void + ): Promise { + const contentLength = response.headers.get('content-length') + const total = contentLength ? parseInt(contentLength, 10) : 0 + const reader = response.body!.getReader() + const chunks: Uint8Array[] = [] + let loaded = 0 + + while (true) { + const { done, value } = await reader.read() + if (done) break + chunks.push(value) + loaded += value.length + onProgress(loaded, total) + } + + const allChunks = new Uint8Array(loaded) + let offset = 0 + for (const chunk of chunks) { + allChunks.set(chunk, offset) + offset += chunk.length + } + + const contentType = response.headers.get('content-type') ?? '' + if (contentType.includes(MIME_TYPES.JSON)) { + const text = new TextDecoder().decode(allChunks) + return JSON.parse(text) + } + if (contentType.includes('text/')) { + return new TextDecoder().decode(allChunks) + } + return new Blob([allChunks.buffer], { type: contentType || undefined }) + } + + // ─── 构建请求 ─── + + private buildRequestInit( + method: string, + data: unknown, + config: RequestInit, + controller: AbortController + ): RequestInit { + const requestInit: RequestInit = { + ...config, + method, + signal: config.signal ?? controller.signal, + headers: this.normalizeHeaders(config.headers) + } + + if (BODY_METHODS.includes(method) && data !== undefined) { + requestInit.body = this.buildBody(data) + + if ( + !(data instanceof FormData) && + !(data instanceof URLSearchParams) && + !(data instanceof Blob) + ) { + requestInit.headers = { + 'Content-Type': 'application/json', + ...this.normalizeHeaders(requestInit.headers) + } + } + } + + return requestInit + } + + private buildBody(data: unknown) { + if (data instanceof FormData) return data + if (data instanceof URLSearchParams) return data + if (data instanceof Blob) return data + if (typeof data === 'string') return data + return JSON.stringify(data) + } + + private buildUrl( + url: string, + method: string, + params?: Record + ) { + const baseUrl = this.isCompleteUrl(url) + ? url + : this.joinUrl(this.baseUrl, url) + + if (!QUERY_METHODS.includes(method) || !params) return baseUrl + + const queryString = objectToQueryString(params) + if (!queryString) return baseUrl + + const separator = baseUrl.includes('?') ? '&' : '?' + return `${baseUrl}${separator}${queryString}` + } + + private joinUrl(baseUrl: string, url: string) { + if (!baseUrl) return url + return `${baseUrl.replace(/\/$/, '')}/${url.replace(/^\//, '')}` + } + + private isCompleteUrl(url: string) { + return /^https?:\/\//i.test(url) + } + + private normalizeHeaders( + headers?: RequestInit['headers'] + ): Record { + if (!headers) return {} + if (headers instanceof Headers) return Object.fromEntries(headers.entries()) + if (Array.isArray(headers)) return Object.fromEntries(headers) + + const entries = Object.entries(headers).map<[string, string]>( + ([key, value]) => [ + key, + typeof value === 'string' ? value : value.join(', ') + ] + ) + return Object.fromEntries(entries) + } + + // ─── 拦截器管道 ─── + + private async runRequestInterceptors( + config: RequestInit, + interceptors: RequestInterceptor[] + ) { + let currentConfig = config + for (const interceptor of interceptors) { + currentConfig = await interceptor(currentConfig) + } + return currentConfig + } + + private async runResponseInterceptors( + data: unknown, + interceptors: ResponseInterceptor[] + ) { + let currentData = data + for (const interceptor of interceptors) { + currentData = await interceptor(currentData) + } + return currentData + } + + private async runErrorInterceptors( + error: unknown, + interceptors: ErrorInterceptor[] + ) { + let currentError = error + for (const interceptor of interceptors) { + currentError = await interceptor(currentError) + } + return currentError + } + + // ─── 响应解析 ─── + + private async parseResponse(response: Response) { + const contentType = response.headers.get('content-type') ?? '' + + if (response.status === 204 || response.status === 205) return null + + if (contentType.includes(MIME_TYPES.JSON)) return response.json() + if (contentType.includes('text/')) return response.text() + if ( + contentType.includes('application/octet-stream') || + contentType.startsWith('image/') || + contentType.startsWith('audio/') || + contentType.startsWith('video/') + ) { + return response.blob() + } + return response.text() + } + + private removeInterceptor(interceptors: T[], interceptor: T) { + const index = interceptors.indexOf(interceptor) + if (index !== -1) interceptors.splice(index, 1) + } +}