@alextheman/utility 4.3.2 → 4.3.3

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
@@ -1125,6 +1125,28 @@ function createTemplateStringsArray(strings) {
1125
1125
  }
1126
1126
  var createTemplateStringsArray_default = createTemplateStringsArray;
1127
1127
 
1128
+ //#endregion
1129
+ //#region src/functions/taggedTemplate/getInterpolations.ts
1130
+ /**
1131
+ * Gets the strings and interpolations separately from a template string.
1132
+ * You can pass a template string directly by doing:
1133
+ *
1134
+ * ```typescript
1135
+ * getInterpolations`Template string here`.
1136
+ * ```
1137
+ *
1138
+ * @category Tagged Template
1139
+ *
1140
+ * @param strings - The strings from the template to process.
1141
+ * @param interpolations - An array of all interpolations from the template.
1142
+ *
1143
+ * @returns A tuple where the first item is the strings from the template, and the second is the interpolations.
1144
+ */
1145
+ function getInterpolations(strings, ...interpolations) {
1146
+ return [strings, interpolations];
1147
+ }
1148
+ var getInterpolations_default = getInterpolations;
1149
+
1128
1150
  //#endregion
1129
1151
  //#region src/functions/taggedTemplate/interpolate.ts
1130
1152
  /**
@@ -1382,6 +1404,7 @@ exports.determineVersionType = determineVersionType_default;
1382
1404
  exports.fillArray = fillArray_default;
1383
1405
  exports.formatDateAndTime = formatDateAndTime_default;
1384
1406
  exports.getIndividualVersionNumbers = getIndividualVersionNumbers_default;
1407
+ exports.getInterpolations = getInterpolations_default;
1385
1408
  exports.getRandomNumber = getRandomNumber_default;
1386
1409
  exports.getRecordKeys = getRecordKeys_default;
1387
1410
  exports.httpErrorCodeLookup = httpErrorCodeLookup;
package/dist/index.d.cts CHANGED
@@ -814,6 +814,24 @@ declare function truncate(stringToTruncate: string, maxLength?: number): string;
814
814
  */
815
815
  declare function createTemplateStringsArray(strings: readonly string[]): TemplateStringsArray;
816
816
  //#endregion
817
+ //#region src/functions/taggedTemplate/getInterpolations.d.ts
818
+ /**
819
+ * Gets the strings and interpolations separately from a template string.
820
+ * You can pass a template string directly by doing:
821
+ *
822
+ * ```typescript
823
+ * getInterpolations`Template string here`.
824
+ * ```
825
+ *
826
+ * @category Tagged Template
827
+ *
828
+ * @param strings - The strings from the template to process.
829
+ * @param interpolations - An array of all interpolations from the template.
830
+ *
831
+ * @returns A tuple where the first item is the strings from the template, and the second is the interpolations.
832
+ */
833
+ declare function getInterpolations(strings: TemplateStringsArray, ...interpolations: unknown[]): [TemplateStringsArray, unknown[]];
834
+ //#endregion
817
835
  //#region src/functions/taggedTemplate/interpolate.d.ts
818
836
  /**
819
837
  * Returns the result of interpolating a template string when given the strings and interpolations separately.
@@ -993,4 +1011,4 @@ interface ParseVersionOptions {
993
1011
  */
994
1012
  declare function parseVersion(input: string, options?: ParseVersionOptions): string;
995
1013
  //#endregion
