@alextheman/utility 2.21.0 → 3.0.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
@@ -1,745 +1,586 @@
1
- "use strict";
1
+ //#region rolldown:runtime
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
6
  var __getProtoOf = Object.getPrototypeOf;
8
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
- var __spreadValues = (a, b) => {
12
- for (var prop in b || (b = {}))
13
- if (__hasOwnProp.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- if (__getOwnPropSymbols)
16
- for (var prop of __getOwnPropSymbols(b)) {
17
- if (__propIsEnum.call(b, prop))
18
- __defNormalProp(a, prop, b[prop]);
19
- }
20
- return a;
21
- };
22
- var __export = (target, all) => {
23
- for (var name in all)
24
- __defProp(target, name, { get: all[name], enumerable: true });
25
- };
26
8
  var __copyProps = (to, from, except, desc) => {
27
- if (from && typeof from === "object" || typeof from === "function") {
28
- for (let key of __getOwnPropNames(from))
29
- if (!__hasOwnProp.call(to, key) && key !== except)
30
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
31
- }
32
- return to;
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) {
13
+ __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ }
19
+ }
20
+ return to;
33
21
  };
34
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
35
- // If the importer is in node compatibility mode or this is not an ESM
36
- // file that has been converted to a CommonJS file using a Babel-
37
- // compatible transform (i.e. "__esModule" has not been set), then set
38
- // "default" to the CommonJS "module.exports" for node compatibility.
39
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
40
- mod
41
- ));
42
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
43
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
44
-
45
- // src/index.ts
46
- var index_exports = {};
47
- __export(index_exports, {
48
- APIError: () => APIError_default,
49
- DataError: () => DataError_default,
50
- addDaysToDate: () => addDaysToDate_default,
51
- appendSemicolon: () => appendSemicolon_default,
52
- camelToKebab: () => camelToKebab_default,
53
- convertFileToBase64: () => convertFileToBase64_default,
54
- createFormData: () => createFormData_default,
55
- createTemplateStringsArray: () => createTemplateStringsArray_default,
56
- fillArray: () => fillArray_default,
57
- formatDateAndTime: () => formatDateAndTime_default,
58
- getRandomNumber: () => getRandomNumber_default,
59
- getRecordKeys: () => getRecordKeys_default,
60
- httpErrorCodeLookup: () => httpErrorCodeLookup,
61
- interpolate: () => interpolate_default,
62
- interpolateObjects: () => interpolateObjects_default,
63
- isLeapYear: () => isLeapYear_default,
64
- isMonthlyMultiple: () => isMonthlyMultiple_default,
65
- isOrdered: () => isOrdered_default,
66
- isSameDate: () => isSameDate_default,
67
- kebabToCamel: () => kebabToCamel_default,
68
- normaliseImportPath: () => normaliseImportPath,
69
- normalizeImportPath: () => normalizeImportPath_default,
70
- omitProperties: () => omitProperties_default,
71
- paralleliseArrays: () => paralleliseArrays_default,
72
- parseEmail: () => Email_default,
73
- parseEnv: () => Env_default,
74
- parseIntStrict: () => parseIntStrict_default,
75
- parseUUID: () => UUID_default,
76
- parseZodSchema: () => parseZodSchema_default,
77
- randomiseArray: () => randomiseArray_default,
78
- range: () => range_default,
79
- removeDuplicates: () => removeDuplicates_default,
80
- removeIndents: () => removeIndents_default,
81
- stringListToArray: () => stringListToArray_default,
82
- stringToBoolean: () => stringToBoolean_default,
83
- stripIndents: () => stripIndents_default,
84
- truncate: () => truncate_default,
85
- wait: () => wait_default
86
- });
87
- module.exports = __toCommonJS(index_exports);
88
-
89
- // src/functions/addDaysToDate.ts
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
25
+ }) : target, mod));
26
+
27
+ //#endregion
28
+ let path = require("path");
29
+ path = __toESM(path);
30
+ let zod = require("zod");
31
+ zod = __toESM(zod);
32
+
33
+ //#region src/functions/addDaysToDate.ts
90
34
  function addDaysToDate(currentDate = /* @__PURE__ */ new Date(), dayIncrement = 1) {
91
- const newDate = currentDate;
92
- newDate.setDate(newDate.getDate() + dayIncrement);
93
- return newDate;
35
+ const newDate = currentDate;
36
+ newDate.setDate(newDate.getDate() + dayIncrement);
37
+ return newDate;
94
38
  }
95
39
  var addDaysToDate_default = addDaysToDate;
96
40
 
97
- // src/functions/appendSemicolon.ts
41
+ //#endregion
42
+ //#region src/functions/appendSemicolon.ts
98
43
  function appendSemicolon(stringToAppendTo) {
99
- if (stringToAppendTo.includes("\n")) {
100
- throw new Error("MULTIPLE_LINE_ERROR");
101
- }
102
- const stringWithNoTrailingWhitespace = stringToAppendTo.trimEnd();
103
- if (stringWithNoTrailingWhitespace === "") {
104
- return "";
105
- }
106
- return stringWithNoTrailingWhitespace[stringWithNoTrailingWhitespace.length - 1] === ";" ? stringWithNoTrailingWhitespace : `${stringWithNoTrailingWhitespace};`;
44
+ if (stringToAppendTo.includes("\n")) throw new Error("MULTIPLE_LINE_ERROR");
45
+ const stringWithNoTrailingWhitespace = stringToAppendTo.trimEnd();
46
+ if (stringWithNoTrailingWhitespace === "") return "";
47
+ return stringWithNoTrailingWhitespace[stringWithNoTrailingWhitespace.length - 1] === ";" ? stringWithNoTrailingWhitespace : `${stringWithNoTrailingWhitespace};`;
107
48
  }
108
49
  var appendSemicolon_default = appendSemicolon;
109
50
 
110
- // src/functions/camelToKebab.ts
51
+ //#endregion
52
+ //#region src/functions/camelToKebab.ts
111
53
  function camelToKebab(string) {
112
- return string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").toLowerCase();
54
+ return string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").toLowerCase();
113
55
  }
114
56
  var camelToKebab_default = camelToKebab;
115
57
 
