@alextheman/utility 5.2.0 → 5.3.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/dist/index.cjs CHANGED
@@ -38,6 +38,10 @@ const FILE_PATH_REGEX = String.raw`^(?<directory>.+)[\/\\](?<base>[^\/\\]+)$`;
38
38
  //#region src/root/constants/NAMESPACE_EXPORT_REGEX.ts
39
39
  const NAMESPACE_EXPORT_REGEX = "export\\s+\\*\\s+from";
40
40
 
41
+ //#endregion
42
+ //#region src/root/constants/ONE_DAY_IN_MILLISECONDS.ts
43
+ const ONE_DAY_IN_MILLISECONDS = 1440 * 60 * 1e3;
44
+
41
45
  //#endregion
42
46
  //#region src/root/constants/VERSION_NUMBER_REGEX.ts
43
47
  const VERSION_NUMBER_REGEX = "^(?:v)?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$";
@@ -1614,6 +1618,7 @@ exports.DataError = DataError;
1614
1618
  exports.Env = Env;
1615
1619
  exports.FILE_PATH_REGEX = FILE_PATH_REGEX;
1616
1620
  exports.NAMESPACE_EXPORT_REGEX = NAMESPACE_EXPORT_REGEX;
1621
+ exports.ONE_DAY_IN_MILLISECONDS = ONE_DAY_IN_MILLISECONDS;
1617
1622
  exports.VERSION_NUMBER_REGEX = VERSION_NUMBER_REGEX;
1618
1623
  exports.VersionNumber = VersionNumber;
1619
1624
  exports.VersionType = VersionType;
package/dist/index.d.cts CHANGED
@@ -7,6 +7,9 @@ declare const FILE_PATH_REGEX: string;
7
7
  //#region src/root/constants/NAMESPACE_EXPORT_REGEX.d.ts
8
8
  declare const NAMESPACE_EXPORT_REGEX = "export\\s+\\*\\s+from";
9
9
  //#endregion
10
+ //#region src/root/constants/ONE_DAY_IN_MILLISECONDS.d.ts
11
+ declare const ONE_DAY_IN_MILLISECONDS: number;
12
+ //#endregion
10
13
  //#region src/root/constants/VERSION_NUMBER_REGEX.d.ts
11
14
  declare const VERSION_NUMBER_REGEX: string;
12
15
  //#endregion
