@alextheman/utility 4.3.0 → 4.3.2

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/README.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @alextheman/utility
2
2
 
3
+ ![npm version](https://img.shields.io/npm/v/@alextheman/utility)
4
+ ![npm downloads](https://img.shields.io/npm/dm/@alextheman/utility)
5
+ ![npm license](https://img.shields.io/npm/l/@alextheman/utility)
6
+
7
+ [![CI](https://github.com/AlexMan123456/utility/actions/workflows/ci.yml/badge.svg)](https://github.com/AlexMan123456/utility/actions/workflows/ci.yml)
8
+ [![Publish to NPM Registry](https://github.com/AlexMan123456/utility/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/AlexMan123456/utility/actions/workflows/npm-publish.yml)
9
+ [![Publish to Netlify](https://github.com/AlexMan123456/utility/actions/workflows/netlify-docs-publish.yml/badge.svg)](https://github.com/AlexMan123456/utility/actions/workflows/netlify-docs-publish.yml)
10
+
11
+ [![Netlify Status](https://api.netlify.com/api/v1/badges/74fd3eaf-3002-472b-ae5e-2bd0ab984b9e/deploy-status)](https://app.netlify.com/projects/alextheman-utility-docs/deploys)
12
+
13
+
3
14
  This is my personal utility package. It provides custom utility functions that can be used in more or less any TypeScript or JavaScript project, using either the browser or Node environment.
4
15
 
5
16
  ## Installation
@@ -24,3 +35,9 @@ import { formatDateAndTime } from "@alextheman/utility";
24
35
  const myVariable: NonUndefined<string> = formatDateAndTime(new Date());
25
36
  // ...
26
37
  ```
38
+
39
+ ## Documentation
40
+
41
+ You can find the relevant documentation of all features of the package in the [docs/features/markdown](https://github.com/AlexMan123456/utility/tree/main/docs/features/markdown) directory of the repository. The hosted documentation site can be found [here](https://alextheman-utility-docs.netlify.app/).
42
+
43
+ See the GitHub repository [here](https://github.com/AlexMan123456/utility).
package/dist/index.cjs CHANGED
@@ -47,6 +47,8 @@ var VERSION_NUMBER_REGEX_default = VERSION_NUMBER_REGEX;
47
47
  * If the callback returns at least one Promise, the entire result will be wrapped
48
48
  * in a `Promise` and resolved with `Promise.all`. Otherwise, a plain array is returned.
49
49
  *
50
+ * @category Array Helpers
51
+ *
50
52
  * @template ItemType
51
53
  *
52
54
  * @param callback - A function invoked with the current index. May return a value or a Promise.
@@ -73,6 +75,8 @@ var fillArray_default = fillArray;
73
75
  * If `secondArray` is shorter than `firstArray`, the second position in the tuple
74
76
  * will be `undefined`. Iteration always uses the length of the first array.
75
77
  *
78
+ * @category Array Helpers
79
+ *
76
80
  * @template FirstArrayItem
77
81
  * @template SecondArrayItem
78
82
  *
@@ -98,7 +102,11 @@ const httpErrorCodeLookup = {
98
102
  418: "I_AM_A_TEAPOT",
99
103
  500: "INTERNAL_SERVER_ERROR"
100
104
  };
101
- /** Represents common errors you may get from a HTTP API request. */
105
+ /**
106
+ * Represents common errors you may get from a HTTP API request.
107
+ *
108
+ * @category Types
109
+ */
102
110
  var APIError = class extends Error {
103
111
  status;
104
112
  /**
@@ -130,10 +138,14 @@ var APIError_default = APIError;
130
138
 
131
139
  //#endregion
132
140
  //#region src/types/DataError.ts
133
- /** Represents errors you may get that may've been caused by a specific piece of data. */
141
+ /**
142
+ * Represents errors you may get that may've been caused by a specific piece of data.
143
+ *
144
+ * @category Types
145
+ */
134
146
  var DataError = class extends Error {
135
- data;
136
147
  code;
148
+ data;
137
149
  /**
138
150
  * @param data - The data that caused the error.
139
151
  * @param code - A standardised code (e.g. UNEXPECTED_DATA).
@@ -163,25 +175,21 @@ var DataError = class extends Error {
163
175
  };
164
176
  var DataError_default = DataError;
165
177
 
166
- //#endregion
167
- //#region src/types/VersionType.ts
168
- const VersionType = {
169
- MAJOR: "major",
170
- MINOR: "minor",
171
- PATCH: "patch"
172
- };
173
-
174
178
  //#endregion
175
179
  //#region src/types/VersionNumber.ts
176
- /** Represents a software version number, considered to be made up of a major, minor, and patch part. */
180
+ /**
181
+ * Represents a software version number, considered to be made up of a major, minor, and patch part.
182
+ *
183
+ * @category Types
184
+ */
177
185
  var VersionNumber = class VersionNumber {
186
+ static NON_NEGATIVE_TUPLE_ERROR = "Input array must be a tuple of three non-negative integers.";
178
187
  /** The major number. Increments when a feature is removed or changed in a way that is not backwards-compatible with the previous release. */
179
188
  major = 0;
180
189
  /** The minor number. Increments when a new feature is added/deprecated and is expected to be backwards-compatible with the previous release. */
181
190
  minor = 0;
182
191
  /** The patch number. Increments when the next release is fixing a bug or doing a small refactor that should not be noticeable in practice. */
183
192
  patch = 0;
184
- static NON_NEGATIVE_TUPLE_ERROR = "Input array must be a tuple of three non-negative integers.";
185
193
  /**
186
194
  * @param input - The input to create a new instance of `VersionNumber` from.
187
195
  */
@@ -210,21 +218,6 @@ var VersionNumber = class VersionNumber {
210
218
  this.patch = patch;
211
219
  }
212
220
  }
213
- static formatString(input, options) {
214
- if (options?.omitPrefix) return input.startsWith("v") ? input.slice(1) : input;
215
- return input.startsWith("v") ? input : `v${input}`;
216
- }
217
- /**
218
- * Get a string representation of the current version number.
219
- *
220
- * @param options - Extra additional options to apply.
221
- *
222
- * @returns A stringified representation of the current version number, leaving out the prefix if `omitPrefix` option was set to true.
223
- */
224
- toString(options) {
225
- const rawString = `${this.major}.${this.minor}.${this.patch}`;
226
- return VersionNumber.formatString(rawString, options);
227
- }
228
221
  /**
229
222
  * Gets the current version type of the current instance of `VersionNumber`.
230
223
  *
@@ -235,6 +228,21 @@ var VersionNumber = class VersionNumber {
235
228
  if (this.patch === 0) return VersionType.MINOR;
236
229
  return VersionType.PATCH;
237
230
  }
231
+ static formatString(input, options) {
232
+ if (options?.omitPrefix) return input.startsWith("v") ? input.slice(1) : input;
233
+ return input.startsWith("v") ? input : `v${input}`;
234
+ }
235
+ /**
236
+ * Checks if the provided version numbers have the exact same major, minor, and patch numbers.
237
+ *
238
+ * @param firstVersion - The first version number to compare.
239
+ * @param secondVersion - The second version number to compare.
240
+ *
241
+ * @returns `true` if the provided version numbers have exactly the same major, minor, and patch numbers, and returns `false` otherwise.
242
+ */
243
+ static isEqual(firstVersion, secondVersion) {
244
+ return firstVersion.major === secondVersion.major && firstVersion.minor === secondVersion.minor && firstVersion.patch === secondVersion.patch;
245
+ }
238
246
  /**
239
247
  * Determines whether the current instance of `VersionNumber` is a major, minor, or patch version.
240
248
  *
@@ -246,35 +254,34 @@ var VersionNumber = class VersionNumber {
246
254
  * @returns A new instance of `VersionNumber` with the increment applied.
247
255
  */
248
256
  increment(incrementType) {
249
- const newVersion = {
250
- major: [
257
+ return {
258
+ major: new VersionNumber([
251
259
  this.major + 1,
252
260
  0,
253
261
  0
254
- ],
255
- minor: [
262
+ ]),
263
+ minor: new VersionNumber([
256
264
  this.major,
257
265
  this.minor + 1,
258
266
  0
259
- ],
260
- patch: [
267
+ ]),
268
+ patch: new VersionNumber([
261
269
  this.major,
262
270
  this.minor,
263
271
  this.patch + 1
264
- ]
272
+ ])
265
273
  }[incrementType];
266
- return new VersionNumber(newVersion);
267
274
  }
268
275
  /**
269
- * Checks if the provided version numbers have the exact same major, minor, and patch numbers.
276
+ * Get a string representation of the current version number.
270
277
  *
271
- * @param firstVersion - The first version number to compare.
272
- * @param secondVersion - The second version number to compare.
278
+ * @param options - Extra additional options to apply.
273
279
  *
274
- * @returns `true` if the provided version numbers have exactly the same major, minor, and patch numbers, and returns `false` otherwise.
280
+ * @returns A stringified representation of the current version number, leaving out the prefix if `omitPrefix` option was set to true.
275
281
  */
276
- static isEqual(firstVersion, secondVersion) {
277
- return firstVersion.major === secondVersion.major && firstVersion.minor === secondVersion.minor && firstVersion.patch === secondVersion.patch;
282
+ toString(options) {
283
+ const rawString = `${this.major}.${this.minor}.${this.patch}`;
284
+ return VersionNumber.formatString(rawString, options);
278
285
  }
279
286
  };
280
287
  var VersionNumber_default = VersionNumber;
@@ -284,6 +291,8 @@ var VersionNumber_default = VersionNumber;
284
291
  /**
285
292
  * Converts a string to an integer and throws an error if it cannot be converted.
286
293
  *
294
+ * @category Parsers
295
+ *
287
296
  * @param string - A string to convert into a number.
288
297
  * @param radix - A value between 2 and 36 that specifies the base of the number in string. If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. All other strings are considered decimal.
289
298
  *
@@ -315,6 +324,8 @@ var parseIntStrict_default = parseIntStrict;
315
324
  /**
316
325
  * Gets a random number between the given bounds.
317
326
  *
327
+ * @category Miscellaneous
328
+ *
318
329
  * @param lowerBound - The lowest number that can be chosen.
319
330
  * @param upperBound - The highest number that can be chosen.
320
331
  *
@@ -332,6 +343,8 @@ var getRandomNumber_default = getRandomNumber;
332
343
  /**
333
344
  * Randomises the order of a given array and returns the result in a new array without mutating the original.
334
345
  *
346
+ * @category Array Helpers
347
+ *
335
348
  * @template ItemType - The type of the array items.
336
349
  *
337
350
  * @param array - The array to randomise.
@@ -357,6 +370,8 @@ var randomiseArray_default = randomiseArray;
357
370
  * - The range is inclusive of `start` and exclusive of `stop`.
358
371
  * - The sign of `step` must match the direction of the range.
359
372
  *
373
+ * @category Array Helpers
374
+ *
360
375
  * @param start - The number to start at (inclusive).
361
376
  * @param stop - The number to stop at (exclusive).
362
377
  * @param step - The step size between numbers, defaulting to 1.
@@ -385,6 +400,8 @@ var range_default = range;
385
400
  /**
386
401
  * Removes duplicate values from an array.
387
402
  *
403
+ * @category Array Helpers
404
+ *
388
405
  * @template ItemType - The type of the array items.
389
406
  *
390
407
  * @param array - The array to remove duplicates from.
@@ -403,6 +420,8 @@ var removeDuplicates_default = removeDuplicates;
403
420
  /**
404
421
  * Adds a given number of days to the provided date, returning the result as a new instance of Date.
405
422
  *
423
+ * @category Date
424
+ *
406
425
  * @param currentDate - The starting date (defaults to today).
407
426
  * @param dayIncrement - The amount of days you want to add (defaults to 1)
408
427
  *
@@ -420,6 +439,8 @@ var addDaysToDate_default = addDaysToDate;
420
439
  /**
421
440
  * Checks if the provided dates happen on the exact same day, month, and year.
422
441
  *
442
+ * @category Date
443
+ *
423
444
  * @param firstDate - The first date to compare.
424
445
  * @param secondDate - The second date to compare.
425
446
  *
@@ -435,6 +456,8 @@ var isSameDate_default = isSameDate;
435
456
  /**
436
457
  * Creates a human-readable string with information about the input date.
437
458
  *
459
+ * @category Date
460
+ *
438
461
  * @param inputDate - The date to base the string on.
439
462
  *
440
463
  * @returns A new string with information about the given date.
@@ -458,6 +481,8 @@ var formatDateAndTime_default = formatDateAndTime;
458
481
  /**
459
482
  * Checks if the provided year is a leap year.
460
483
  *
484
+ * @category Date
485
+ *
461
486
  * @param year - The year to check as a number.
462
487
  *
463
488
  * @throws {TypeError} If the year provided is not an integer.
@@ -479,6 +504,8 @@ function checkLeapYear(firstDate, secondDate) {
479
504
  /**
480
505
  * Checks if the provided dates are exactly a whole number of years apart.
481
506
  *
507
+ * @category Date
508
+ *
482
509
  * @param firstDate - The first date to compare.
483
510
  * @param secondDate - The second date to compare.
484
511
  *
@@ -525,6 +552,8 @@ function leapYearFebruaryChecks(firstDate, secondDate) {
525
552
  /**
526
553
  * Checks if the provided dates are exactly a whole number of months apart.
527
554
  *
555
+ * @category Date
556
+ *
528
557
  * @param firstDate - The first date to compare.
529
558
  * @param secondDate - The second date to compare.
530
559
  *
@@ -543,6 +572,8 @@ var isMonthlyMultiple_default = isMonthlyMultiple;
543
572
  /**
544
573
  * Asynchronously converts a file to a base 64 string
545
574
  *
575
+ * @category Miscellaneous
576
+ *
546
577
  * @param file - The file to convert.
547
578
  *
548
579
  * @throws {Error} If the file reader gives an error.
@@ -575,6 +606,8 @@ function getNullableResolutionStrategy(key, strategy) {
575
606
  /**
576
607
  * Creates FormData from a given object, resolving non-string types as appropriate.
577
608
  *
609
+ * @category Miscellaneous
610
+ *
578
611
  * @template DataType - The type of the given data.
579
612
  *
580
613
  * @param data - The data to create FormData from.
@@ -640,6 +673,8 @@ var createFormData_default = createFormData;
640
673
  /**
641
674
  * Checks to see if the given array is sorted in ascending order.
642
675
  *
676
+ * @category Miscellaneous
677
+ *
643
678
  * @param array - The array to check.
644
679
  *
645
680
  * @returns `true` if the array is sorted in ascending order, and `false` otherwise.
@@ -657,6 +692,8 @@ var isOrdered_default = isOrdered;
657
692
  /**
658
693
  * Converts a stringly-typed list to a proper array.
659
694
  *
695
+ * @category Miscellaneous
696
+ *
660
697
  * @param stringList - The stringly-typed list to convert.
661
698
  * @param options - The options to apply to the conversion.
662
699
  * @param options.separator - What each item in the list is separated by.
@@ -678,6 +715,8 @@ var stringListToArray_default = stringListToArray;
678
715
  /**
679
716
  * Waits for the given number of seconds
680
717
  *
718
+ * @category Miscellaneous
719
+ *
681
720
  * @param seconds - The number of seconds to wait.
682
721
  *
683
722
  * @returns A Promise that resolves after the given number of seconds.
@@ -696,6 +735,8 @@ var wait_default = wait;
696
735
  /**
697
736
  * Gets the keys from a given record object, properly typed to be an array of the key of the input object's type.
698
737
  *
738
+ * @category Object Helpers
739
+ *
699
740
  * @template InputRecordType - The type of the input object.
700
741
  *
701
742
  * @param record - The record to get the keys from.
@@ -712,6 +753,8 @@ var getRecordKeys_default = getRecordKeys;
712
753
  /**
713
754
  * Omits properties from a given object.
714
755
  *
756
+ * @category Object Helpers
757
+ *
715
758
  * @template ObjectType - The type of the input object.
716
759
  * @template KeysToOmit - A type representing the keys to omit from the object.
717
760
  *
@@ -734,6 +777,8 @@ var omitProperties_default = omitProperties;
734
777
  /**
735
778
  * Takes a stringly-typed boolean and converts it to an actual boolean type.
736
779
  *
780
+ * @category Parsers
781
+ *
737
782
  * @param inputString - The string to parse.
738
783
  *
739
784
  * @throws {DataError} If the string is not either `true` or `false` (case insensitive).
@@ -752,6 +797,8 @@ var parseBoolean_default = parseBoolean;
752
797
  /**
753
798
  * An alternative function to zodSchema.parse() that can be used to strictly parse Zod schemas.
754
799
  *
800
+ * @category Parsers
801
+ *
755
802
  * @template Output - The Zod output type.
756
803
  * @template Input - The Zod input type.
757
804
  * @template Internals - The Zod internal types based on the output and input types.
@@ -774,14 +821,21 @@ var parseZodSchema_default = parseZodSchema;
774
821
 
775
822
  //#endregion
776
823
  //#region src/functions/parsers/parseEnv.ts
777
- const envSchema = zod.z.enum([
778
- "test",
779
- "development",
780
- "production"
781
- ]);
824
+ /**
825
+ * Represents the three common development environments.
826
+ *
827
+ * @category Types
828
+ */
829
+ const Env = {
830
+ TEST: "test",
831
+ DEVELOPMENT: "development",
832
+ PRODUCTION: "production"
833
+ };
782
834
  /**
783
835
  * Parses the input and verifies it matches one of the environments allowed by the Env types ("test" | "development" | "production").
784
836
  *
837
+ * @category Parsers
838
+ *
785
839
  * @param data - The data to parse.
786
840
  *
787
841
  * @throws {DataError} If the data does not match one of the environments allowed by the Env types ("test" | "development" | "production").
@@ -789,7 +843,7 @@ const envSchema = zod.z.enum([
789
843
  * @returns The specified environment if allowed.
790
844
  */
791
845
  function parseEnv(data) {
792
- return parseZodSchema_default(envSchema, data, new DataError_default(data, "INVALID_ENV", "The provided environment type must be one of `test | development | production`"));
846
+ return parseZodSchema_default(zod.z.enum(Env), data, new DataError_default(data, "INVALID_ENV", "The provided environment type must be one of `test | development | production`"));
793
847
  }
794
848
  var parseEnv_default = parseEnv;
795
849
 
@@ -798,6 +852,8 @@ var parseEnv_default = parseEnv;
798
852
  /**
799
853
  * Returns an object given FormData and an optional data parser function to call on the resulting object.
800
854
  *
855
+ * @category Parsers
856
+ *
801
857
  * @template DataType - The type of the resulting object when called from the dataParser.
802
858
  *
803
859
  * @param formData - The FormData to parse.
@@ -818,8 +874,20 @@ var parseFormData_default = parseFormData;
818
874
  //#endregion
819
875
  //#region src/functions/parsers/parseVersionType.ts
820
876
  /**
877
+ * Represents the three common software version types.
878
+ *
879
+ * @category Types
880
+ */
881
+ const VersionType = {
882
+ MAJOR: "major",
883
+ MINOR: "minor",
884
+ PATCH: "patch"
885
+ };
886
+ /**
821
887
  * Parses the input and verifies it is a valid software version type (i.e. `"major" | "minor" | "patch"`)
822
888
  *
889
+ * @category Parsers
890
+ *
823
891
  * @param data - The data to parse.
824
892
  *
825
893
  * @throws {DataError} If the data does not match one of the allowed version types (`"major" | "minor" | "patch"`).
@@ -839,6 +907,8 @@ function callDeepCopy(input) {
839
907
  /**
840
908
  * Deeply copies an object or array such that all child objects/arrays are also copied.
841
909
  *
910
+ * @category Recursive
911
+ *
842
912
  * @template ObjectType - The type of the input object.
843
913
  *
844
914
  * @param object - The object to copy. May also be an array.
@@ -866,6 +936,8 @@ var deepCopy_default = deepCopy;
866
936
  * Note that this will also freeze the input itself as well.
867
937
  * If the intent is to create a newly frozen object with a different reference in memory, pass your object through deepCopy first before passing to deepFreeze.
868
938
  *
939
+ * @category Recursive
940
+ *
869
941
  * @template ObjectType - The type of the input object.
870
942
  *
871
943
  * @param object - The object to freeze. May also be an array.
@@ -886,6 +958,8 @@ var deepFreeze_default = deepFreeze;
886
958
  /**
887
959
  * Appends a semicolon to the end of a string, trimming where necessary first.
888
960
  *
961
+ * @category String Helpers
962
+ *
889
963
  * @param stringToAppendTo - The string to append a semicolon to.
890
964
  *
891
965
  * @throws {Error} If the string contains multiple lines.
@@ -905,6 +979,8 @@ var appendSemicolon_default = appendSemicolon;
905
979
  /**
906
980
  * Converts a string from camelCase to kebab-case
907
981
  *
982
+ * @category String Helpers
983
+ *
908
984
  * @param string - The string to convert.
909
985
  * @param options - Options to apply to the conversion.
910
986
  *
@@ -943,6 +1019,8 @@ var camelToKebab_default = camelToKebab;
943
1019
  /**
944
1020
  * Converts a string from kebab-case to camelCase
945
1021
  *
1022
+ * @category String Helpers
1023
+ *
946
1024
  * @param string - The string to convert.
947
1025
  * @param options - Options to apply to the conversion.
948
1026
  *
@@ -980,13 +1058,14 @@ var kebabToCamel_default = kebabToCamel;
980
1058
  //#region src/functions/stringHelpers/normalizeImportPath.ts
981
1059
  /**
982
1060
  * Normalizes an import path meant for use in an import statement in JavaScript.
983
- *
984
1061
  * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. If the path is a zero-length string, '.' is returned, representing the current working directory.
985
1062
  *
986
1063
  * If the path starts with ./, it is preserved (unlike what would happen with path.posix.normalize() normally).
987
1064
  *
988
1065
  * Helpful for custom linter rules that need to check (or fix) import paths.
989
1066
  *
1067
+ * @category String Helpers
1068
+ *
990
1069
  * @param importPath - The import path to normalize.
991
1070
  *
992
1071
  * @returns The import path normalized.
@@ -998,13 +1077,14 @@ function normalizeImportPath(importPath) {
998
1077
  }
999
1078
  /**
1000
1079
  * Normalises an import path meant for use in an import statement in JavaScript.
1001
- *
1002
1080
  * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. If the path is a zero-length string, '.' is returned, representing the current working directory.
1003
1081
  *
1004
1082
  * If the path starts with ./, it is preserved (unlike what would happen with path.posix.normalize() normally).
1005
1083
  *
1006
1084
  * Helpful for custom linter rules that need to check (or fix) import paths.
1007
1085
  *
1086
+ * @category String Helpers
1087
+ *
1008
1088
  * @param importPath - The import path to normalise.
1009
1089
  *
1010
1090
  * @returns The import path normalised.
@@ -1017,6 +1097,8 @@ var normalizeImportPath_default = normalizeImportPath;
1017
1097
  /**
1018
1098
  * Truncates a string and appends `...` to the end of it
1019
1099
  *
1100
+ * @category String Helpers
1101
+ *
1020
1102
  * @param stringToTruncate - The string to truncate.
1021
1103
  * @param maxLength - The length at which to start truncating. Note that this does not include the `...` part that would be appended.
1022
1104
  *
@@ -1032,6 +1114,8 @@ var truncate_default = truncate;
1032
1114
  /**
1033
1115
  * Creates a template strings array given a regular array of strings
1034
1116
  *
1117
+ * @category Tagged Template
1118
+ *
1035
1119
  * @param strings - The array of strings.
1036
1120
  *
1037
1121
  * @returns A template strings array that can be passed as the first argument of any tagged template function.
@@ -1048,10 +1132,14 @@ var createTemplateStringsArray_default = createTemplateStringsArray;
1048
1132
  *
1049
1133
  * You can pass a template string directly by doing:
1050
1134
  *
1051
- * interpolate`Template string here`.
1135
+ * ```
1136
+ * interpolate`Template string here`.
1137
+ * ```
1052
1138
  *
1053
1139
  * In this case, it will be functionally the same as if you just wrote the template string by itself.
1054
1140
  *
1141
+ * @category Tagged Template
1142
+ *
1055
1143
  * @param strings - The strings from the template to process.
1056
1144
  * @param interpolations - An array of all interpolations from the template.
1057
1145
  *
@@ -1071,7 +1159,11 @@ var interpolate_default = interpolate;
1071
1159
  *
1072
1160
  * You can pass a template string directly by doing:
1073
1161
  *
1074
- * interpolateObjects`Template string here ${{ my: "object" }}`.
1162
+ * ```typescript
1163
+ * interpolateObjects`Template string here ${{ my: "object" }}`.
1164
+ * ```
1165
+ *
1166
+ * @category Tagged Template
1075
1167
  *
1076
1168
  * @param strings - The strings from the template to process.
1077
1169
  * @param interpolations - An array of all interpolations from the template.
@@ -1119,15 +1211,21 @@ function reduceLines(lines, { preserveTabs = true }) {
1119
1211
  *
1120
1212
  * You can pass a template string directly by doing:
1121
1213
  *
1122
- * normaliseIndents`Template string here
1123
- * with a new line
1124
- * and another new line`.
1214
+ * ```typescript
1215
+ * normaliseIndents`Template string here
1216
+ * with a new line
1217
+ * and another new line`.
1218
+ * ```
1125
1219
  *
1126
1220
  * You may also pass the options first, then invoke the resulting function with a template string:
1127
1221
  *
1128
- * normaliseIndents({ preserveTabs: false })`Template string here
1129
- * with a new line
1130
- * and another new line`.
1222
+ * ```typescript
1223
+ * normaliseIndents({ preserveTabs: false })`Template string here
1224
+ * with a new line
1225
+ * and another new line`.
1226
+ * ```
1227
+ *
1228
+ *@category Tagged Template
1131
1229
  *
1132
1230
  * @param first - The strings from the template to process, or the options to apply.
1133
1231
  * @param args - An array of all interpolations from the template.
@@ -1150,15 +1248,19 @@ function normaliseIndents(first, ...args) {
1150
1248
  *
1151
1249
  * You can pass a template string directly by doing:
1152
1250
  *
1153
- * normalizeIndents`Template string here
1154
- * with a new line
1155
- * and another new line`.
1251
+ * ```typescript
1252
+ * normalizeIndents`Template string here
1253
+ * with a new line
1254
+ * and another new line`.
1255
+ * ```
1156
1256
  *
1157
1257
  * You may also pass the options first, then invoke the resulting function with a template string:
1158
1258
  *
1159
- * normalizeIndents({ preserveTabs: false })`Template string here
1160
- * with a new line
1161
- * and another new line`.
1259
+ * ```typescript
1260
+ * normalizeIndents({ preserveTabs: false })`Template string here
1261
+ * with a new line
1262
+ * and another new line`.
1263
+ * ```
1162
1264
  *
1163
1265
  * @param first - The strings from the template to process, or the options to apply.
1164
1266
  * @param args - An array of all interpolations from the template.
@@ -1263,6 +1365,7 @@ var incrementVersion_default = incrementVersion;
1263
1365
  //#endregion
1264
1366
  exports.APIError = APIError_default;
1265
1367
  exports.DataError = DataError_default;
1368
+ exports.Env = Env;
1266
1369
  exports.NAMESPACE_EXPORT_REGEX = NAMESPACE_EXPORT_REGEX_default;
1267
1370
  exports.VERSION_NUMBER_REGEX = VERSION_NUMBER_REGEX_default;
1268
1371
  exports.VersionNumber = VersionNumber_default;