@stackone/utils 0.19.0 → 0.21.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.
@@ -6,8 +6,13 @@ import { ZodType, z } from "zod/v4";
6
6
  declare function encodeToBase64(data: string): string;
7
7
  declare function decodeFromBase64(encodedData: string): string;
8
8
  //#endregion
9
+ //#region src/shared/caseConversion.d.ts
10
+ declare const snakeToCamel: (str: string) => string;
11
+ declare const camelToSnake: (str: string) => string;
12
+ declare const convertKeysToCamelCase: <T>(obj: T) => T;
13
+ declare const convertKeysToSnakeCase: <T>(obj: T) => T;
14
+ //#endregion
9
15
  //#region src/shared/countries/types.d.ts
10
-
11
16
  type ISO31662SubDivisionCodeNamePairs = {
12
17
  [subDivisionCode: string]: string;
13
18
  };
@@ -89,6 +94,10 @@ declare const isValidIpRanges: (patterns: string[]) => boolean;
89
94
  declare const isIpInRanges: (ip: string, patterns: string[]) => boolean;
90
95
  declare const isIpInRange: (ip: string, pattern: string) => boolean;
91
96
  //#endregion
97
+ //#region src/shared/objectSize.d.ts
98
+ declare function calculateSize(obj: unknown): number;
99
+ declare function exceedsSize(obj: unknown, maxSize: number): boolean;
100
+ //#endregion
92
101
  //#region src/shared/parsers.d.ts
93
102
  declare const safeParseToString: ({
94
103
  value
@@ -200,4 +209,4 @@ declare const getContentHash: (content: unknown) => string;
200
209
  declare const isValidUUID: (uuid: string) => boolean;
201
210
  declare const generateRequestId: (randomUUIDGenerator?: () => string) => string;
202
211
  //#endregion
203
- export { NON_BACKGROUND_LOGS_SOURCE_TYPES, NormalizedKeyMap, RequestSourceType, type ZodType, calculateNextAnniversary, calculateYearsElapsed, dateHasPassed, decodeFromBase64, deepCopy, delay, encodeToBase64, exponentialBackoffInMS, generateRequestId, generateSamlAssertion, getContentHash, getCountryAlpha2CodeByAlpha2Code, getCountryAlpha2CodeByAlpha3Code, getCountryAlpha2CodeByCitizenship, getCountryAlpha2CodeByCountryCode, getCountryAlpha2CodeByCountryName, getCountryAlpha3CodeByAlpha2Code, getCountryAlpha3CodeByAlpha3Code, getCountryAlpha3CodeByCountryCode, getCountryAlpha3CodeByCountryName, getCountryCodeByAlpha2Code, getCountryCodeByAlpha3Code, getCountryCodeByCountryCode, getCountryCodeByCountryName, getCountryNameByAlpha2Code, getCountryNameByAlpha3Code, getCountryNameByCountryCode, getCountryNameByCountryName, getCountrySubDivisionByAlpha2CodeAndName, getCountrySubDivisionCodeBySubDivisionName, getCountrySubDivisionNameBySubDivisionCode, getCountrySubDivisionsByAlpha2Code, getDocumentFileFormatFromExtension, isBoolean, isDate, isFunction, isFutureUnixTimestamp, isIpInRange, isIpInRanges, isMissing, isNumber, isObject, isString, isValidIp, isValidIpRange, isValidIpRanges, isValidUUID, notMissing, safeParseToBoolean, safeParseToDateTime, safeParseToDateTimeString, safeParseToNumber, safeParseToString, z, zStrictObject };
212
+ export { NON_BACKGROUND_LOGS_SOURCE_TYPES, NormalizedKeyMap, RequestSourceType, type ZodType, calculateNextAnniversary, calculateSize, calculateYearsElapsed, camelToSnake, convertKeysToCamelCase, convertKeysToSnakeCase, dateHasPassed, decodeFromBase64, deepCopy, delay, encodeToBase64, exceedsSize, exponentialBackoffInMS, generateRequestId, generateSamlAssertion, getContentHash, getCountryAlpha2CodeByAlpha2Code, getCountryAlpha2CodeByAlpha3Code, getCountryAlpha2CodeByCitizenship, getCountryAlpha2CodeByCountryCode, getCountryAlpha2CodeByCountryName, getCountryAlpha3CodeByAlpha2Code, getCountryAlpha3CodeByAlpha3Code, getCountryAlpha3CodeByCountryCode, getCountryAlpha3CodeByCountryName, getCountryCodeByAlpha2Code, getCountryCodeByAlpha3Code, getCountryCodeByCountryCode, getCountryCodeByCountryName, getCountryNameByAlpha2Code, getCountryNameByAlpha3Code, getCountryNameByCountryCode, getCountryNameByCountryName, getCountrySubDivisionByAlpha2CodeAndName, getCountrySubDivisionCodeBySubDivisionName, getCountrySubDivisionNameBySubDivisionCode, getCountrySubDivisionsByAlpha2Code, getDocumentFileFormatFromExtension, isBoolean, isDate, isFunction, isFutureUnixTimestamp, isIpInRange, isIpInRanges, isMissing, isNumber, isObject, isString, isValidIp, isValidIpRange, isValidIpRanges, isValidUUID, notMissing, safeParseToBoolean, safeParseToDateTime, safeParseToDateTimeString, safeParseToNumber, safeParseToString, snakeToCamel, z, zStrictObject };