116
- // src/functions/convertFileToBase64.ts
58
+ //#endregion
59
+ //#region src/functions/convertFileToBase64.ts
117
60
  function convertFileToBase64(file) {
118
- return new Promise((resolve, reject) => {
119
- const reader = new FileReader();
120
- reader.readAsDataURL(file);
121
- reader.onload = () => {
122
- if (reader.result === null) {
123
- reject(new Error("FILE_CONVERSION_ERROR"));
124
- return;
125
- }
126
- resolve(reader.result);
127
- };
128
- reader.onerror = () => {
129
- reject(new Error("FILE_READER_ERROR"));
130
- };
131
- });
61
+ return new Promise((resolve, reject) => {
62
+ const reader = new FileReader();
63
+ reader.readAsDataURL(file);
64
+ reader.onload = () => {
65
+ if (reader.result === null) {
66
+ reject(/* @__PURE__ */ new Error("FILE_CONVERSION_ERROR"));
67
+ return;
68
+ }
69
+ resolve(reader.result);
70
+ };
71
+ reader.onerror = () => {
72
+ reject(/* @__PURE__ */ new Error("FILE_READER_ERROR"));
73
+ };
74
+ });
132
75
  }
133
76
  var convertFileToBase64_default = convertFileToBase64;
134
77
 
135
- // src/functions/createFormData.ts
78
+ //#endregion
79
+ //#region src/functions/createFormData.ts
136
80
  function getNullableResolutionStrategy(key, strategy) {
137
- var _a;
138
- return (_a = typeof strategy === "object" ? strategy[key] : strategy) != null ? _a : "empty";
81
+ return (typeof strategy === "object" ? strategy[key] : strategy) ?? "empty";
139
82
  }
140
83
  function createFormData(data, options = {
141
- arrayResolution: "stringify",
142
- nullableResolution: "empty"
84
+ arrayResolution: "stringify",
85
+ nullableResolution: "empty"
143
86
  }) {
144
- const formData = new FormData();
145
- function resolveNullablesByStrategy(key, value, resolutionStrategy) {
146
- switch (resolutionStrategy) {
147
- case "empty":
148
- formData.append(String(key), "");
149
- break;
150
- case "stringify":
151
- formData.append(String(key), JSON.stringify(value));
152
- break;
153
- case "omit":
154
- break;
155
- default:
156
- throw new TypeError("SLOPPY_PURE_JAVASCRIPT_USER_ERROR");
157
- }
158
- }
159
- function resolveNullables(key, value, options2) {
160
- if (options2.nullableResolution) {
161
- resolveNullablesByStrategy(
162
- key,
163
- value,
164
- getNullableResolutionStrategy(key, options2.nullableResolution)
165
- );
166
- return;
167
- }
168
- if (options2.undefinedResolution || options2.nullResolution) {
169
- if (data[key] === void 0 && options2.undefinedResolution) {
170
- resolveNullablesByStrategy(
171
- key,
172
- value,
173
- getNullableResolutionStrategy(key, options2.undefinedResolution)
174
- );
175
- return;
176
- }
177
- if (data[key] === null && options2.nullResolution) {
178
- resolveNullablesByStrategy(
179
- key,
180
- value,
181
- getNullableResolutionStrategy(key, options2.nullResolution)
182
- );
183
- }
184
- }
185
- }
186
- const entries = Object.entries(data);
187
- for (const [key, value] of entries) {
188
- if (value instanceof Blob) {
189
- formData.append(String(key), value);
190
- } else if (value === void 0 || value === null) {
191
- resolveNullables(key, value, options);
192
- } else if (typeof value === "object") {
193
- if (Array.isArray(value)) {
194
- if (value.some((item) => {
195
- return item instanceof Blob;
196
- }) && (options.arrayResolution === "stringify" || typeof options.arrayResolution === "object" && options.arrayResolution[key] === "stringify")) {
197
- throw new TypeError("CANNOT_STRINGIFY_BLOB");
198
- }
199
- if (options.arrayResolution === "multiple" || typeof options.arrayResolution === "object" && options.arrayResolution[key] === "multiple") {
200
- for (const item of value) {
201
- if ((typeof item === "object" || !item) && !(item instanceof Blob)) {
202
- throw new TypeError("NON_PRIMITIVE_ARRAY_ITEMS_FOUND");
203
- }
204
- if (item instanceof Blob) {
205
- formData.append(String(key), item);
206
- } else {
207
- formData.append(String(key), String(item));
208
- }
209
- }
210
- continue;
211
- }
212
- }
213
- formData.append(String(key), JSON.stringify(value));
214
- } else {
215
- formData.append(String(key), String(value));
216
- }
217
- }
218
- return formData;
87
+ const formData = new FormData();
88
+ function resolveNullablesByStrategy(key, value, resolutionStrategy) {
89
+ switch (resolutionStrategy) {
90
+ case "empty":
91
+ formData.append(String(key), "");
92
+ break;
93
+ case "stringify":
94
+ formData.append(String(key), JSON.stringify(value));
95
+ break;
96
+ case "omit": break;
97
+ default: throw new TypeError("SLOPPY_PURE_JAVASCRIPT_USER_ERROR");
98
+ }
99
+ }
100
+ function resolveNullables(key, value, options$1) {
101
+ if (options$1.nullableResolution) {
102
+ resolveNullablesByStrategy(key, value, getNullableResolutionStrategy(key, options$1.nullableResolution));
103
+ return;
104
+ }
105
+ if (options$1.undefinedResolution || options$1.nullResolution) {
106
+ if (data[key] === void 0 && options$1.undefinedResolution) {
107
+ resolveNullablesByStrategy(key, value, getNullableResolutionStrategy(key, options$1.undefinedResolution));
108
+ return;
109
+ }
110
+ if (data[key] === null && options$1.nullResolution) resolveNullablesByStrategy(key, value, getNullableResolutionStrategy(key, options$1.nullResolution));
111
+ }
112
+ }
113
+ const entries = Object.entries(data);
114
+ for (const [key, value] of entries) if (value instanceof Blob) formData.append(String(key), value);
115
+ else if (value === void 0 || value === null) resolveNullables(key, value, options);
116
+ else if (typeof value === "object") {
117
+ if (Array.isArray(value)) {
118
+ if (value.some((item) => {
119
+ return item instanceof Blob;
120
+ }) && (options.arrayResolution === "stringify" || typeof options.arrayResolution === "object" && options.arrayResolution[key] === "stringify")) throw new TypeError("CANNOT_STRINGIFY_BLOB");
121
+ if (options.arrayResolution === "multiple" || typeof options.arrayResolution === "object" && options.arrayResolution[key] === "multiple") {
122
+ for (const item of value) {
123
+ if ((typeof item === "object" || !item) && !(item instanceof Blob)) throw new TypeError("NON_PRIMITIVE_ARRAY_ITEMS_FOUND");
124
+ if (item instanceof Blob) formData.append(String(key), item);
125
+ else formData.append(String(key), String(item));
126
+ }
127
+ continue;
128
+ }
129
+ }
130
+ formData.append(String(key), JSON.stringify(value));
131
+ } else formData.append(String(key), String(value));
132
+ return formData;
219
133
  }