996
- export { APIError, ArrayElement, CamelToKebabOptions, CreateEnumType, CreateFormDataOptions, CreateFormDataOptionsNullableResolution, CreateFormDataOptionsUndefinedOrNullResolution, DataError, DisallowUndefined, Env, FormDataArrayResolutionStrategy, FormDataNullableResolutionStrategy, HTTPErrorCode, IgnoreCase, IncrementVersionOptions, KebabToCamelOptions, NAMESPACE_EXPORT_REGEX, NonUndefined, NormaliseIndentsFunction, NormaliseIndentsOptions, NormalizeIndentsFunction, NormalizeIndentsOptions, OptionalOnCondition, ParallelTuple, ParseVersionOptions, RecordKey, StringListToArrayOptions, VERSION_NUMBER_REGEX, VersionNumber, VersionNumberToStringOptions, VersionType, addDaysToDate, appendSemicolon, camelToKebab, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, determineVersionType, fillArray, formatDateAndTime, getIndividualVersionNumbers, getRandomNumber, getRecordKeys, httpErrorCodeLookup, incrementVersion, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, kebabToCamel, normaliseImportPath, normaliseIndents, normalizeImportPath, normalizeIndents, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseVersion, parseVersionType, parseZodSchema, randomiseArray, range, removeDuplicates, stringListToArray, truncate, wait };
1014
+ export { APIError, ArrayElement, CamelToKebabOptions, CreateEnumType, CreateFormDataOptions, CreateFormDataOptionsNullableResolution, CreateFormDataOptionsUndefinedOrNullResolution, DataError, DisallowUndefined, Env, FormDataArrayResolutionStrategy, FormDataNullableResolutionStrategy, HTTPErrorCode, IgnoreCase, IncrementVersionOptions, KebabToCamelOptions, NAMESPACE_EXPORT_REGEX, NonUndefined, NormaliseIndentsFunction, NormaliseIndentsOptions, NormalizeIndentsFunction, NormalizeIndentsOptions, OptionalOnCondition, ParallelTuple, ParseVersionOptions, RecordKey, StringListToArrayOptions, VERSION_NUMBER_REGEX, VersionNumber, VersionNumberToStringOptions, VersionType, addDaysToDate, appendSemicolon, camelToKebab, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, determineVersionType, fillArray, formatDateAndTime, getIndividualVersionNumbers, getInterpolations, getRandomNumber, getRecordKeys, httpErrorCodeLookup, incrementVersion, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, kebabToCamel, normaliseImportPath, normaliseIndents, normalizeImportPath, normalizeIndents, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseVersion, parseVersionType, parseZodSchema, randomiseArray, range, removeDuplicates, stringListToArray, truncate, wait };
package/dist/index.d.ts CHANGED
@@ -814,6 +814,24 @@ declare function truncate(stringToTruncate: string, maxLength?: number): string;
814
814
  */
815
815
  declare function createTemplateStringsArray(strings: readonly string[]): TemplateStringsArray;
816
816
  //#endregion
817
+ //#region src/functions/taggedTemplate/getInterpolations.d.ts
818
+ /**
819
+ * Gets the strings and interpolations separately from a template string.
820
+ * You can pass a template string directly by doing:
821
+ *
822
+ * ```typescript
823
+ * getInterpolations`Template string here`.
824
+ * ```
825
+ *
826
+ * @category Tagged Template
827
+ *
828
+ * @param strings - The strings from the template to process.
829
+ * @param interpolations - An array of all interpolations from the template.
830
+ *
831
+ * @returns A tuple where the first item is the strings from the template, and the second is the interpolations.
832
+ */
833
+ declare function getInterpolations(strings: TemplateStringsArray, ...interpolations: unknown[]): [TemplateStringsArray, unknown[]];
834
+ //#endregion
817
835
  //#region src/functions/taggedTemplate/interpolate.d.ts
818
836
  /**
819
837
  * Returns the result of interpolating a template string when given the strings and interpolations separately.
@@ -993,4 +1011,4 @@ interface ParseVersionOptions {
993
1011
  */
994
1012
  declare function parseVersion(input: string, options?: ParseVersionOptions): string;
995
1013
  //#endregion
