@rtorcato/js-common 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +22 -0
- package/package.json +2 -2
- package/dist/abortController/index.d.ts +0 -29
- package/dist/abortController/index.d.ts.map +0 -1
- package/dist/arrays/index.d.ts +0 -44
- package/dist/arrays/index.d.ts.map +0 -1
- package/dist/boolean/index.d.ts +0 -41
- package/dist/boolean/index.d.ts.map +0 -1
- package/dist/colors/index.d.ts +0 -63
- package/dist/colors/index.d.ts.map +0 -1
- package/dist/console/index.d.ts +0 -16
- package/dist/console/index.d.ts.map +0 -1
- package/dist/crypto/index.d.ts +0 -34
- package/dist/crypto/index.d.ts.map +0 -1
- package/dist/currency/currencies.d.ts +0 -16
- package/dist/currency/currencies.d.ts.map +0 -1
- package/dist/currency/index.d.ts +0 -52
- package/dist/currency/index.d.ts.map +0 -1
- package/dist/date/index.d.ts +0 -44
- package/dist/date/index.d.ts.map +0 -1
- package/dist/datetime/index.d.ts +0 -52
- package/dist/datetime/index.d.ts.map +0 -1
- package/dist/emails/banned/index.d.ts +0 -9
- package/dist/emails/banned/index.d.ts.map +0 -1
- package/dist/emails/index.d.ts +0 -26
- package/dist/emails/index.d.ts.map +0 -1
- package/dist/env/index.d.ts +0 -63
- package/dist/env/index.d.ts.map +0 -1
- package/dist/errors/index.d.ts +0 -39
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/events/index.d.ts +0 -35
- package/dist/events/index.d.ts.map +0 -1
- package/dist/fetch/index.d.ts +0 -38
- package/dist/fetch/index.d.ts.map +0 -1
- package/dist/file/index.d.ts +0 -32
- package/dist/file/index.d.ts.map +0 -1
- package/dist/formatting/index.d.ts +0 -52
- package/dist/formatting/index.d.ts.map +0 -1
- package/dist/functions/index.d.ts +0 -33
- package/dist/functions/index.d.ts.map +0 -1
- package/dist/geometry/index.d.ts +0 -58
- package/dist/geometry/index.d.ts.map +0 -1
- package/dist/html/index.d.ts +0 -31
- package/dist/html/index.d.ts.map +0 -1
- package/dist/i18n/index.d.ts +0 -37
- package/dist/i18n/index.d.ts.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/interval/index.d.ts +0 -13
- package/dist/interval/index.d.ts.map +0 -1
- package/dist/json/index.d.ts +0 -28
- package/dist/json/index.d.ts.map +0 -1
- package/dist/logger/logger.d.ts +0 -3
- package/dist/logger/logger.d.ts.map +0 -1
- package/dist/logging/index.d.ts +0 -28
- package/dist/logging/index.d.ts.map +0 -1
- package/dist/logging/index1.d.ts +0 -33
- package/dist/logging/index1.d.ts.map +0 -1
- package/dist/maps/index.d.ts +0 -32
- package/dist/maps/index.d.ts.map +0 -1
- package/dist/math/index.d.ts +0 -3
- package/dist/math/index.d.ts.map +0 -1
- package/dist/math/math.d.ts +0 -37
- package/dist/math/math.d.ts.map +0 -1
- package/dist/math/sum/index.d.ts +0 -3
- package/dist/math/sum/index.d.ts.map +0 -1
- package/dist/mime-types/db.d.ts +0 -4605
- package/dist/mime-types/db.d.ts.map +0 -1
- package/dist/mime-types/index.d.ts +0 -25
- package/dist/mime-types/index.d.ts.map +0 -1
- package/dist/node/index.d.ts +0 -52
- package/dist/node/index.d.ts.map +0 -1
- package/dist/numbers/index.d.ts +0 -74
- package/dist/numbers/index.d.ts.map +0 -1
- package/dist/obects/index.d.ts +0 -34
- package/dist/obects/index.d.ts.map +0 -1
- package/dist/os/index.d.ts +0 -26
- package/dist/os/index.d.ts.map +0 -1
- package/dist/process/index.d.ts +0 -31
- package/dist/process/index.d.ts.map +0 -1
- package/dist/promises/index.d.ts +0 -39
- package/dist/promises/index.d.ts.map +0 -1
- package/dist/random/index.d.ts +0 -33
- package/dist/random/index.d.ts.map +0 -1
- package/dist/regex/index.d.ts +0 -36
- package/dist/regex/index.d.ts.map +0 -1
- package/dist/security/index.d.ts +0 -14
- package/dist/security/index.d.ts.map +0 -1
- package/dist/sets/index.d.ts +0 -48
- package/dist/sets/index.d.ts.map +0 -1
- package/dist/sleep/index.d.ts +0 -27
- package/dist/sleep/index.d.ts.map +0 -1
- package/dist/strings/index.d.ts +0 -74
- package/dist/strings/index.d.ts.map +0 -1
- package/dist/system/index.d.ts +0 -36
- package/dist/system/index.d.ts.map +0 -1
- package/dist/time/index.d.ts +0 -36
- package/dist/time/index.d.ts.map +0 -1
- package/dist/try/attempt.d.ts +0 -8
- package/dist/try/attempt.d.ts.map +0 -1
- package/dist/try/index.d.ts +0 -2
- package/dist/try/index.d.ts.map +0 -1
- package/dist/try/trycatch.d.ts +0 -12
- package/dist/try/trycatch.d.ts.map +0 -1
- package/dist/url/index.d.ts +0 -40
- package/dist/url/index.d.ts.map +0 -1
- package/dist/uuid/index.d.ts +0 -40
- package/dist/uuid/index.d.ts.map +0 -1
- package/dist/validation/index.d.ts +0 -49
- package/dist/validation/index.d.ts.map +0 -1
package/dist/errors/index.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates a new Error with a custom name and message.
|
|
3
|
-
* @param name The error name.
|
|
4
|
-
* @param message The error message.
|
|
5
|
-
* @returns The custom Error object.
|
|
6
|
-
*/
|
|
7
|
-
export declare function createCustomError(name: string, message: string): Error;
|
|
8
|
-
/**
|
|
9
|
-
* Checks if an error is an instance of a specific error name.
|
|
10
|
-
* @param error The error to check.
|
|
11
|
-
* @param name The error name to match.
|
|
12
|
-
* @returns True if the error matches the name, false otherwise.
|
|
13
|
-
*/
|
|
14
|
-
export declare function isErrorName(error: unknown, name: string): boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Gets the error message from an unknown error value.
|
|
17
|
-
* @param error The error value.
|
|
18
|
-
* @returns The error message, or a stringified version if not an Error.
|
|
19
|
-
*/
|
|
20
|
-
export declare function getErrorMessage(error: unknown): string;
|
|
21
|
-
/**
|
|
22
|
-
* Throws an error if the condition is false.
|
|
23
|
-
* @param condition The condition to check.
|
|
24
|
-
* @param message The error message to throw if the condition is false.
|
|
25
|
-
*/
|
|
26
|
-
export declare function assert(condition: any, message: string): asserts condition;
|
|
27
|
-
/**
|
|
28
|
-
* Wraps a function and catches errors, returning a fallback value if an error occurs.
|
|
29
|
-
* @param fn The function to wrap.
|
|
30
|
-
* @param fallback The fallback value to return on error.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* const result = await tryCatch(async () => {
|
|
34
|
-
* // some code that might throw
|
|
35
|
-
* return await fetchData();
|
|
36
|
-
* }, []);
|
|
37
|
-
* // result will be [] if fetchData throws an error*/
|
|
38
|
-
export declare function tryCatch<T>(fn: () => Promise<T> | T, fallback: T): Promise<T>;
|
|
39
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,CAItE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAQtD;AAED;;;;GAIG;AAEH,wBAAgB,MAAM,CAAC,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAIzE;AAED;;;;;;;;;;sDAUsD;AACtD,wBAAsB,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAMnF"}
|
package/dist/events/index.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adds an event listener and returns a function to remove it.
|
|
3
|
-
* @param target The event target.
|
|
4
|
-
* @param type The event type.
|
|
5
|
-
* @param handler The event handler.
|
|
6
|
-
* @param options Event listener options.
|
|
7
|
-
* @returns {() => void} Unsubscribe function.
|
|
8
|
-
*/
|
|
9
|
-
export declare function on<K extends keyof HTMLElementEventMap>(target: EventTarget, type: K, handler: (event: HTMLElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions): () => void;
|
|
10
|
-
/**
|
|
11
|
-
* Dispatches a custom event on the target.
|
|
12
|
-
* @param target The event target.
|
|
13
|
-
* @param type The event type.
|
|
14
|
-
* @param detail Optional detail data.
|
|
15
|
-
* @returns {boolean} True if not canceled.
|
|
16
|
-
*/
|
|
17
|
-
export declare function emit(target: EventTarget, type: string, detail?: any): boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Waits for a single event to occur and resolves a promise.
|
|
20
|
-
* @param target The event target.
|
|
21
|
-
* @param type The event type.
|
|
22
|
-
* @returns {Promise<Event>} Resolves with the event object.
|
|
23
|
-
*/
|
|
24
|
-
export declare function once<K extends keyof HTMLElementEventMap>(target: EventTarget, type: K): Promise<HTMLElementEventMap[K]>;
|
|
25
|
-
/**
|
|
26
|
-
* Prevents the default action for an event.
|
|
27
|
-
* @param event The event object.
|
|
28
|
-
*/
|
|
29
|
-
export declare function preventDefault(event: Event): void;
|
|
30
|
-
/**
|
|
31
|
-
* Stops propagation for an event.
|
|
32
|
-
* @param event The event object.
|
|
33
|
-
*/
|
|
34
|
-
export declare function stopPropagation(event: Event): void;
|
|
35
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,EAAE,CAAC,CAAC,SAAS,MAAM,mBAAmB,EACrD,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,KAAK,IAAI,EAChD,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GACzC,MAAM,IAAI,CAGZ;AAED;;;;;;GAMG;AAEH,wBAAgB,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,OAAO,CAE7E;AAED;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,mBAAmB,EACvD,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,CAAC,GACL,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAQjC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAEjD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAElD"}
|
package/dist/fetch/index.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Fetches a resource with a timeout.
|
|
3
|
-
* @param url The URL to fetch.
|
|
4
|
-
* @param options Fetch options.
|
|
5
|
-
* @param timeout Timeout in milliseconds (default: 8000).
|
|
6
|
-
* @returns The parsed JSON response.
|
|
7
|
-
*/
|
|
8
|
-
export declare function fetchWithTimeout(url: string, options?: RequestInit, timeout?: number): Promise<unknown>;
|
|
9
|
-
/**
|
|
10
|
-
* Sends a POST request with a JSON body.
|
|
11
|
-
* @param url The URL to post to.
|
|
12
|
-
* @param body The body to send.
|
|
13
|
-
* @param options Additional fetch options.
|
|
14
|
-
* @returns The parsed JSON response.
|
|
15
|
-
*/
|
|
16
|
-
export declare function postJson<T = unknown, R = unknown>(url: string, body: T, options?: RequestInit): Promise<R>;
|
|
17
|
-
/**
|
|
18
|
-
* Sends a GET request and returns JSON.
|
|
19
|
-
* @param url The URL to fetch.
|
|
20
|
-
* @param options Additional fetch options.
|
|
21
|
-
* @returns The parsed JSON response.
|
|
22
|
-
*/
|
|
23
|
-
export declare function getJson<T = unknown>(url: string, options?: RequestInit): Promise<T>;
|
|
24
|
-
/**
|
|
25
|
-
* Fetches a resource and returns the response as text.
|
|
26
|
-
* @param url The URL to fetch.
|
|
27
|
-
* @param options Fetch options.
|
|
28
|
-
* @returns The response as text.
|
|
29
|
-
*/
|
|
30
|
-
export declare function fetchText(url: string, options?: RequestInit): Promise<string>;
|
|
31
|
-
/**
|
|
32
|
-
* Handles fetch errors and returns a fallback value or throws.
|
|
33
|
-
* @param promise The fetch promise.
|
|
34
|
-
* @param fallback The fallback value to return on error.
|
|
35
|
-
* @returns The resolved value or the fallback.
|
|
36
|
-
*/
|
|
37
|
-
export declare function handleApiError<T>(promise: Promise<T>, fallback?: T): Promise<T>;
|
|
38
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fetch/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACrC,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,WAAgB,EACzB,OAAO,SAAO,GACZ,OAAO,CAAC,OAAO,CAAC,CAUlB;AAED;;;;;;GAMG;AACH,wBAAsB,QAAQ,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,EACtD,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,CAAC,EACP,OAAO,GAAE,WAAgB,GACvB,OAAO,CAAC,CAAC,CAAC,CAQZ;AAED;;;;;GAKG;AACH,wBAAsB,OAAO,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,CAAC,CAAC,CAG7F;AAED;;;;;GAKG;AACH,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAGvF;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAOrF"}
|
package/dist/file/index.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reads a file as a string (UTF-8).
|
|
3
|
-
* @param {string} filePath - The path to the file.
|
|
4
|
-
* @returns {Promise<string>} The file contents as a string.
|
|
5
|
-
*/
|
|
6
|
-
export declare function readFileAsString(filePath: string): Promise<string>;
|
|
7
|
-
/**
|
|
8
|
-
* Writes a string to a file (UTF-8).
|
|
9
|
-
* @param {string} filePath - The path to the file.
|
|
10
|
-
* @param {string} data - The string data to write.
|
|
11
|
-
* @returns {Promise<void>}
|
|
12
|
-
*/
|
|
13
|
-
export declare function writeFileAsString(filePath: string, data: string): Promise<void>;
|
|
14
|
-
/**
|
|
15
|
-
* Checks if a file exists.
|
|
16
|
-
* @param {string} filePath - The path to the file.
|
|
17
|
-
* @returns {Promise<boolean>} True if the file exists, false otherwise.
|
|
18
|
-
*/
|
|
19
|
-
export declare function fileExists(filePath: string): Promise<boolean>;
|
|
20
|
-
/**
|
|
21
|
-
* Deletes a file.
|
|
22
|
-
* @param {string} filePath - The path to the file.
|
|
23
|
-
* @returns {Promise<void>}
|
|
24
|
-
*/
|
|
25
|
-
export declare function deleteFile(filePath: string): Promise<void>;
|
|
26
|
-
/**
|
|
27
|
-
* Gets the file extension from a file path.
|
|
28
|
-
* @param {string} filePath - The path to the file.
|
|
29
|
-
* @returns {string} The file extension (including the dot), or an empty string if none.
|
|
30
|
-
*/
|
|
31
|
-
export declare function getFileExtension(filePath: string): string;
|
|
32
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/file/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/file/index.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAExE;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAErF;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOnE;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEhE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEzD"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pads a string or number with leading zeros to a given length.
|
|
3
|
-
* @param value The value to pad.
|
|
4
|
-
* @param length The desired length.
|
|
5
|
-
* @returns The padded string.
|
|
6
|
-
*/
|
|
7
|
-
export declare function padZero(value: string | number, length?: number): string;
|
|
8
|
-
/**
|
|
9
|
-
* Capitalizes the first character of a string.
|
|
10
|
-
* @param str The string to capitalize.
|
|
11
|
-
* @returns The capitalized string.
|
|
12
|
-
*/
|
|
13
|
-
export declare function capitalize(str: string): string;
|
|
14
|
-
/**
|
|
15
|
-
* Converts a string to title case (first letter of each word capitalized).
|
|
16
|
-
* @param str The string to convert.
|
|
17
|
-
* @returns The title-cased string.
|
|
18
|
-
*/
|
|
19
|
-
export declare function toTitleCase(str: string): string;
|
|
20
|
-
/**
|
|
21
|
-
* Formats a number with thousands separators.
|
|
22
|
-
* @param num The number to format.
|
|
23
|
-
* @param locale Optional locale string (default: 'en-US').
|
|
24
|
-
* @returns The formatted string.
|
|
25
|
-
*/
|
|
26
|
-
export declare function formatNumber(num: number, locale?: string): string;
|
|
27
|
-
/**
|
|
28
|
-
* Formats a number as a percentage string.
|
|
29
|
-
* @param value The value to format (e.g. 0.25 for 25%).
|
|
30
|
-
* @param fractionDigits Number of decimal places (default: 0).
|
|
31
|
-
* @returns The formatted percentage string.
|
|
32
|
-
*/
|
|
33
|
-
export declare function formatPercent(value: number, fractionDigits?: number): string;
|
|
34
|
-
/**
|
|
35
|
-
* Formats a Date as YYYY-MM-DD.
|
|
36
|
-
* @param date The date to format.
|
|
37
|
-
* @returns The formatted date string.
|
|
38
|
-
*/
|
|
39
|
-
export declare function formatDate(date: Date): string;
|
|
40
|
-
/**
|
|
41
|
-
* Formats a Date as HH:MM:SS.
|
|
42
|
-
* @param date The date to format.
|
|
43
|
-
* @returns The formatted time string.
|
|
44
|
-
*/
|
|
45
|
-
export declare function formatTime(date: Date): string;
|
|
46
|
-
/**
|
|
47
|
-
* Formats a Date as YYYY-MM-DD HH:MM:SS.
|
|
48
|
-
* @param date The date to format.
|
|
49
|
-
* @returns The formatted date-time string.
|
|
50
|
-
*/
|
|
51
|
-
export declare function formatDateTime(date: Date): string;
|
|
52
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/formatting/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,GAAE,MAAU,GAAG,MAAM,CAE1E;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG9C;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,GAAE,MAAgB,GAAG,MAAM,CAE1E;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,SAAI,GAAG,MAAM,CAEvE;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAE7C;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAE7C;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAEjD"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns a function that only calls the original function once.
|
|
3
|
-
* @param fn The function to wrap.
|
|
4
|
-
* @returns {Function}
|
|
5
|
-
*/
|
|
6
|
-
export declare function once<T extends (...args: any[]) => any>(fn: T): T;
|
|
7
|
-
/**
|
|
8
|
-
* Returns a debounced version of a function.
|
|
9
|
-
* @param fn The function to debounce.
|
|
10
|
-
* @param wait Milliseconds to wait.
|
|
11
|
-
* @returns {Function}
|
|
12
|
-
*/
|
|
13
|
-
export declare function debounce<T extends (...args: any[]) => void>(fn: T, wait: number): T;
|
|
14
|
-
/**
|
|
15
|
-
* Returns a throttled version of a function.
|
|
16
|
-
* @param fn The function to throttle.
|
|
17
|
-
* @param wait Milliseconds to wait between calls.
|
|
18
|
-
* @returns {Function}
|
|
19
|
-
*/
|
|
20
|
-
export declare function throttle<T extends (...args: any[]) => void>(fn: T, wait: number): T;
|
|
21
|
-
/**
|
|
22
|
-
* Composes functions from right to left.
|
|
23
|
-
* @param fns Functions to compose.
|
|
24
|
-
* @returns {Function}
|
|
25
|
-
*/
|
|
26
|
-
export declare function compose<T>(...fns: Array<(arg: T) => T>): (arg: T) => T;
|
|
27
|
-
/**
|
|
28
|
-
* Pipes functions from left to right.
|
|
29
|
-
* @param fns Functions to pipe.
|
|
30
|
-
* @returns {Function}
|
|
31
|
-
*/
|
|
32
|
-
export declare function pipe<T>(...fns: Array<(arg: T) => T>): (arg: T) => T;
|
|
33
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wBAAgB,IAAI,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,CAUhE;AAED;;;;;GAKG;AAEH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAMnF;AAED;;;;;GAKG;AAEH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CASnF;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAEtE;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAEnE"}
|
package/dist/geometry/index.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Calculates the distance between two points in 2D space.
|
|
3
|
-
* @param x1 X coordinate of first point.
|
|
4
|
-
* @param y1 Y coordinate of first point.
|
|
5
|
-
* @param x2 X coordinate of second point.
|
|
6
|
-
* @param y2 Y coordinate of second point.
|
|
7
|
-
* @returns {number} The distance.
|
|
8
|
-
*/
|
|
9
|
-
export declare function distance2D(x1: number, y1: number, x2: number, y2: number): number;
|
|
10
|
-
/**
|
|
11
|
-
* Calculates the midpoint between two points in 2D space.
|
|
12
|
-
* @param x1 X coordinate of first point.
|
|
13
|
-
* @param y1 Y coordinate of first point.
|
|
14
|
-
* @param x2 X coordinate of second point.
|
|
15
|
-
* @param y2 Y coordinate of second point.
|
|
16
|
-
* @returns {[number, number]} The midpoint as [x, y].
|
|
17
|
-
*/
|
|
18
|
-
export declare function midpoint2D(x1: number, y1: number, x2: number, y2: number): [number, number];
|
|
19
|
-
/**
|
|
20
|
-
* Calculates the angle (in radians) between two points in 2D space.
|
|
21
|
-
* @param x1 X coordinate of first point.
|
|
22
|
-
* @param y1 Y coordinate of first point.
|
|
23
|
-
* @param x2 X coordinate of second point.
|
|
24
|
-
* @param y2 Y coordinate of second point.
|
|
25
|
-
* @returns {number} The angle in radians.
|
|
26
|
-
*/
|
|
27
|
-
export declare function angle2D(x1: number, y1: number, x2: number, y2: number): number;
|
|
28
|
-
/**
|
|
29
|
-
* Checks if a point is inside a rectangle.
|
|
30
|
-
* @param px X coordinate of the point.
|
|
31
|
-
* @param py Y coordinate of the point.
|
|
32
|
-
* @param rx X coordinate of the rectangle's top-left corner.
|
|
33
|
-
* @param ry Y coordinate of the rectangle's top-left corner.
|
|
34
|
-
* @param rw Rectangle width.
|
|
35
|
-
* @param rh Rectangle height.
|
|
36
|
-
* @returns {boolean} True if inside, false otherwise.
|
|
37
|
-
*/
|
|
38
|
-
export declare function pointInRect(px: number, py: number, rx: number, ry: number, rw: number, rh: number): boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Checks if two rectangles overlap.
|
|
41
|
-
* @param ax X of rect A.
|
|
42
|
-
* @param ay Y of rect A.
|
|
43
|
-
* @param aw Width of rect A.
|
|
44
|
-
* @param ah Height of rect A.
|
|
45
|
-
* @param bx X of rect B.
|
|
46
|
-
* @param by Y of rect B.
|
|
47
|
-
* @param bw Width of rect B.
|
|
48
|
-
* @param bh Height of rect B.
|
|
49
|
-
* @returns {boolean} True if rectangles overlap.
|
|
50
|
-
*/
|
|
51
|
-
export declare function rectsOverlap(ax: number, ay: number, aw: number, ah: number, bx: number, by: number, bw: number, bh: number): boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Calculates the area of a polygon given its vertices (Shoelace formula).
|
|
54
|
-
* @param points Array of [x, y] pairs.
|
|
55
|
-
* @returns {number} The area (positive value).
|
|
56
|
-
*/
|
|
57
|
-
export declare function polygonArea(points: [number, number][]): number;
|
|
58
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/geometry/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAEjF;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAE3F;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAE9E;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAC1B,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACR,OAAO,CAET;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAC3B,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACR,OAAO,CAET;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,MAAM,CAY9D"}
|
package/dist/html/index.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Escapes special HTML characters in a string to prevent XSS attacks.
|
|
3
|
-
* @param str The string to escape.
|
|
4
|
-
* @returns The escaped string.
|
|
5
|
-
*/
|
|
6
|
-
export declare function escapeHtml(str: string): string;
|
|
7
|
-
/**
|
|
8
|
-
* Unescapes HTML entities in a string.
|
|
9
|
-
* @param str The string to unescape.
|
|
10
|
-
* @returns The unescaped string.
|
|
11
|
-
*/
|
|
12
|
-
export declare function unescapeHtml(str: string): string;
|
|
13
|
-
/**
|
|
14
|
-
* Strips all HTML tags from a string.
|
|
15
|
-
* @param str The string to strip tags from.
|
|
16
|
-
* @returns The plain text string.
|
|
17
|
-
*/
|
|
18
|
-
export declare function stripHtmlTags(str: string): string;
|
|
19
|
-
/**
|
|
20
|
-
* Converts a plain text string to a simple HTML paragraph (\n to <br>).
|
|
21
|
-
* @param str The plain text string.
|
|
22
|
-
* @returns The HTML string with <br> tags.
|
|
23
|
-
*/
|
|
24
|
-
export declare function textToHtml(str: string): string;
|
|
25
|
-
/**
|
|
26
|
-
* Checks if a string contains any HTML tags.
|
|
27
|
-
* @param str The string to check.
|
|
28
|
-
* @returns True if the string contains HTML tags, false otherwise.
|
|
29
|
-
*/
|
|
30
|
-
export declare function containsHtml(str: string): boolean;
|
|
31
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/html/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/html/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAO9C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAOhD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEjD"}
|
package/dist/i18n/index.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Detects the user's preferred language from the browser or Node.js environment.
|
|
3
|
-
* @returns {string} The language code (e.g., 'en', 'fr').
|
|
4
|
-
*/
|
|
5
|
-
export declare function detectLanguage(defaultLang?: string): string;
|
|
6
|
-
/**
|
|
7
|
-
* Formats a number as a localized string.
|
|
8
|
-
* @param value The number to format.
|
|
9
|
-
* @param locale The locale code (e.g., 'en-US').
|
|
10
|
-
* @param options Intl.NumberFormat options.
|
|
11
|
-
* @returns {string}
|
|
12
|
-
*/
|
|
13
|
-
export declare function formatNumber(value: number, locale?: string, options?: Intl.NumberFormatOptions): string;
|
|
14
|
-
/**
|
|
15
|
-
* Formats a date as a localized string.
|
|
16
|
-
* @param date The date to format.
|
|
17
|
-
* @param locale The locale code (e.g., 'en-US').
|
|
18
|
-
* @param options Intl.DateTimeFormat options.
|
|
19
|
-
* @returns {string}
|
|
20
|
-
*/
|
|
21
|
-
export declare function formatDateI18n(date: Date, locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
|
22
|
-
/**
|
|
23
|
-
* Simple translation function using a dictionary object.
|
|
24
|
-
* @param key The translation key.
|
|
25
|
-
* @param dict The dictionary object (e.g., { en: { hello: 'Hello' }, fr: { hello: 'Bonjour' } }).
|
|
26
|
-
* @param lang The language code (optional, defaults to detected language).
|
|
27
|
-
* @returns {string}
|
|
28
|
-
*/
|
|
29
|
-
export declare function t(key: string, dict: Record<string, Record<string, string>>, lang?: string): string;
|
|
30
|
-
/**
|
|
31
|
-
* Pluralizes a word based on a count (basic English only).
|
|
32
|
-
* @param word The word to pluralize.
|
|
33
|
-
* @param count The count.
|
|
34
|
-
* @returns {string}
|
|
35
|
-
*/
|
|
36
|
-
export declare function pluralize(word: string, count: number): string;
|
|
37
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/i18n/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,cAAc,CAAC,WAAW,GAAE,MAAa,GAAG,MAAM,CAQjE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC3B,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,GAChC,MAAM,CAER;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC7B,IAAI,EAAE,IAAI,EACV,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,IAAI,CAAC,qBAAqB,GAClC,MAAM,CAER;AAED;;;;;;GAMG;AACH,wBAAgB,CAAC,CAChB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAC5C,IAAI,CAAC,EAAE,MAAM,GACX,MAAM,CAGR;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE7D"}
|
package/dist/index.d.ts
DELETED
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,WAAW,cAGvB,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,GAAG,SAAS,SAEjD,CAAA"}
|
package/dist/interval/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Runs a function repeatedly at a specified interval (cross-platform).
|
|
3
|
-
* @param fn The function to run.
|
|
4
|
-
* @param ms The interval in milliseconds.
|
|
5
|
-
* @returns The interval ID (NodeJS.Timeout or number).
|
|
6
|
-
*/
|
|
7
|
-
export declare function runInterval(fn: () => void, ms: number): ReturnType<typeof setInterval>;
|
|
8
|
-
/**
|
|
9
|
-
* Cancels an interval by its ID (cross-platform).
|
|
10
|
-
* @param id The interval ID (NodeJS.Timeout or number).
|
|
11
|
-
*/
|
|
12
|
-
export declare function clearIntervalById(id: ReturnType<typeof setInterval>): void;
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interval/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAEtF;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,GAAG,IAAI,CAE1E"}
|
package/dist/json/index.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Safely parses a JSON string, returning a fallback value if parsing fails.
|
|
3
|
-
* @param {string} str - The JSON string to parse.
|
|
4
|
-
* @param {any} [fallback=null] - The value to return if parsing fails.
|
|
5
|
-
* @returns The parsed object or the fallback value.
|
|
6
|
-
*/
|
|
7
|
-
export declare function safeJsonParse<T = any>(str: string, fallback?: T | null): T | null;
|
|
8
|
-
/**
|
|
9
|
-
* Safely stringifies a value to JSON, returning a fallback value if stringification fails.
|
|
10
|
-
* @param {any} value - The value to stringify.
|
|
11
|
-
* @param {string} [fallback=null] - The value to return if stringification fails.
|
|
12
|
-
* @returns The JSON string or the fallback value.
|
|
13
|
-
*/
|
|
14
|
-
export declare function safeJsonStringify(value: any, fallback?: string | null): string | null;
|
|
15
|
-
/**
|
|
16
|
-
* Checks if a string is valid JSON.
|
|
17
|
-
* @param {string} str - The string to check.
|
|
18
|
-
* @returns {boolean} True if the string is valid JSON, false otherwise.
|
|
19
|
-
*/
|
|
20
|
-
export declare function isValidJson(str: string): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Deep clones a value using JSON serialization.
|
|
23
|
-
* Note: Only works for JSON-safe values (no functions, undefined, etc).
|
|
24
|
-
* @param {T} value - The value to clone.
|
|
25
|
-
* @returns {T} The deep-cloned value.
|
|
26
|
-
*/
|
|
27
|
-
export declare function deepCloneJson<T>(value: T): T;
|
|
28
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/json/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/json/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,wBAAgB,aAAa,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,GAAE,CAAC,GAAG,IAAW,GAAG,CAAC,GAAG,IAAI,CAMvF;AAED;;;;;GAKG;AAEH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,GAAE,MAAM,GAAG,IAAW,GAAG,MAAM,GAAG,IAAI,CAM3F;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAOhD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAE5C"}
|
package/dist/logger/logger.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger/logger.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AAGvB,eAAO,MAAM,MAAM,6BAyBO,CAAA"}
|
package/dist/logging/index.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Logs a message with a timestamp.
|
|
3
|
-
* @param message The message to log.
|
|
4
|
-
* @param level The log level (default: 'info').
|
|
5
|
-
*/
|
|
6
|
-
export declare function logWithTimestamp(message: string, level?: 'info' | 'warn' | 'error'): void;
|
|
7
|
-
/**
|
|
8
|
-
* Logs a warning message.
|
|
9
|
-
* @param message The warning message.
|
|
10
|
-
*/
|
|
11
|
-
export declare function warn(message: string): void;
|
|
12
|
-
/**
|
|
13
|
-
* Logs an error message.
|
|
14
|
-
* @param message The error message.
|
|
15
|
-
*/
|
|
16
|
-
export declare function error(message: string): void;
|
|
17
|
-
/**
|
|
18
|
-
* Logs an info message.
|
|
19
|
-
* @param message The info message.
|
|
20
|
-
*/
|
|
21
|
-
export declare function info(message: string): void;
|
|
22
|
-
/**
|
|
23
|
-
* Captures all console output and returns a function to restore it.
|
|
24
|
-
* @param callback Function to call with each log message.
|
|
25
|
-
* @returns {() => void} Restore function.
|
|
26
|
-
*/
|
|
27
|
-
export declare function captureConsole(callback: (type: string, ...args: any[]) => void): () => void;
|
|
28
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/logging/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,MAAM,GAAG,MAAM,GAAG,OAAgB,GAAG,IAAI,CAIjG;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAG1C;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAG3C;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAG1C;AAED;;;;GAIG;AAEH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,GAAG,MAAM,IAAI,CAgB3F"}
|
package/dist/logging/index1.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Console utility functions for logging and disabling console output in production.
|
|
3
|
-
* @module console
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Logs a message with a timestamp.
|
|
7
|
-
*
|
|
8
|
-
* @export
|
|
9
|
-
* @param {...any[]} args
|
|
10
|
-
*/
|
|
11
|
-
export declare const logWithTimestamp: (...args: any[]) => void;
|
|
12
|
-
/**
|
|
13
|
-
* Logs a warning message in yellow.
|
|
14
|
-
*
|
|
15
|
-
* @export
|
|
16
|
-
* @param {...any[]} args
|
|
17
|
-
*/
|
|
18
|
-
export declare const warn: (...args: any[]) => void;
|
|
19
|
-
/**
|
|
20
|
-
* Logs an error message in red.
|
|
21
|
-
*
|
|
22
|
-
* @export
|
|
23
|
-
* @param {...any[]} args
|
|
24
|
-
*/
|
|
25
|
-
export declare const error: (...args: any[]) => void;
|
|
26
|
-
/**
|
|
27
|
-
* Logs an info message in blue.
|
|
28
|
-
*
|
|
29
|
-
* @export
|
|
30
|
-
* @param {...any[]} args
|
|
31
|
-
*/
|
|
32
|
-
export declare const info: (...args: any[]) => void;
|
|
33
|
-
//# sourceMappingURL=index1.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index1.d.ts","sourceRoot":"","sources":["../../src/logging/index1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH;;;;;GAKG;AAEH,eAAO,MAAM,gBAAgB,GAAI,GAAG,MAAM,GAAG,EAAE,SAG9C,CAAA;AAED;;;;;GAKG;AAEH,eAAO,MAAM,IAAI,GAAI,GAAG,MAAM,GAAG,EAAE,SAElC,CAAA;AAED;;;;;GAKG;AAEH,eAAO,MAAM,KAAK,GAAI,GAAG,MAAM,GAAG,EAAE,SAEnC,CAAA;AAED;;;;;GAKG;AAEH,eAAO,MAAM,IAAI,GAAI,GAAG,MAAM,GAAG,EAAE,SAElC,CAAA"}
|
package/dist/maps/index.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Inverts a Map (swaps keys and values). If duplicate values exist, later keys overwrite earlier ones.
|
|
3
|
-
* @param map The map to invert.
|
|
4
|
-
* @returns {Map<any, any>} The inverted map.
|
|
5
|
-
*/
|
|
6
|
-
export declare function invertMap<K, V>(map: Map<K, V>): Map<V, K>;
|
|
7
|
-
/**
|
|
8
|
-
* Maps the values of a Map using a function.
|
|
9
|
-
* @param map The map to map over.
|
|
10
|
-
* @param fn The function to apply to each value.
|
|
11
|
-
* @returns {Map<K, U>} A new map with mapped values.
|
|
12
|
-
*/
|
|
13
|
-
export declare function mapValues<K, V, U>(map: Map<K, V>, fn: (value: V, key: K) => U): Map<K, U>;
|
|
14
|
-
/**
|
|
15
|
-
* Merges two or more maps. Later maps overwrite earlier keys.
|
|
16
|
-
* @param maps The maps to merge.
|
|
17
|
-
* @returns {Map<K, V>} The merged map.
|
|
18
|
-
*/
|
|
19
|
-
export declare function mergeMaps<K, V>(...maps: Map<K, V>[]): Map<K, V>;
|
|
20
|
-
/**
|
|
21
|
-
* Converts an object to a Map.
|
|
22
|
-
* @param obj The object to convert.
|
|
23
|
-
* @returns {Map<string, any>} The resulting map.
|
|
24
|
-
*/
|
|
25
|
-
export declare function objectToMap<T extends object>(obj: T): Map<string, any>;
|
|
26
|
-
/**
|
|
27
|
-
* Converts a Map to an object.
|
|
28
|
-
* @param map The map to convert.
|
|
29
|
-
* @returns {Record<string, any>} The resulting object.
|
|
30
|
-
*/
|
|
31
|
-
export declare function mapToObject<V>(map: Map<string, V>): Record<string, V>;
|
|
32
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/maps/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/maps/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAMzD;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAMzF;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAQ/D;AAED;;;;GAIG;AAEH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAEtE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAMrE"}
|
package/dist/math/index.d.ts
DELETED
package/dist/math/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/math/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA"}
|
package/dist/math/math.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Add two numbers.
|
|
3
|
-
* For example, 1 + 2 = 3.
|
|
4
|
-
*
|
|
5
|
-
* @param {number} a
|
|
6
|
-
* @param {number} b
|
|
7
|
-
* @returns {number} number
|
|
8
|
-
*/
|
|
9
|
-
export declare const add: (a: number, b: number) => number;
|
|
10
|
-
/**
|
|
11
|
-
* Subtract two numbers.
|
|
12
|
-
* For example, 2 - 1 = 1.
|
|
13
|
-
*
|
|
14
|
-
* @param {number} a
|
|
15
|
-
* @param {number} b
|
|
16
|
-
* @returns {number} number
|
|
17
|
-
*/
|
|
18
|
-
export declare const subtract: (a: number, b: number) => number;
|
|
19
|
-
/**
|
|
20
|
-
* Multiply two numbers.
|
|
21
|
-
* For example, 2 * 2 = 4.
|
|
22
|
-
*
|
|
23
|
-
* @param {number} a
|
|
24
|
-
* @param {number} b
|
|
25
|
-
* @returns {number} number
|
|
26
|
-
*/
|
|
27
|
-
export declare const multiply: (a: number, b: number) => number;
|
|
28
|
-
/**
|
|
29
|
-
* Divide two numbers.
|
|
30
|
-
* For example, 4 / 2 = 2.
|
|
31
|
-
*
|
|
32
|
-
* @param {number} a
|
|
33
|
-
* @param {number} b
|
|
34
|
-
* @returns {number} number
|
|
35
|
-
*/
|
|
36
|
-
export declare const divide: (a: number, b: number) => number;
|
|
37
|
-
//# sourceMappingURL=math.d.ts.map
|
package/dist/math/math.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../src/math/math.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,GAAG,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,MAAe,CAAA;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,MAAe,CAAA;AAE/D;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,MAAe,CAAA;AAE/D;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,MAAe,CAAA"}
|
package/dist/math/sum/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/math/sum/index.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,GAAG,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,WAAU,CAAA;AAE3C,OAAO,EAAE,GAAG,EAAE,CAAA"}
|