220
134
  var createFormData_default = createFormData;
221
135
 
222
- // src/functions/createTemplateStringsArray.ts
136
+ //#endregion
137
+ //#region src/functions/createTemplateStringsArray.ts
223
138
  function createTemplateStringsArray(strings) {
224
- return Object.assign([...strings], { raw: [...strings] });
139
+ return Object.assign([...strings], { raw: [...strings] });
225
140
  }
226
141
  var createTemplateStringsArray_default = createTemplateStringsArray;
227
142
 
228
- // src/functions/fillArray.ts
143
+ //#endregion
144
+ //#region src/functions/fillArray.ts
229
145
  function fillArray(callback, length = 1) {
230
- const outputArray = new Array(length).fill(null).map((_, index) => {
231
- return callback(index);
232
- });
233
- const isAsync = outputArray.some((item) => {
234
- return item instanceof Promise;
235
- });
236
- if (isAsync) {
237
- return Promise.all(outputArray);
238
- }
239
- return outputArray;
146
+ const outputArray = new Array(length).fill(null).map((_, index) => {
147
+ return callback(index);
148
+ });
149
+ if (outputArray.some((item) => {
150
+ return item instanceof Promise;
151
+ })) return Promise.all(outputArray);
152
+ return outputArray;
240
153
  }
241
154
  var fillArray_default = fillArray;
242
155
 
243
- // src/functions/isSameDate.ts
156
+ //#endregion
157
+ //#region src/functions/isSameDate.ts
244
158
  function isSameDate(firstDate, secondDate) {
245
- return firstDate.getDate() === secondDate.getDate() && firstDate.getMonth() === secondDate.getMonth() && firstDate.getFullYear() === secondDate.getFullYear();
159
+ return firstDate.getDate() === secondDate.getDate() && firstDate.getMonth() === secondDate.getMonth() && firstDate.getFullYear() === secondDate.getFullYear();
246
160
  }
247
161
  var isSameDate_default = isSameDate;
248
162
 
249
- // src/functions/formatDateAndTime.ts
163
+ //#endregion
164
+ //#region src/functions/formatDateAndTime.ts
250
165
  function formatDateAndTime(inputDate) {
251
- const yesterday = addDaysToDate_default(/* @__PURE__ */ new Date(), -1);
252
- const today = /* @__PURE__ */ new Date();
253
- const inputTime = `${inputDate.getHours().toString().padStart(2, "0")}:${inputDate.getMinutes().toString().padStart(2, "0")}`;
254
- if (isSameDate_default(inputDate, yesterday)) {
255
- return `Yesterday at ${inputTime}`;
256
- }
257
- if (isSameDate_default(inputDate, today)) {
258
- return `Today at ${inputTime}`;
259
- }
260
- const formattedInputDay = inputDate.getDate().toString().padStart(2, "0");
261
- const formattedInputMonth = (inputDate.getMonth() + 1).toString().padStart(2, "0");
262
- const formattedInputYear = inputDate.getFullYear().toString();
263
- return `${formattedInputDay}/${formattedInputMonth}/${formattedInputYear}, ${inputTime}`;
166
+ const yesterday = addDaysToDate_default(/* @__PURE__ */ new Date(), -1);
167
+ const today = /* @__PURE__ */ new Date();
168
+ const inputTime = `${inputDate.getHours().toString().padStart(2, "0")}:${inputDate.getMinutes().toString().padStart(2, "0")}`;
169
+ if (isSameDate_default(inputDate, yesterday)) return `Yesterday at ${inputTime}`;
170
+ if (isSameDate_default(inputDate, today)) return `Today at ${inputTime}`;
171
+ return `${inputDate.getDate().toString().padStart(2, "0")}/${(inputDate.getMonth() + 1).toString().padStart(2, "0")}/${inputDate.getFullYear().toString()}, ${inputTime}`;
264
172
  }
265
173
  var formatDateAndTime_default = formatDateAndTime;
266
174
 
267
- // src/functions/parseIntStrict.ts
268
- var IntegerParsingError = new TypeError("INTEGER_PARSING_ERROR");
175
+ //#endregion
176
+ //#region src/functions/parseIntStrict.ts
177
+ const IntegerParsingError = /* @__PURE__ */ new TypeError("INTEGER_PARSING_ERROR");
269
178
  function parseIntStrict(...[string, radix]) {
270
- const trimmedString = string.trim();
271
- const pattern = radix && radix > 10 && radix <= 36 ? (
272
- // String.fromCharCode() gets the maximum possible alphabetical character for a base above 10
273
- new RegExp(`^[+-]?[0-9a-${String.fromCharCode(87 + radix - 1)}]+$`, "i")
274
- ) : /^[+-]?\d+$/;
275
- if (!pattern.test(trimmedString)) {
276
- throw IntegerParsingError;
277
- }
278
- if (radix && radix < 10 && [...trimmedString].some((character) => {
279
- return parseInt(character) >= radix;
280
- })) {
281
- throw IntegerParsingError;
282
- }
283
- const parseIntResult = parseInt(trimmedString, radix);
284
- if (isNaN(parseIntResult)) {
285
- throw IntegerParsingError;
286
- }
287
- return parseIntResult;
179
+ const trimmedString = string.trim();
180
+ if (!(radix && radix > 10 && radix <= 36 ? new RegExp(`^[+-]?[0-9a-${String.fromCharCode(87 + radix - 1)}]+$`, "i") : /^[+-]?\d+$/).test(trimmedString)) throw IntegerParsingError;
181
+ if (radix && radix < 10 && [...trimmedString].some((character) => {
182
+ return parseInt(character) >= radix;
183
+ })) throw IntegerParsingError;
184
+ const parseIntResult = parseInt(trimmedString, radix);
185
+ if (isNaN(parseIntResult)) throw IntegerParsingError;
186
+ return parseIntResult;
288
187
  }
289
188
  var parseIntStrict_default = parseIntStrict;
290
189
 
291
- // src/functions/getRandomNumber.ts
190
+ //#endregion
191
+ //#region src/functions/getRandomNumber.ts
292
192
  function getRandomNumber(lowerBound, upperBound) {
293
- const parsedLowerBound = parseIntStrict_default(`${lowerBound}`);
294
- const parsedUpperBound = parseIntStrict_default(`${upperBound}`);
295
- return Math.floor(Math.random() * (parsedUpperBound - parsedLowerBound + 1) + parsedLowerBound);
193
+ const parsedLowerBound = parseIntStrict_default(`${lowerBound}`);
194
+ const parsedUpperBound = parseIntStrict_default(`${upperBound}`);
195
+ return Math.floor(Math.random() * (parsedUpperBound - parsedLowerBound + 1) + parsedLowerBound);
296
196
  }