996
- export { APIError, ArrayElement, CamelToKebabOptions, CreateEnumType, CreateFormDataOptions, CreateFormDataOptionsNullableResolution, CreateFormDataOptionsUndefinedOrNullResolution, DataError, DisallowUndefined, Env, FormDataArrayResolutionStrategy, FormDataNullableResolutionStrategy, HTTPErrorCode, IgnoreCase, type IncrementVersionOptions, KebabToCamelOptions, NAMESPACE_EXPORT_REGEX, NonUndefined, NormaliseIndentsFunction, NormaliseIndentsOptions, NormalizeIndentsFunction, NormalizeIndentsOptions, OptionalOnCondition, ParallelTuple, type ParseVersionOptions, RecordKey, StringListToArrayOptions, VERSION_NUMBER_REGEX, VersionNumber, VersionNumberToStringOptions, VersionType, addDaysToDate, appendSemicolon, camelToKebab, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, determineVersionType, fillArray, formatDateAndTime, getIndividualVersionNumbers, getRandomNumber, getRecordKeys, httpErrorCodeLookup, incrementVersion, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, kebabToCamel, normaliseImportPath, normaliseIndents, normalizeImportPath, normalizeIndents, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseVersion, parseVersionType, parseZodSchema, randomiseArray, range, removeDuplicates, stringListToArray, truncate, wait };
1014
+ export { APIError, ArrayElement, CamelToKebabOptions, CreateEnumType, CreateFormDataOptions, CreateFormDataOptionsNullableResolution, CreateFormDataOptionsUndefinedOrNullResolution, DataError, DisallowUndefined, Env, FormDataArrayResolutionStrategy, FormDataNullableResolutionStrategy, HTTPErrorCode, IgnoreCase, type IncrementVersionOptions, KebabToCamelOptions, NAMESPACE_EXPORT_REGEX, NonUndefined, NormaliseIndentsFunction, NormaliseIndentsOptions, NormalizeIndentsFunction, NormalizeIndentsOptions, OptionalOnCondition, ParallelTuple, type ParseVersionOptions, RecordKey, StringListToArrayOptions, VERSION_NUMBER_REGEX, VersionNumber, VersionNumberToStringOptions, VersionType, addDaysToDate, appendSemicolon, camelToKebab, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, determineVersionType, fillArray, formatDateAndTime, getIndividualVersionNumbers, getInterpolations, getRandomNumber, getRecordKeys, httpErrorCodeLookup, incrementVersion, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, kebabToCamel, normaliseImportPath, normaliseIndents, normalizeImportPath, normalizeIndents, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseVersion, parseVersionType, parseZodSchema, randomiseArray, range, removeDuplicates, stringListToArray, truncate, wait };
package/dist/index.js CHANGED
@@ -1096,6 +1096,28 @@ function createTemplateStringsArray(strings) {
1096
1096
  }
1097
1097
  var createTemplateStringsArray_default = createTemplateStringsArray;
1098
1098
 
1099
+ //#endregion
1100
+ //#region src/functions/taggedTemplate/getInterpolations.ts
1101
+ /**
1102
+ * Gets the strings and interpolations separately from a template string.
1103
+ * You can pass a template string directly by doing:
1104
+ *
1105
+ * ```typescript
1106
+ * getInterpolations`Template string here`.
1107
+ * ```
1108
+ *
1109
+ * @category Tagged Template
1110
+ *
1111
+ * @param strings - The strings from the template to process.
1112
+ * @param interpolations - An array of all interpolations from the template.
1113
+ *
1114
+ * @returns A tuple where the first item is the strings from the template, and the second is the interpolations.
1115
+ */
1116
+ function getInterpolations(strings, ...interpolations) {
1117
+ return [strings, interpolations];
1118
+ }
1119
+ var getInterpolations_default = getInterpolations;
1120
+
1099
1121
  //#endregion
1100
1122
  //#region src/functions/taggedTemplate/interpolate.ts
