@alextheman/utility 2.13.2 → 2.14.1

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/dist/index.d.cts CHANGED
@@ -36,6 +36,8 @@ declare function parseUUID(UUID: unknown): UUID;
36
36
 
37
37
  type DisallowUndefined<T> = undefined extends T ? ["Error: Generic type cannot include undefined"] : T;
38
38
 
39
+ type IgnoreCase<T extends string> = string extends T ? string : T extends `${infer F1}${infer F2}${infer R}` ? `${Uppercase<F1> | Lowercase<F1>}${Uppercase<F2> | Lowercase<F2>}${IgnoreCase<R>}` : T extends `${infer F}${infer R}` ? `${Uppercase<F> | Lowercase<F>}${IgnoreCase<R>}` : "";
40
+
39
41
  type NonUndefined<T> = T extends undefined ? never : T;
40
42
 
41
43
  type OptionalOnCondition<Condition extends boolean, T> = Condition extends true ? T : T | undefined;
@@ -101,4 +103,4 @@ declare function wait(seconds: number): Promise<void>;
101
103
 
102
104
  declare function interpolateObjects(strings: TemplateStringsArray, ...values: unknown[]): string;
103
105
 
104
- export { APIError, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, type DisallowUndefined, type Email, type Env, type FormDataNullableResolutionStrategy as FormDataResolutionStrategy, type HTTPErrorCode, type HTTPErrorCodes, type NonUndefined, type OptionalOnCondition, type RecordKey, type StringListToArrayOptions, type UUID, addDaysToDate, appendSemicolon, camelToKebab, convertFileToBase64, createFormData, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, httpErrorCodeLookup, interpolateObjects, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, omitProperties, parseEmail, parseEnv, parseIntStrict, parseUUID, randomiseArray, range, removeDuplicates, stringListToArray, stringToBoolean, truncate, wait };
106
+ export { APIError, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, type DisallowUndefined, type Email, type Env, type FormDataNullableResolutionStrategy as FormDataResolutionStrategy, type HTTPErrorCode, type HTTPErrorCodes, type IgnoreCase, type NonUndefined, type OptionalOnCondition, type RecordKey, type StringListToArrayOptions, type UUID, addDaysToDate, appendSemicolon, camelToKebab, convertFileToBase64, createFormData, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, httpErrorCodeLookup, interpolateObjects, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, omitProperties, parseEmail, parseEnv, parseIntStrict, parseUUID, randomiseArray, range, removeDuplicates, stringListToArray, stringToBoolean, truncate, wait };
package/dist/index.d.ts CHANGED
@@ -36,6 +36,8 @@ declare function parseUUID(UUID: unknown): UUID;
36
36
 
37
37
  type DisallowUndefined<T> = undefined extends T ? ["Error: Generic type cannot include undefined"] : T;
38
38
 
39
+ type IgnoreCase<T extends string> = string extends T ? string : T extends `${infer F1}${infer F2}${infer R}` ? `${Uppercase<F1> | Lowercase<F1>}${Uppercase<F2> | Lowercase<F2>}${IgnoreCase<R>}` : T extends `${infer F}${infer R}` ? `${Uppercase<F> | Lowercase<F>}${IgnoreCase<R>}` : "";
40
+
39
41
  type NonUndefined<T> = T extends undefined ? never : T;
40
42
 
41
43
  type OptionalOnCondition<Condition extends boolean, T> = Condition extends true ? T : T | undefined;
@@ -101,4 +103,4 @@ declare function wait(seconds: number): Promise<void>;
101
103
 
102
104
  declare function interpolateObjects(strings: TemplateStringsArray, ...values: unknown[]): string;
103
105
 
104
- export { APIError, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, type DisallowUndefined, type Email, type Env, type FormDataNullableResolutionStrategy as FormDataResolutionStrategy, type HTTPErrorCode, type HTTPErrorCodes, type NonUndefined, type OptionalOnCondition, type RecordKey, type StringListToArrayOptions, type UUID, addDaysToDate, appendSemicolon, camelToKebab, convertFileToBase64, createFormData, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, httpErrorCodeLookup, interpolateObjects, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, omitProperties, parseEmail, parseEnv, parseIntStrict, parseUUID, randomiseArray, range, removeDuplicates, stringListToArray, stringToBoolean, truncate, wait };
106
+ export { APIError, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, type DisallowUndefined, type Email, type Env, type FormDataNullableResolutionStrategy as FormDataResolutionStrategy, type HTTPErrorCode, type HTTPErrorCodes, type IgnoreCase, type NonUndefined, type OptionalOnCondition, type RecordKey, type StringListToArrayOptions, type UUID, addDaysToDate, appendSemicolon, camelToKebab, convertFileToBase64, createFormData, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, httpErrorCodeLookup, interpolateObjects, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, omitProperties, parseEmail, parseEnv, parseIntStrict, parseUUID, randomiseArray, range, removeDuplicates, stringListToArray, stringToBoolean, truncate, wait };
package/package.json CHANGED
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "name": "@alextheman/utility",
3
- "version": "2.13.2",
3
+ "version": "2.14.1",
4
4
  "description": "Helpful utility functions",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/AlexMan123456/utility.git"
8
+ },
5
9
  "license": "ISC",
6
10
  "author": "alextheman",
7
11
  "type": "module",
@@ -36,7 +40,7 @@
36
40
  "zod": "^4.1.12"
37
41
  },
38
42
  "devDependencies": {
39
- "@alextheman/eslint-plugin": "^2.5.0",
43
+ "@alextheman/eslint-plugin": "^2.6.2",
40
44
  "@eslint/js": "^9.39.1",
41
45
  "@types/node": "^24.10.0",
42
46
  "eslint": "^9.39.1",