297
197
  var getRandomNumber_default = getRandomNumber;
298
198
 
299
- // src/functions/getRecordKeys.ts
199
+ //#endregion
200
+ //#region src/functions/getRecordKeys.ts
300
201
  function getRecordKeys(record) {
301
- return Object.keys(record);
202
+ return Object.keys(record);
302
203
  }
303
204
  var getRecordKeys_default = getRecordKeys;
304
205
 
305
- // src/functions/isLeapYear.ts
206
+ //#endregion
207
+ //#region src/functions/isLeapYear.ts
306
208
  function isLeapYear(year) {
307
- const parsedYear = parseIntStrict_default(`${year}`);
308
- return parsedYear % 4 === 0 && parsedYear % 100 !== 0 || parsedYear % 400 === 0;
209
+ const parsedYear = parseIntStrict_default(`${year}`);
210
+ return parsedYear % 4 === 0 && parsedYear % 100 !== 0 || parsedYear % 400 === 0;
309
211
  }
310
212
  var isLeapYear_default = isLeapYear;
311
213
 
312
- // src/functions/isMonthlyMultiple.ts
214
+ //#endregion
215
+ //#region src/functions/isMonthlyMultiple.ts
313
216
  function endOfMonthChecksButNotFebruary(firstDate, secondDate) {
314
- if ([3, 5, 8, 10].includes(firstDate.getMonth())) {
315
- return firstDate.getDate() === 30 && secondDate.getDate() === 31;
316
- }
317
- return false;
217
+ if ([
218
+ 3,
219
+ 5,
220
+ 8,
221
+ 10
222
+ ].includes(firstDate.getMonth())) return firstDate.getDate() === 30 && secondDate.getDate() === 31;
223
+ return false;
318
224
  }
319
225
  function nonLeapYearFebruaryChecks(firstDate, secondDate) {
320
- if (firstDate.getMonth() === 1) {
321
- if (!isLeapYear_default(firstDate.getFullYear()) && firstDate.getDate() === 28) {
322
- return [28, 29, 30, 31].includes(secondDate.getDate());
323
- }
324
- }
325
- return false;
226
+ if (firstDate.getMonth() === 1) {
227
+ if (!isLeapYear_default(firstDate.getFullYear()) && firstDate.getDate() === 28) return [
228
+ 28,
229
+ 29,
230
+ 30,
231
+ 31
232
+ ].includes(secondDate.getDate());
233
+ }
234
+ return false;
326
235
  }
327
236
  function leapYearFebruaryChecks(firstDate, secondDate) {
328
- if (firstDate.getMonth() === 1) {
329
- if (isLeapYear_default(firstDate.getFullYear()) && firstDate.getDate() === 29) {
330
- return [29, 30, 31].includes(secondDate.getDate());
331
- }
332
- }
333
- return false;
237
+ if (firstDate.getMonth() === 1) {
238
+ if (isLeapYear_default(firstDate.getFullYear()) && firstDate.getDate() === 29) return [
239
+ 29,
240
+ 30,
241
+ 31
242
+ ].includes(secondDate.getDate());
243
+ }
244
+ return false;
334
245
  }
335
246
  function isMonthlyMultiple(firstDate, secondDate) {
336
- if (endOfMonthChecksButNotFebruary(firstDate, secondDate) || endOfMonthChecksButNotFebruary(secondDate, firstDate)) {
337
- return true;
338
- }
339
- if (nonLeapYearFebruaryChecks(firstDate, secondDate) || nonLeapYearFebruaryChecks(secondDate, firstDate)) {
340
- return true;
341
- }
342
- if (leapYearFebruaryChecks(firstDate, secondDate) || leapYearFebruaryChecks(secondDate, firstDate)) {
343
- return true;
344
- }
345
- return firstDate.getDate() === secondDate.getDate();
247
+ if (endOfMonthChecksButNotFebruary(firstDate, secondDate) || endOfMonthChecksButNotFebruary(secondDate, firstDate)) return true;
248
+ if (nonLeapYearFebruaryChecks(firstDate, secondDate) || nonLeapYearFebruaryChecks(secondDate, firstDate)) return true;
249
+ if (leapYearFebruaryChecks(firstDate, secondDate) || leapYearFebruaryChecks(secondDate, firstDate)) return true;
250
+ return firstDate.getDate() === secondDate.getDate();
346
251
  }
347
252
  var isMonthlyMultiple_default = isMonthlyMultiple;
348
253
 
349
- // src/functions/isOrdered.ts
254
+ //#endregion
255
+ //#region src/functions/isOrdered.ts
350
256
  function isOrdered(array) {
351
- const newArray = [...array];
352
- newArray.sort();
353
- for (const index in newArray) {
354
- if (newArray[index] !== array[index]) {
355
- return false;
356
- }
357
- }
358
- return true;
257
+ const newArray = [...array];
258
+ newArray.sort();
259
+ for (const index in newArray) if (newArray[index] !== array[index]) return false;
260
+ return true;
359
261
  }
360
262
  var isOrdered_default = isOrdered;
361
263
 