1101
1123
  /**
@@ -1334,4 +1356,4 @@ function incrementVersion(version, incrementType, options) {
1334
1356
  var incrementVersion_default = incrementVersion;
1335
1357
 
1336
1358
  //#endregion
1337
- export { APIError_default as APIError, DataError_default as DataError, Env, NAMESPACE_EXPORT_REGEX_default as NAMESPACE_EXPORT_REGEX, VERSION_NUMBER_REGEX_default as VERSION_NUMBER_REGEX, VersionNumber_default as VersionNumber, VersionType, addDaysToDate_default as addDaysToDate, appendSemicolon_default as appendSemicolon, camelToKebab_default as camelToKebab, convertFileToBase64_default as convertFileToBase64, createFormData_default as createFormData, createTemplateStringsArray_default as createTemplateStringsArray, deepCopy_default as deepCopy, deepFreeze_default as deepFreeze, determineVersionType_default as determineVersionType, fillArray_default as fillArray, formatDateAndTime_default as formatDateAndTime, getIndividualVersionNumbers_default as getIndividualVersionNumbers, getRandomNumber_default as getRandomNumber, getRecordKeys_default as getRecordKeys, httpErrorCodeLookup, incrementVersion_default as incrementVersion, interpolate_default as interpolate, interpolateObjects_default as interpolateObjects, isAnniversary_default as isAnniversary, isLeapYear_default as isLeapYear, isMonthlyMultiple_default as isMonthlyMultiple, isOrdered_default as isOrdered, isSameDate_default as isSameDate, kebabToCamel_default as kebabToCamel, normaliseImportPath, normaliseIndents_default as normaliseIndents, normalizeImportPath_default as normalizeImportPath, normalizeIndents, omitProperties_default as omitProperties, paralleliseArrays_default as paralleliseArrays, parseBoolean_default as parseBoolean, parseEnv_default as parseEnv, parseFormData_default as parseFormData, parseIntStrict_default as parseIntStrict, parseVersion_default as parseVersion, parseVersionType_default as parseVersionType, parseZodSchema_default as parseZodSchema, randomiseArray_default as randomiseArray, range_default as range, removeDuplicates_default as removeDuplicates, stringListToArray_default as stringListToArray, truncate_default as truncate, wait_default as wait };
1359
+ export { APIError_default as APIError, DataError_default as DataError, Env, NAMESPACE_EXPORT_REGEX_default as NAMESPACE_EXPORT_REGEX, VERSION_NUMBER_REGEX_default as VERSION_NUMBER_REGEX, VersionNumber_default as VersionNumber, VersionType, addDaysToDate_default as addDaysToDate, appendSemicolon_default as appendSemicolon, camelToKebab_default as camelToKebab, convertFileToBase64_default as convertFileToBase64, createFormData_default as createFormData, createTemplateStringsArray_default as createTemplateStringsArray, deepCopy_default as deepCopy, deepFreeze_default as deepFreeze, determineVersionType_default as determineVersionType, fillArray_default as fillArray, formatDateAndTime_default as formatDateAndTime, getIndividualVersionNumbers_default as getIndividualVersionNumbers, getInterpolations_default as getInterpolations, getRandomNumber_default as getRandomNumber, getRecordKeys_default as getRecordKeys, httpErrorCodeLookup, incrementVersion_default as incrementVersion, interpolate_default as interpolate, interpolateObjects_default as interpolateObjects, isAnniversary_default as isAnniversary, isLeapYear_default as isLeapYear, isMonthlyMultiple_default as isMonthlyMultiple, isOrdered_default as isOrdered, isSameDate_default as isSameDate, kebabToCamel_default as kebabToCamel, normaliseImportPath, normaliseIndents_default as normaliseIndents, normalizeImportPath_default as normalizeImportPath, normalizeIndents, omitProperties_default as omitProperties, paralleliseArrays_default as paralleliseArrays, parseBoolean_default as parseBoolean, parseEnv_default as parseEnv, parseFormData_default as parseFormData, parseIntStrict_default as parseIntStrict, parseVersion_default as parseVersion, parseVersionType_default as parseVersionType, parseZodSchema_default as parseZodSchema, randomiseArray_default as randomiseArray, range_default as range, removeDuplicates_default as removeDuplicates, stringListToArray_default as stringListToArray, truncate_default as truncate, wait_default as wait };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/utility",
3
- "version": "4.3.2",
3
+ "version": "4.3.3",
4
4
  "description": "Helpful utility functions",
5
5
  "repository": {
6
6
  "type": "git",