@@ -1080,4 +1083,4 @@ declare function normaliseIndents(strings: TemplateStringsArray, ...interpolatio
1080
1083
  */
1081
1084
  declare const normalizeIndents: typeof normaliseIndents;
1082
1085
  //#endregion
1083
- export { APIError, ArrayElement, CallReturnType, CamelToKebabOptions, CreateEnumType, CreateFormDataOptions, CreateFormDataOptionsNullableResolution, CreateFormDataOptionsUndefinedOrNullResolution, DataError, DisallowUndefined, Env, FILE_PATH_REGEX, FormDataArrayResolutionStrategy, FormDataNullableResolutionStrategy, HTTPErrorCode, IgnoreCase, IsTypeArgumentString, KebabToCamelOptions, NAMESPACE_EXPORT_REGEX, NonUndefined, NormaliseIndentsFunction, NormaliseIndentsOptions, NormalizeIndentsFunction, NormalizeIndentsOptions, OptionalOnCondition, ParallelTuple, RecordKey, RemoveUndefined, StringListToArrayOptions, VERSION_NUMBER_REGEX, VersionNumber, FormatOptionsBase as VersionNumberToStringOptions, VersionType, addDaysToDate, appendSemicolon, camelToKebab, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, encryptWithKey, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, normaliseIndents, normalizeIndents, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseVersionType, parseZodSchema, parseZodSchemaAsync, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, stringListToArray, stringifyDotenv, truncate, wait, zodVersionNumber };
1086
+ export { APIError, ArrayElement, CallReturnType, CamelToKebabOptions, CreateEnumType, CreateFormDataOptions, CreateFormDataOptionsNullableResolution, CreateFormDataOptionsUndefinedOrNullResolution, DataError, DisallowUndefined, Env, FILE_PATH_REGEX, FormDataArrayResolutionStrategy, FormDataNullableResolutionStrategy, HTTPErrorCode, IgnoreCase, IsTypeArgumentString, KebabToCamelOptions, NAMESPACE_EXPORT_REGEX, NonUndefined, NormaliseIndentsFunction, NormaliseIndentsOptions, NormalizeIndentsFunction, NormalizeIndentsOptions, ONE_DAY_IN_MILLISECONDS, OptionalOnCondition, ParallelTuple, RecordKey, RemoveUndefined, StringListToArrayOptions, VERSION_NUMBER_REGEX, VersionNumber, FormatOptionsBase as VersionNumberToStringOptions, VersionType, addDaysToDate, appendSemicolon, camelToKebab, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, encryptWithKey, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, normaliseIndents, normalizeIndents, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseVersionType, parseZodSchema, parseZodSchemaAsync, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, stringListToArray, stringifyDotenv, truncate, wait, zodVersionNumber };
package/dist/index.d.ts CHANGED
@@ -7,6 +7,9 @@ declare const FILE_PATH_REGEX: string;
7
7
  //#region src/root/constants/NAMESPACE_EXPORT_REGEX.d.ts
8
8
  declare const NAMESPACE_EXPORT_REGEX = "export\\s+\\*\\s+from";
9
9
  //#endregion
10
+ //#region src/root/constants/ONE_DAY_IN_MILLISECONDS.d.ts
11
+ declare const ONE_DAY_IN_MILLISECONDS: number;
12
+ //#endregion
10
13
  //#region src/root/constants/VERSION_NUMBER_REGEX.d.ts
11
14
  declare const VERSION_NUMBER_REGEX: string;
12
15
  //#endregion
@@ -1080,4 +1083,4 @@ declare function normaliseIndents(strings: TemplateStringsArray, ...interpolatio
1080
1083
  */
1081
1084
  declare const normalizeIndents: typeof normaliseIndents;
1082
1085
  //#endregion
1083
- export { APIError, type ArrayElement, type CallReturnType, CamelToKebabOptions, type CreateEnumType, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, DataError, type DisallowUndefined, Env, FILE_PATH_REGEX, type FormDataArrayResolutionStrategy, type FormDataNullableResolutionStrategy, type HTTPErrorCode, type IgnoreCase, type IsTypeArgumentString, KebabToCamelOptions, NAMESPACE_EXPORT_REGEX, type NonUndefined, NormaliseIndentsFunction, NormaliseIndentsOptions, NormalizeIndentsFunction, NormalizeIndentsOptions, type OptionalOnCondition, ParallelTuple, type RecordKey, type RemoveUndefined, type StringListToArrayOptions, VERSION_NUMBER_REGEX, VersionNumber, type FormatOptionsBase as VersionNumberToStringOptions, VersionType, addDaysToDate, appendSemicolon, camelToKebab, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, encryptWithKey, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, normaliseIndents, normalizeIndents, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseVersionType, parseZodSchema, parseZodSchemaAsync, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, stringListToArray, stringifyDotenv, truncate, wait, zodVersionNumber };
1086
+ export { APIError, type ArrayElement, type CallReturnType, CamelToKebabOptions, type CreateEnumType, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, DataError, type DisallowUndefined, Env, FILE_PATH_REGEX, type FormDataArrayResolutionStrategy, type FormDataNullableResolutionStrategy, type HTTPErrorCode, type IgnoreCase, type IsTypeArgumentString, KebabToCamelOptions, NAMESPACE_EXPORT_REGEX, type NonUndefined, NormaliseIndentsFunction, NormaliseIndentsOptions, NormalizeIndentsFunction, NormalizeIndentsOptions, ONE_DAY_IN_MILLISECONDS, type OptionalOnCondition, ParallelTuple, type RecordKey, type RemoveUndefined, type StringListToArrayOptions, VERSION_NUMBER_REGEX, VersionNumber, type FormatOptionsBase as VersionNumberToStringOptions, VersionType, addDaysToDate, appendSemicolon, camelToKebab, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, encryptWithKey, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, normaliseIndents, normalizeIndents, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseVersionType, parseZodSchema, parseZodSchemaAsync, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, stringListToArray, stringifyDotenv, truncate, wait, zodVersionNumber };
package/dist/index.js CHANGED
@@ -8,6 +8,10 @@ const FILE_PATH_REGEX = String.raw`^(?<directory>.+)[\/\\](?<base>[^\/\\]+)$`;
8
8
  //#region src/root/constants/NAMESPACE_EXPORT_REGEX.ts
9
9
  const NAMESPACE_EXPORT_REGEX = "export\\s+\\*\\s+from";
10
10
 
11
+ //#endregion
12
+ //#region src/root/constants/ONE_DAY_IN_MILLISECONDS.ts
13
+ const ONE_DAY_IN_MILLISECONDS = 1440 * 60 * 1e3;
14
+
11
15
  //#endregion
12
16
  //#region src/root/constants/VERSION_NUMBER_REGEX.ts
13
17
  const VERSION_NUMBER_REGEX = "^(?:v)?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$";
@@ -1579,4 +1583,4 @@ function truncate(stringToTruncate, maxLength = 5) {
1579
1583
  }
1580
1584
 
1581
1585
  //#endregion
1582
- export { APIError, DataError, Env, FILE_PATH_REGEX, NAMESPACE_EXPORT_REGEX, VERSION_NUMBER_REGEX, VersionNumber, VersionType, addDaysToDate, appendSemicolon, camelToKebab, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, encryptWithKey, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, normaliseIndents, normalizeIndents, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseVersionType, parseZodSchema, parseZodSchemaAsync, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, stringListToArray, stringifyDotenv, truncate, wait, zodVersionNumber };
1586
+ export { APIError, DataError, Env, FILE_PATH_REGEX, NAMESPACE_EXPORT_REGEX, ONE_DAY_IN_MILLISECONDS, VERSION_NUMBER_REGEX, VersionNumber, VersionType, addDaysToDate, appendSemicolon, camelToKebab, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, encryptWithKey, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, normaliseIndents, normalizeIndents, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseVersionType, parseZodSchema, parseZodSchemaAsync, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, stringListToArray, stringifyDotenv, truncate, wait, zodVersionNumber };
@@ -185,6 +185,10 @@ var DataError = class DataError extends Error {
185
185
  //#region src/root/constants/FILE_PATH_REGEX.ts
186
186
  const FILE_PATH_REGEX = String.raw`^(?<directory>.+)[\/\\](?<base>[^\/\\]+)$`;
187
187
 
188
+ //#endregion
189
+ //#region src/root/constants/ONE_DAY_IN_MILLISECONDS.ts
190
+ const ONE_DAY_IN_MILLISECONDS = 1440 * 60 * 1e3;
191
+
188
192
  //#endregion
189
193
  //#region src/root/constants/VERSION_NUMBER_REGEX.ts
190
194
  const VERSION_NUMBER_REGEX = "^(?:v)?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$";
@@ -155,6 +155,10 @@ var DataError = class DataError extends Error {
155
155
  //#region src/root/constants/FILE_PATH_REGEX.ts
156
156
  const FILE_PATH_REGEX = String.raw`^(?<directory>.+)[\/\\](?<base>[^\/\\]+)$`;
157
157
 
158
+ //#endregion
159
+ //#region src/root/constants/ONE_DAY_IN_MILLISECONDS.ts
160
+ const ONE_DAY_IN_MILLISECONDS = 1440 * 60 * 1e3;
161
+
158
162
  //#endregion
159
163
  //#region src/root/constants/VERSION_NUMBER_REGEX.ts
160
164
  const VERSION_NUMBER_REGEX = "^(?:v)?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$";
@@ -72,6 +72,10 @@ const normaliseImportPath = normalizeImportPath;
72
72
  //#region src/root/constants/FILE_PATH_REGEX.ts
73
73
  const FILE_PATH_REGEX = String.raw`^(?<directory>.+)[\/\\](?<base>[^\/\\]+)$`;
74
74
 
75
+ //#endregion
76
+ //#region src/root/constants/ONE_DAY_IN_MILLISECONDS.ts
77
+ const ONE_DAY_IN_MILLISECONDS = 1440 * 60 * 1e3;
78
+
75
79
  //#endregion
76
80
  //#region src/root/constants/VERSION_NUMBER_REGEX.ts
77
81
  const VERSION_NUMBER_REGEX = "^(?:v)?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$";
@@ -42,6 +42,10 @@ const normaliseImportPath = normalizeImportPath;
42
42
  //#region src/root/constants/FILE_PATH_REGEX.ts
43
43
  const FILE_PATH_REGEX = String.raw`^(?<directory>.+)[\/\\](?<base>[^\/\\]+)$`;
44
44
 
45
+ //#endregion
46
+ //#region src/root/constants/ONE_DAY_IN_MILLISECONDS.ts
47
+ const ONE_DAY_IN_MILLISECONDS = 1440 * 60 * 1e3;
48
+
45
49
  //#endregion
46
50
  //#region src/root/constants/VERSION_NUMBER_REGEX.ts
47
51
  const VERSION_NUMBER_REGEX = "^(?:v)?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/utility",
3
- "version": "5.2.0",
3
+ "version": "5.3.0",
4
4
  "description": "Helpful utility functions.",
5
5
  "repository": {
6
6
  "type": "git",