362
- // src/functions/kebabToCamel.ts
264
+ //#endregion
265
+ //#region src/functions/kebabToCamel.ts
363
266
  function kebabToCamel(string, options) {
364
- if (string !== string.toLowerCase()) {
365
- throw new Error("INVALID_KEBAB_CASE_INPUT");
366
- }
367
- if (string.startsWith("-") || string.endsWith("-") || string.includes("--")) {
368
- throw new Error("INVALID_KEBAB_CASE_INPUT");
369
- }
370
- let outputString = "";
371
- let skip = false;
372
- for (const stringIndex in [...string]) {
373
- if (skip) {
374
- skip = false;
375
- continue;
376
- }
377
- const index = parseIntStrict_default(stringIndex);
378
- if (index === 0 && (options == null ? void 0 : options.startWithUpper)) {
379
- outputString += string[index].toUpperCase();
380
- continue;
381
- }
382
- if (index === string.length - 1) {
383
- outputString += string[index];
384
- break;
385
- }
386
- if (string[index] === "-" && /^[a-zA-Z]+$/.test(string[index + 1])) {
387
- outputString += string[index + 1].toUpperCase();
388
- skip = true;
389
- } else {
390
- outputString += string[index];
391
- }
392
- }
393
- return outputString;
267
+ if (string !== string.toLowerCase()) throw new Error("INVALID_KEBAB_CASE_INPUT");
268
+ if (string.startsWith("-") || string.endsWith("-") || string.includes("--")) throw new Error("INVALID_KEBAB_CASE_INPUT");
269
+ let outputString = "";
270
+ let skip = false;
271
+ for (const stringIndex in [...string]) {
272
+ if (skip) {
273
+ skip = false;
274
+ continue;
275
+ }
276
+ const index = parseIntStrict_default(stringIndex);
277
+ if (index === 0 && options?.startWithUpper) {
278
+ outputString += string[index].toUpperCase();
279
+ continue;
280
+ }
281
+ if (index === string.length - 1) {
282
+ outputString += string[index];
283
+ break;
284
+ }
285
+ if (string[index] === "-" && /^[a-zA-Z]+$/.test(string[index + 1])) {
286
+ outputString += string[index + 1].toUpperCase();
287
+ skip = true;
288
+ } else outputString += string[index];
289
+ }
290
+ return outputString;
394
291
  }
395
292
  var kebabToCamel_default = kebabToCamel;
396
293
 
397
- // src/functions/normalizeImportPath.ts
398
- var import_path = __toESM(require("path"), 1);
294
+ //#endregion
295
+ //#region src/functions/normalizeImportPath.ts
399
296
  function normalizeImportPath(importPath) {
400
- const normalizedPath = import_path.default.posix.normalize(importPath);
401
- if (importPath.startsWith("./") && !normalizedPath.startsWith("./")) {
402
- return `./${normalizedPath}`;
403
- }
404
- return normalizedPath;
297
+ const normalizedPath = path.default.posix.normalize(importPath);
298
+ if (importPath.startsWith("./") && !normalizedPath.startsWith("./")) return `./${normalizedPath}`;
299
+ return normalizedPath;
405
300
  }
406
- var normaliseImportPath = normalizeImportPath;
301
+ const normaliseImportPath = normalizeImportPath;
407
302
  var normalizeImportPath_default = normalizeImportPath;
408
303
 
409
- // src/functions/omitProperties.ts
304
+ //#endregion
305
+ //#region src/functions/omitProperties.ts
410
306
  function omitProperties(object, keysToOmit) {
411
- const outputObject = __spreadValues({}, object);
412
- const keysArray = Array.isArray(keysToOmit) ? keysToOmit : [keysToOmit];
413
- keysArray.forEach((key) => {
414
- delete outputObject[key];
415
- });
416
- return outputObject;
307
+ const outputObject = { ...object };
308
+ (Array.isArray(keysToOmit) ? keysToOmit : [keysToOmit]).forEach((key) => {
309
+ delete outputObject[key];
310
+ });
311
+ return outputObject;
417
312
  }
418
313
  var omitProperties_default = omitProperties;
419
314
 
420
- // src/functions/paralleliseArrays.ts
315
+ //#endregion
316
+ //#region src/functions/paralleliseArrays.ts
421
317
  function paralleliseArrays(firstArray, secondArray) {
422
- const outputArray = [];
423
- for (let i = 0; i < firstArray.length; i++) {
424
- outputArray.push([firstArray[i], secondArray[i]]);
425
- }
426
- return outputArray;
318
+ const outputArray = [];
319
+ for (let i = 0; i < firstArray.length; i++) outputArray.push([firstArray[i], secondArray[i]]);
320
+ return outputArray;
427
321
  }
428
322
  var paralleliseArrays_default = paralleliseArrays;
429
323
 
430
- // src/types/APIError.ts
431
- var httpErrorCodeLookup = {
432
- 400: "BAD_REQUEST",
433
- 401: "UNAUTHORISED",
434
- 403: "FORBIDDEN",
435
- 404: "NOT_FOUND",
436
- /* Supporting this one too because it's funny. You'll never use it in practice because
437
- why would an error give a teapot, but it's funny. Do not question me. */
438
- 418: "I_AM_A_TEAPOT",
439
- 500: "INTERNAL_SERVER_ERROR"
324
+ //#endregion
325
+ //#region src/types/APIError.ts
326
+ const httpErrorCodeLookup = {
327
+ 400: "BAD_REQUEST",
328
+ 401: "UNAUTHORISED",
329
+ 403: "FORBIDDEN",
330
+ 404: "NOT_FOUND",
331
+ 418: "I_AM_A_TEAPOT",
332
+ 500: "INTERNAL_SERVER_ERROR"
440
333
  };
441
334
  var APIError = class extends Error {
442
- constructor(status = 500, message, options) {
443
- var _a;
444
- super(message, options);
445
- __publicField(this, "status");
446
- this.status = status;
447
- if (message) {
448
- this.message = message;
449
- } else {
450
- this.message = (_a = httpErrorCodeLookup[this.status]) != null ? _a : "API_ERROR";
451
- }
452
- Object.defineProperty(this, "message", { enumerable: true });
453
- Object.setPrototypeOf(this, new.target.prototype);
454
- }
455
- static check(input) {
456
- const data = input;
457
- return typeof data === "object" && data !== null && typeof (data == null ? void 0 : data.status) === "number" && typeof (data == null ? void 0 : data.message) === "string";
458
- }
335
+ status;
336
+ constructor(status = 500, message, options) {
337
+ super(message, options);
338
+ this.status = status;
339
+ if (message) this.message = message;
340
+ else this.message = httpErrorCodeLookup[this.status] ?? "API_ERROR";
341
+ Object.defineProperty(this, "message", { enumerable: true });
342
+ Object.setPrototypeOf(this, new.target.prototype);
343
+ }
344
+ static check(input) {
345
+ const data = input;
346
+ return typeof data === "object" && data !== null && typeof data?.status === "number" && typeof data?.message === "string";
347
+ }
459
348
  };
460
349
  var APIError_default = APIError;
461
350
 
462
- // src/types/DataError.ts
351
+ //#endregion
352
+ //#region src/types/DataError.ts
463
353
  var DataError = class extends Error {
464
- /** @param data - The data that caused the error. */
465
- /** @param message - A human-readable error message (e.g. The data provided is invalid). */
466
- /** @param code - A standardised code (e.g. UNEXPECTED_DATA). */
467
- /** @param options - Extra options to pass to super Error constructor. */
468
- constructor(data, message = "The data provided is invalid", code = "INVALID_DATA", options) {
469
- super(message, options);
470
- __publicField(this, "data");
471
- __publicField(this, "code");
472
- if (Error.captureStackTrace) {
473
- Error.captureStackTrace(this, new.target);
474
- }
475
- this.name = new.target.name;
476
- this.code = code;
477
- this.data = data;
478
- Object.defineProperty(this, "message", { enumerable: true });
479
- Object.setPrototypeOf(this, new.target.prototype);
480
- }
481
- static check(input) {
482
- const data = input;
483
- return typeof data === "object" && data !== null && typeof data.message === "string" && typeof data.code === "string" && "data" in data;
484
- }
354
+ data;
355
+ code;
356
+ /** @param data - The data that caused the error. */
357
+ /** @param message - A human-readable error message (e.g. The data provided is invalid). */
358
+ /** @param code - A standardised code (e.g. UNEXPECTED_DATA). */
359
+ /** @param options - Extra options to pass to super Error constructor. */
360
+ constructor(data, message = "The data provided is invalid", code = "INVALID_DATA", options) {
361
+ super(message, options);
362
+ if (Error.captureStackTrace) Error.captureStackTrace(this, new.target);
363
+ this.name = new.target.name;
364
+ this.code = code;
365
+ this.data = data;
366
+ Object.defineProperty(this, "message", { enumerable: true });
367
+ Object.setPrototypeOf(this, new.target.prototype);
368
+ }
369
+ static check(input) {
370
+ const data = input;
371
+ return typeof data === "object" && data !== null && typeof data.message === "string" && typeof data.code === "string" && "data" in data;
372
+ }
485
373
  };
486
374
  var DataError_default = DataError;
487
375
 
488
- // src/types/Email.ts
489
- var import_zod = __toESM(require("zod"), 1);
490
- var emailSchema = import_zod.default.email().brand();
376
+ //#endregion
377
+ //#region src/types/Email.ts
378
+ const emailSchema = zod.default.email().brand();
491
379
  function parseEmail(data) {
492
- return emailSchema.parse(data);
380
+ return emailSchema.parse(data);
493
381
  }
494
382
  var Email_default = parseEmail;
495
383
 
496
- // src/types/Env.ts
497
- var import_zod2 = require("zod");
498
- var envSchema = import_zod2.z.enum(["test", "development", "production"]);
384
+ //#endregion
385
+ //#region src/types/Env.ts
386
+ const envSchema = zod.z.enum([
387
+ "test",
388
+ "development",
389
+ "production"
390
+ ]);
499
391
  function parseEnv(data = "development") {
500
- return envSchema.parse(data);
392
+ return envSchema.parse(data);
501
393
  }
502
394
  var Env_default = parseEnv;
503
395
 
504
- // src/types/UUID.ts
505
- var import_zod3 = __toESM(require("zod"), 1);
506
- var uuidSchema = import_zod3.default.uuid().brand();
396
+ //#endregion
397
+ //#region src/types/UUID.ts
398
+ const uuidSchema = zod.default.uuid().brand();
507
399
  function parseUUID(UUID) {
508
- return uuidSchema.parse(UUID);
400
+ return uuidSchema.parse(UUID);
509
401
  }
510
402
  var UUID_default = parseUUID;
511
403
 
512
- // src/functions/parseZodSchema.ts
404
+ //#endregion
405
+ //#region src/functions/parseZodSchema.ts
513
406
  function parseZodSchema(schema, data) {
514
- const parsedResult = schema.safeParse(data);
515
- if (!parsedResult.success) {
516
- throw new DataError_default(data);
517
- }
518
- return parsedResult.data;
407
+ const parsedResult = schema.safeParse(data);
408
+ if (!parsedResult.success) throw new DataError_default(data);
409
+ return parsedResult.data;
519
410
  }
520
411
  var parseZodSchema_default = parseZodSchema;
521
412
 
522
- // src/functions/randomiseArray.ts
413
+ //#endregion
414
+ //#region src/functions/randomiseArray.ts
523
415
  function randomiseArray(array) {
524
- const mutableArray = [...array];
525
- const outputArray = [];
526
- do {
527
- const indexToRemove = getRandomNumber_default(0, mutableArray.length - 1);
528
- outputArray.push(mutableArray.splice(indexToRemove, 1)[0]);
529
- } while (mutableArray.length > 0);
530
- return outputArray;
416
+ const mutableArray = [...array];
417
+ const outputArray = [];
418
+ do {
419
+ const indexToRemove = getRandomNumber_default(0, mutableArray.length - 1);
420
+ outputArray.push(mutableArray.splice(indexToRemove, 1)[0]);
421
+ } while (mutableArray.length > 0);
422
+ return outputArray;
531
423
  }
532
424
  var randomiseArray_default = randomiseArray;
533
425
 
534
- // src/functions/range.ts
426
+ //#endregion
427
+ //#region src/functions/range.ts
535
428
  function range(start, stop, step = 1) {
536
- const numbers = [];
537
- if (step === 0) {
538
- throw new Error("ZERO_STEP_SIZE_NOT_ALLOWED");
539
- } else if (step > 0) {
540
- if (start > stop) {
541
- throw new Error("INVALID_BOUNDARIES");
542
- }
543
- for (let i = start; i < stop; i += step) {
544
- numbers.push(i);
545
- }
546
- } else if (step < 0) {
547
- if (start < stop) {
548
- throw new Error("INVALID_BOUNDARIES");
549
- }
550
- for (let i = start; i > stop; i += step) {
551
- numbers.push(i);
552
- }
553
- }
554
- return numbers;
429
+ const numbers = [];
430
+ if (step === 0) throw new Error("ZERO_STEP_SIZE_NOT_ALLOWED");
431
+ else if (step > 0) {
432
+ if (start > stop) throw new Error("INVALID_BOUNDARIES");
433
+ for (let i = start; i < stop; i += step) numbers.push(i);
434
+ } else if (step < 0) {
435
+ if (start < stop) throw new Error("INVALID_BOUNDARIES");
436
+ for (let i = start; i > stop; i += step) numbers.push(i);
437
+ }
438
+ return numbers;
555
439
  }
556
440
  var range_default = range;
557
441
 
558
- // src/functions/removeDuplicates.ts
442
+ //#endregion
443
+ //#region src/functions/removeDuplicates.ts
559
444
  function removeDuplicates(array) {
560
- const outputArray = [];
561
- for (const item of array) {
562
- if (!outputArray.includes(item)) {
563
- outputArray.push(item);
564
- }
565
- }
566
- return outputArray;
445
+ const outputArray = [];
446
+ for (const item of array) if (!outputArray.includes(item)) outputArray.push(item);
447
+ return outputArray;
567
448
  }
568
449
  var removeDuplicates_default = removeDuplicates;
569
450
 
570
- // src/functions/stringListToArray.ts
451
+ //#endregion
452
+ //#region src/functions/stringListToArray.ts
571
453
  function stringListToArray(stringList, { separator = ",", trimWhitespace = true } = {}) {
572
- if (trimWhitespace && stringList.trim() === "") {
573
- return [];
574
- }
575
- const arrayList = stringList.split(separator != null ? separator : "");
576
- return trimWhitespace ? arrayList.map((item) => {
577
- return item.trim();
578
- }) : arrayList;
454
+ if (trimWhitespace && stringList.trim() === "") return [];
455
+ const arrayList = stringList.split(separator ?? "");
456
+ return trimWhitespace ? arrayList.map((item) => {
457
+ return item.trim();
458
+ }) : arrayList;
579
459
  }
580
460
  var stringListToArray_default = stringListToArray;
581
461
 
582
- // src/functions/stringToBoolean.ts
462
+ //#endregion
463
+ //#region src/functions/stringToBoolean.ts
583
464
  function stringToBoolean(inputString) {
584
- const normalisedString = inputString.toLowerCase();
585
- if (normalisedString !== "true" && normalisedString !== "false") {
586
- throw new TypeError("INVALID_BOOLEAN_STRING");
587
- }
588
- return normalisedString === "true";
465
+ const normalisedString = inputString.toLowerCase();
466
+ if (normalisedString !== "true" && normalisedString !== "false") throw new TypeError("INVALID_BOOLEAN_STRING");
467
+ return normalisedString === "true";
589
468
  }
590
469
  var stringToBoolean_default = stringToBoolean;
591
470
 
592
- // src/functions/truncate.ts
471
+ //#endregion
472
+ //#region src/functions/truncate.ts
593
473
  function truncate(stringToTruncate, maxLength = 5) {
594
- return stringToTruncate.length > maxLength ? `${stringToTruncate.slice(0, maxLength)}...` : stringToTruncate;
474
+ return stringToTruncate.length > maxLength ? `${stringToTruncate.slice(0, maxLength)}...` : stringToTruncate;
595
475
  }
596
476
  var truncate_default = truncate;
597
477
 
598
- // src/functions/wait.ts
478
+ //#endregion
479
+ //#region src/functions/wait.ts
599
480
  function wait(seconds) {
600
- return new Promise((resolve, _) => {
601
- setTimeout(() => {
602
- resolve();
603
- }, seconds * 1e3);
604
- });
481
+ return new Promise((resolve, _) => {
482
+ setTimeout(() => {
483
+ resolve();
484
+ }, seconds * 1e3);
485
+ });
605
486
  }
606
487
  var wait_default = wait;
607
488
 
608
- // src/functions/taggedTemplate/interpolate.ts
489
+ //#endregion
490
+ //#region src/functions/taggedTemplate/interpolate.ts
609
491
  function interpolate(strings, ...interpolations) {
610
- let result = "";
611
- for (const [string, interpolation = ""] of paralleliseArrays_default(strings, interpolations)) {
612
- result += string + interpolation;
613
- }
614
- return result;
492
+ let result = "";
493
+ for (const [string, interpolation = ""] of paralleliseArrays_default(strings, interpolations)) result += string + interpolation;
494
+ return result;
615
495
  }
616
496
  var interpolate_default = interpolate;
617
497
 
618
- // src/functions/taggedTemplate/interpolateObjects.ts
498
+ //#endregion
499
+ //#region src/functions/taggedTemplate/interpolateObjects.ts
619
500
  function interpolateObjects(strings, ...values) {
620
- let result = "";
621
- for (let i = 0; i < strings.length; i++) {
622
- result += strings[i];
623
- if (i !== strings.length - 1) {
624
- result += values[i] && typeof values[i] === "object" ? JSON.stringify(values[i]) : values[i];
625
- }
626
- }
627
- return result;
501
+ let result = "";
502
+ for (let i = 0; i < strings.length; i++) {
503
+ result += strings[i];
504
+ if (i !== strings.length - 1) result += values[i] && typeof values[i] === "object" ? JSON.stringify(values[i]) : values[i];
505
+ }
506
+ return result;
628
507
  }
629
508
  var interpolateObjects_default = interpolateObjects;
630
509
 
631
- // src/functions/taggedTemplate/removeIndents.ts
510
+ //#endregion
511
+ //#region src/functions/taggedTemplate/removeIndents.ts
632
512
  function calculateTabSize(line, whitespaceLength) {
633
- const potentialWhitespacePart = line.slice(0, whitespaceLength);
634
- const trimmedString = line.trimStart();
635
- if (potentialWhitespacePart.trim() !== "") {
636
- return 0;
637
- }
638
- const tabSize = line.length - (trimmedString.length + whitespaceLength);
639
- return tabSize < 0 ? 0 : tabSize;
513
+ const potentialWhitespacePart = line.slice(0, whitespaceLength);
514
+ const trimmedString = line.trimStart();
515
+ if (potentialWhitespacePart.trim() !== "") return 0;
516
+ const tabSize = line.length - (trimmedString.length + whitespaceLength);
517
+ return tabSize < 0 ? 0 : tabSize;
640
518
  }
641
519
  function getWhitespaceLength(lines) {
642
- const [firstNonEmptyLine] = lines.filter((line) => {
643
- return line.trim() !== "";
644
- });
645
- return firstNonEmptyLine.length - firstNonEmptyLine.trimStart().length;
520
+ const [firstNonEmptyLine] = lines.filter((line) => {
521
+ return line.trim() !== "";
522
+ });
523
+ return firstNonEmptyLine.length - firstNonEmptyLine.trimStart().length;
646
524
  }
647
525
  function reduceLines(lines, { preserveTabs = true }) {
648
- const slicedLines = lines.slice(1);
649
- const isFirstLineEmpty = lines[0].trim() === "";
650
- const whitespaceLength = getWhitespaceLength(isFirstLineEmpty ? lines : slicedLines);
651
- return (isFirstLineEmpty ? slicedLines : lines).map((line) => {
652
- const tabSize = calculateTabSize(line, whitespaceLength);
653
- return (preserveTabs ? fillArray_default(() => {
654
- return " ";
655
- }, tabSize).join("") : "") + line.trimStart();
656
- }).join("\n");
526
+ const slicedLines = lines.slice(1);
527
+ const isFirstLineEmpty = lines[0].trim() === "";
528
+ const whitespaceLength = getWhitespaceLength(isFirstLineEmpty ? lines : slicedLines);
529
+ return (isFirstLineEmpty ? slicedLines : lines).map((line) => {
530
+ const tabSize = calculateTabSize(line, whitespaceLength);
531
+ return (preserveTabs ? fillArray_default(() => {
532
+ return " ";
533
+ }, tabSize).join("") : "") + line.trimStart();
534
+ }).join("\n");
657
535
  }
658
536
  function removeIndents(first, ...args) {
659
- if (typeof first === "object" && first !== null && !Array.isArray(first)) {
660
- const options2 = first;
661
- return (strings2, ...interpolations2) => {
662
- return removeIndents(strings2, ...interpolations2, options2);
663
- };
664
- }
665
- const strings = first;
666
- const options = typeof args[args.length - 1] === "object" && !Array.isArray(args[args.length - 1]) ? args.pop() : {};
667
- const interpolations = [...args];
668
- const fullString = interpolate_default(strings, ...interpolations);
669
- return reduceLines(fullString.split("\n"), options);
537
+ if (typeof first === "object" && first !== null && !Array.isArray(first)) {
538
+ const options$1 = first;
539
+ return (strings$1, ...interpolations) => {
540
+ return removeIndents(strings$1, ...interpolations, options$1);
541
+ };
542
+ }
543
+ const strings = first;
544
+ const options = typeof args[args.length - 1] === "object" && !Array.isArray(args[args.length - 1]) ? args.pop() : {};
545
+ return reduceLines(interpolate_default(strings, ...[...args]).split("\n"), options);
670
546
  }
671
547
  var removeIndents_default = removeIndents;
672
548
 
673
- // src/functions/taggedTemplate/stripIndents.ts
674
- function calculateTabSize2(line, whitespaceLength = 12) {
675
- const potentialWhitespacePart = line.slice(0, whitespaceLength);
676
- const trimmedString = line.trimStart();
677
- if (potentialWhitespacePart.trim() !== "") {
678
- return 0;
679
- }
680
- const tabSize = line.length - (trimmedString.length + whitespaceLength);
681
- return tabSize < 0 ? 0 : tabSize;
682
- }
683
- function reduceLines2(lines, { whitespaceLength = 12, preserveTabs = true }) {
684
- return lines.map((line) => {
685
- const tabSize = calculateTabSize2(line, whitespaceLength);
686
- return (preserveTabs ? fillArray_default(() => {
687
- return " ";
688
- }, tabSize).join("") : "") + line.trimStart();
689
- }).join("\n");
690
- }
691
- function stripIndents(first, ...args) {
692
- if (typeof first === "object" && first !== null && !Array.isArray(first)) {
693
- const options2 = first;
694
- return (strings2, ...interpolations2) => {
695
- return stripIndents(strings2, ...interpolations2, options2);
696
- };
697
- }
698
- const strings = first;
699
- const options = typeof args[args.length - 1] === "object" && !Array.isArray(args[args.length - 1]) ? args.pop() : {};
700
- const interpolations = [...args];
701
- const fullString = interpolate_default(strings, ...interpolations);
702
- return reduceLines2(fullString.split("\n"), options);
703
- }
704
- var stripIndents_default = stripIndents;
705
- // Annotate the CommonJS export names for ESM import in node:
706
- 0 && (module.exports = {
707
- APIError,
708
- DataError,
709
- addDaysToDate,
710
- appendSemicolon,
711
- camelToKebab,
712
- convertFileToBase64,
713
- createFormData,
714
- createTemplateStringsArray,
715
- fillArray,
716
- formatDateAndTime,
717
- getRandomNumber,
718
- getRecordKeys,
719
- httpErrorCodeLookup,
720
- interpolate,
721
- interpolateObjects,
722
- isLeapYear,
723
- isMonthlyMultiple,
724
- isOrdered,
725
- isSameDate,
726
- kebabToCamel,
727
- normaliseImportPath,
728
- normalizeImportPath,
729
- omitProperties,
730
- paralleliseArrays,
731
- parseEmail,
732
- parseEnv,
733
- parseIntStrict,
734
- parseUUID,
735
- parseZodSchema,
736
- randomiseArray,
737
- range,
738
- removeDuplicates,
739
- removeIndents,
740
- stringListToArray,
741
- stringToBoolean,
742
- stripIndents,
743
- truncate,
744
- wait
745
- });
549
+ //#endregion
550
+ exports.APIError = APIError_default;
551
+ exports.DataError = DataError_default;
552
+ exports.addDaysToDate = addDaysToDate_default;
553
+ exports.appendSemicolon = appendSemicolon_default;
554
+ exports.camelToKebab = camelToKebab_default;
555
+ exports.convertFileToBase64 = convertFileToBase64_default;
556
+ exports.createFormData = createFormData_default;
557
+ exports.createTemplateStringsArray = createTemplateStringsArray_default;
558
+ exports.fillArray = fillArray_default;
559
+ exports.formatDateAndTime = formatDateAndTime_default;
560
+ exports.getRandomNumber = getRandomNumber_default;
561
+ exports.getRecordKeys = getRecordKeys_default;
562
+ exports.httpErrorCodeLookup = httpErrorCodeLookup;
563
+ exports.interpolate = interpolate_default;
564
+ exports.interpolateObjects = interpolateObjects_default;
565
+ exports.isLeapYear = isLeapYear_default;
566
+ exports.isMonthlyMultiple = isMonthlyMultiple_default;
567
+ exports.isOrdered = isOrdered_default;
568
+ exports.isSameDate = isSameDate_default;
569
+ exports.kebabToCamel = kebabToCamel_default;
570
+ exports.normaliseImportPath = normaliseImportPath;
571
+ exports.normalizeImportPath = normalizeImportPath_default;
572
+ exports.omitProperties = omitProperties_default;
573
+ exports.paralleliseArrays = paralleliseArrays_default;
574
+ exports.parseEmail = Email_default;
575
+ exports.parseEnv = Env_default;
576
+ exports.parseIntStrict = parseIntStrict_default;
577
+ exports.parseUUID = UUID_default;
578
+ exports.parseZodSchema = parseZodSchema_default;
579
+ exports.randomiseArray = randomiseArray_default;
580
+ exports.range = range_default;
581
+ exports.removeDuplicates = removeDuplicates_default;
582
+ exports.removeIndents = removeIndents_default;
583
+ exports.stringListToArray = stringListToArray_default;
584
+ exports.stringToBoolean = stringToBoolean_default;
585
+ exports.truncate = truncate_default;
586
+ exports.wait = wait_default;