@dereekb/util 12.3.6 → 12.3.8

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.
@@ -2551,6 +2551,138 @@ function isFetchRequest(input) {
2551
2551
  return Boolean(input.url);
2552
2552
  }
2553
2553
 
2554
+ const NullObject = function NullObject () { };
2555
+ NullObject.prototype = Object.create(null);
2556
+
2557
+ /**
2558
+ * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
2559
+ *
2560
+ * parameter = token "=" ( token / quoted-string )
2561
+ * token = 1*tchar
2562
+ * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
2563
+ * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
2564
+ * / DIGIT / ALPHA
2565
+ * ; any VCHAR, except delimiters
2566
+ * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
2567
+ * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
2568
+ * obs-text = %x80-FF
2569
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
2570
+ */
2571
+ const paramRE = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu;
2572
+
2573
+ /**
2574
+ * RegExp to match quoted-pair in RFC 7230 sec 3.2.6
2575
+ *
2576
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
2577
+ * obs-text = %x80-FF
2578
+ */
2579
+ const quotedPairRE = /\\([\v\u0020-\u00ff])/gu;
2580
+
2581
+ /**
2582
+ * RegExp to match type in RFC 7231 sec 3.1.1.1
2583
+ *
2584
+ * media-type = type "/" subtype
2585
+ * type = token
2586
+ * subtype = token
2587
+ */
2588
+ const mediaTypeRE = /^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u;
2589
+
2590
+ // default ContentType to prevent repeated object creation
2591
+ const defaultContentType = { type: '', parameters: new NullObject() };
2592
+ Object.freeze(defaultContentType.parameters);
2593
+ Object.freeze(defaultContentType);
2594
+
2595
+ function safeParse (header) {
2596
+ if (typeof header !== 'string') {
2597
+ return defaultContentType
2598
+ }
2599
+
2600
+ let index = header.indexOf(';');
2601
+ const type = index !== -1
2602
+ ? header.slice(0, index).trim()
2603
+ : header.trim();
2604
+
2605
+ if (mediaTypeRE.test(type) === false) {
2606
+ return defaultContentType
2607
+ }
2608
+
2609
+ const result = {
2610
+ type: type.toLowerCase(),
2611
+ parameters: new NullObject()
2612
+ };
2613
+
2614
+ // parse parameters
2615
+ if (index === -1) {
2616
+ return result
2617
+ }
2618
+
2619
+ let key;
2620
+ let match;
2621
+ let value;
2622
+
2623
+ paramRE.lastIndex = index;
2624
+
2625
+ while ((match = paramRE.exec(header))) {
2626
+ if (match.index !== index) {
2627
+ return defaultContentType
2628
+ }
2629
+
2630
+ index += match[0].length;
2631
+ key = match[1].toLowerCase();
2632
+ value = match[2];
2633
+
2634
+ if (value[0] === '"') {
2635
+ // remove quotes and escapes
2636
+ value = value
2637
+ .slice(1, value.length - 1);
2638
+
2639
+ quotedPairRE.test(value) && (value = value.replace(quotedPairRE, '$1'));
2640
+ }
2641
+
2642
+ result.parameters[key] = value;
2643
+ }
2644
+
2645
+ if (index !== header.length) {
2646
+ return defaultContentType
2647
+ }
2648
+
2649
+ return result
2650
+ }
2651
+ var safeParse_1 = safeParse;
2652
+
2653
+ function fetchUploadFile(input) {
2654
+ const {
2655
+ fetch: inputFetch,
2656
+ url,
2657
+ body: inputBody
2658
+ } = input;
2659
+ const useFetch = inputFetch ?? fetch;
2660
+ return useFetch(url, {
2661
+ method: input.method ?? 'POST',
2662
+ body: inputBody.body,
2663
+ headers: {
2664
+ 'Content-Type': inputBody.mimeType
2665
+ }
2666
+ });
2667
+ }
2668
+ /**
2669
+ * Parses the file response and returns the response wrapped in a FetchFileResponse object.
2670
+ *
2671
+ * @param response
2672
+ * @returns
2673
+ */
2674
+ function parseFetchFileResponse(response) {
2675
+ const rawContentType = response.headers.get('content-type');
2676
+ const parseContentTypeResult = safeParse_1(rawContentType ?? '');
2677
+ const contentType = parseContentTypeResult.type !== '' ? parseContentTypeResult : undefined;
2678
+ return {
2679
+ response,
2680
+ rawContentType,
2681
+ contentType,
2682
+ mimeType: contentType?.type
2683
+ };
2684
+ }
2685
+
2554
2686
  function rateLimitedFetchHandler(config) {
2555
2687
  const {
2556
2688
  updateWithResponse,
@@ -2952,10 +3084,11 @@ async function iterateFetchPages(config) {
2952
3084
  function makeUrlSearchParams(input, options) {
2953
3085
  const {
2954
3086
  omitKeys,
2955
- filterNullAndUndefinedValues: filterValues = true
3087
+ filterNullAndUndefinedValues,
3088
+ filterEmptyValues: filterValues = filterNullAndUndefinedValues ?? true
2956
3089
  } = options ?? {};
2957
3090
  const mergedInput = Array.isArray(input) ? util.mergeObjects(input) : input;
2958
- const filteredInput = filterValues ? util.filterNullAndUndefinedValues(mergedInput ?? {}) : mergedInput;
3091
+ const filteredInput = filterValues ? util.filterEmptyPojoValues(mergedInput ?? {}) : mergedInput;
2959
3092
  const searchParams = new URLSearchParams(filteredInput);
2960
3093
  if (omitKeys != null) {
2961
3094
  util.useIterableOrValue(omitKeys, key => searchParams.delete(key), false);
@@ -3181,6 +3314,7 @@ exports.fetchTimeout = fetchTimeout;
3181
3314
  exports.fetchURL = fetchURL;
3182
3315
  exports.fetchURLQueryKeyValueStringTuples = fetchURLQueryKeyValueStringTuples;
3183
3316
  exports.fetchURLSearchParamsObjectToURLSearchParams = fetchURLSearchParamsObjectToURLSearchParams;
3317
+ exports.fetchUploadFile = fetchUploadFile;
3184
3318
  exports.headersToHeadersTuple = headersToHeadersTuple;
3185
3319
  exports.isFetchRequest = isFetchRequest;
3186
3320
  exports.isURL = isURL;
@@ -3193,6 +3327,7 @@ exports.mergeMakeUrlSearchParamsOptions = mergeMakeUrlSearchParamsOptions;
3193
3327
  exports.mergeRequestHeaders = mergeRequestHeaders;
3194
3328
  exports.mergeRequestInits = mergeRequestInits;
3195
3329
  exports.nodeFetchService = nodeFetchService;
3330
+ exports.parseFetchFileResponse = parseFetchFileResponse;
3196
3331
  exports.queryParamsToSearchParams = queryParamsToSearchParams;
3197
3332
  exports.rateLimitedFetchHandler = rateLimitedFetchHandler;
3198
3333
  exports.requireOkResponse = requireOkResponse;
@@ -1,4 +1,4 @@
1
- import { removeTrailingSlashes, asGetter, multiValueMapBuilder, filterMaybeArrayValues, isWebsiteUrlWithPrefix, fixMultiSlashesInSlashPath, isPromiseLike, cachedGetter, FIRST_PAGE, performAsyncTasks, mapIdentityFunction, performTasksFromFactoryInParallelFunction, mergeObjects, filterNullAndUndefinedValues, useIterableOrValue, isEmptyIterable, fixExtraQueryParameters, forEachInIterable, isIterable, forEachKeyValue } from '@dereekb/util';
1
+ import { removeTrailingSlashes, asGetter, multiValueMapBuilder, filterMaybeArrayValues, isWebsiteUrlWithPrefix, fixMultiSlashesInSlashPath, isPromiseLike, cachedGetter, FIRST_PAGE, performAsyncTasks, mapIdentityFunction, performTasksFromFactoryInParallelFunction, mergeObjects, filterEmptyPojoValues, useIterableOrValue, isEmptyIterable, fixExtraQueryParameters, forEachInIterable, isIterable, forEachKeyValue } from '@dereekb/util';
2
2
 
3
3
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
4
 
@@ -2549,6 +2549,138 @@ function isFetchRequest(input) {
2549
2549
  return Boolean(input.url);
2550
2550
  }
2551
2551
 
2552
+ const NullObject = function NullObject () { };
2553
+ NullObject.prototype = Object.create(null);
2554
+
2555
+ /**
2556
+ * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
2557
+ *
2558
+ * parameter = token "=" ( token / quoted-string )
2559
+ * token = 1*tchar
2560
+ * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
2561
+ * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
2562
+ * / DIGIT / ALPHA
2563
+ * ; any VCHAR, except delimiters
2564
+ * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
2565
+ * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
2566
+ * obs-text = %x80-FF
2567
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
2568
+ */
2569
+ const paramRE = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu;
2570
+
2571
+ /**
2572
+ * RegExp to match quoted-pair in RFC 7230 sec 3.2.6
2573
+ *
2574
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
2575
+ * obs-text = %x80-FF
2576
+ */
2577
+ const quotedPairRE = /\\([\v\u0020-\u00ff])/gu;
2578
+
2579
+ /**
2580
+ * RegExp to match type in RFC 7231 sec 3.1.1.1
2581
+ *
2582
+ * media-type = type "/" subtype
2583
+ * type = token
2584
+ * subtype = token
2585
+ */
2586
+ const mediaTypeRE = /^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u;
2587
+
2588
+ // default ContentType to prevent repeated object creation
2589
+ const defaultContentType = { type: '', parameters: new NullObject() };
2590
+ Object.freeze(defaultContentType.parameters);
2591
+ Object.freeze(defaultContentType);
2592
+
2593
+ function safeParse (header) {
2594
+ if (typeof header !== 'string') {
2595
+ return defaultContentType
2596
+ }
2597
+
2598
+ let index = header.indexOf(';');
2599
+ const type = index !== -1
2600
+ ? header.slice(0, index).trim()
2601
+ : header.trim();
2602
+
2603
+ if (mediaTypeRE.test(type) === false) {
2604
+ return defaultContentType
2605
+ }
2606
+
2607
+ const result = {
2608
+ type: type.toLowerCase(),
2609
+ parameters: new NullObject()
2610
+ };
2611
+
2612
+ // parse parameters
2613
+ if (index === -1) {
2614
+ return result
2615
+ }
2616
+
2617
+ let key;
2618
+ let match;
2619
+ let value;
2620
+
2621
+ paramRE.lastIndex = index;
2622
+
2623
+ while ((match = paramRE.exec(header))) {
2624
+ if (match.index !== index) {
2625
+ return defaultContentType
2626
+ }
2627
+
2628
+ index += match[0].length;
2629
+ key = match[1].toLowerCase();
2630
+ value = match[2];
2631
+
2632
+ if (value[0] === '"') {
2633
+ // remove quotes and escapes
2634
+ value = value
2635
+ .slice(1, value.length - 1);
2636
+
2637
+ quotedPairRE.test(value) && (value = value.replace(quotedPairRE, '$1'));
2638
+ }
2639
+
2640
+ result.parameters[key] = value;
2641
+ }
2642
+
2643
+ if (index !== header.length) {
2644
+ return defaultContentType
2645
+ }
2646
+
2647
+ return result
2648
+ }
2649
+ var safeParse_1 = safeParse;
2650
+
2651
+ function fetchUploadFile(input) {
2652
+ const {
2653
+ fetch: inputFetch,
2654
+ url,
2655
+ body: inputBody
2656
+ } = input;
2657
+ const useFetch = inputFetch ?? fetch;
2658
+ return useFetch(url, {
2659
+ method: input.method ?? 'POST',
2660
+ body: inputBody.body,
2661
+ headers: {
2662
+ 'Content-Type': inputBody.mimeType
2663
+ }
2664
+ });
2665
+ }
2666
+ /**
2667
+ * Parses the file response and returns the response wrapped in a FetchFileResponse object.
2668
+ *
2669
+ * @param response
2670
+ * @returns
2671
+ */
2672
+ function parseFetchFileResponse(response) {
2673
+ const rawContentType = response.headers.get('content-type');
2674
+ const parseContentTypeResult = safeParse_1(rawContentType ?? '');
2675
+ const contentType = parseContentTypeResult.type !== '' ? parseContentTypeResult : undefined;
2676
+ return {
2677
+ response,
2678
+ rawContentType,
2679
+ contentType,
2680
+ mimeType: contentType?.type
2681
+ };
2682
+ }
2683
+
2552
2684
  function rateLimitedFetchHandler(config) {
2553
2685
  const {
2554
2686
  updateWithResponse,
@@ -2950,10 +3082,11 @@ async function iterateFetchPages(config) {
2950
3082
  function makeUrlSearchParams(input, options) {
2951
3083
  const {
2952
3084
  omitKeys,
2953
- filterNullAndUndefinedValues: filterValues = true
3085
+ filterNullAndUndefinedValues,
3086
+ filterEmptyValues: filterValues = filterNullAndUndefinedValues ?? true
2954
3087
  } = options ?? {};
2955
3088
  const mergedInput = Array.isArray(input) ? mergeObjects(input) : input;
2956
- const filteredInput = filterValues ? filterNullAndUndefinedValues(mergedInput ?? {}) : mergedInput;
3089
+ const filteredInput = filterValues ? filterEmptyPojoValues(mergedInput ?? {}) : mergedInput;
2957
3090
  const searchParams = new URLSearchParams(filteredInput);
2958
3091
  if (omitKeys != null) {
2959
3092
  useIterableOrValue(omitKeys, key => searchParams.delete(key), false);
@@ -3156,4 +3289,4 @@ const fetchApiFetchService = fetchService({
3156
3289
  */
3157
3290
  const nodeFetchService = fetchApiFetchService;
3158
3291
 
3159
- export { DEFAULT_FETCH_HANDLER, DEFAULT_FETCH_REQUEST_FACTORY, FETCH_PAGE_FACTORY_DEFAULT_MAX_PAGE, FetchPageLimitReachedError, FetchPageNoNextPageError, FetchRequestFactoryError, FetchResponseError, FetchTimeoutError, JsonResponseParseError, configureFetch, fetchApiFetchService, fetchJsonBodyString, fetchJsonFunction, fetchJsonRequestInit, fetchJsonRequestInitFunction, fetchOk, fetchPageFactory, fetchRequestFactory, fetchService, fetchTimeout, fetchURL, fetchURLQueryKeyValueStringTuples, fetchURLSearchParamsObjectToURLSearchParams, headersToHeadersTuple, isFetchRequest, isURL, isURLSearchParams, iterateFetchPages, iterateFetchPagesByEachItem, iterateFetchPagesByItems, makeUrlSearchParams, mergeMakeUrlSearchParamsOptions, mergeRequestHeaders, mergeRequestInits, nodeFetchService, queryParamsToSearchParams, rateLimitedFetchHandler, requireOkResponse, returnNullHandleFetchJsonParseErrorFunction, throwJsonResponseParseErrorFunction };
3292
+ export { DEFAULT_FETCH_HANDLER, DEFAULT_FETCH_REQUEST_FACTORY, FETCH_PAGE_FACTORY_DEFAULT_MAX_PAGE, FetchPageLimitReachedError, FetchPageNoNextPageError, FetchRequestFactoryError, FetchResponseError, FetchTimeoutError, JsonResponseParseError, configureFetch, fetchApiFetchService, fetchJsonBodyString, fetchJsonFunction, fetchJsonRequestInit, fetchJsonRequestInitFunction, fetchOk, fetchPageFactory, fetchRequestFactory, fetchService, fetchTimeout, fetchURL, fetchURLQueryKeyValueStringTuples, fetchURLSearchParamsObjectToURLSearchParams, fetchUploadFile, headersToHeadersTuple, isFetchRequest, isURL, isURLSearchParams, iterateFetchPages, iterateFetchPagesByEachItem, iterateFetchPagesByItems, makeUrlSearchParams, mergeMakeUrlSearchParamsOptions, mergeRequestHeaders, mergeRequestInits, nodeFetchService, parseFetchFileResponse, queryParamsToSearchParams, rateLimitedFetchHandler, requireOkResponse, returnNullHandleFetchJsonParseErrorFunction, throwJsonResponseParseErrorFunction };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/util/fetch",
3
- "version": "12.3.6",
3
+ "version": "12.3.8",
4
4
  ".": {
5
5
  "types": "./src/index.d.ts",
6
6
  "node": {
@@ -0,0 +1,68 @@
1
+ import { ContentTypeMimeType, Maybe, MimeTypeWithoutParameters } from '@dereekb/util';
2
+ import { safeParse as parseContentType } from 'fast-content-type-parse';
3
+ import { FetchMethod } from './fetch.type';
4
+ /**
5
+ * Input for fetchUploadFile().
6
+ */
7
+ export interface FetchUploadFile {
8
+ /**
9
+ * URL to upload the file to.
10
+ */
11
+ readonly url: string;
12
+ /**
13
+ * Fetch function to use.
14
+ *
15
+ * Defaults to the global fetch function.
16
+ */
17
+ readonly fetch?: typeof fetch;
18
+ /**
19
+ * Method to use. Defaults to 'POST'.
20
+ */
21
+ readonly method?: FetchMethod;
22
+ /**
23
+ * Body data to upload.
24
+ */
25
+ readonly body: FetchUploadFileBody;
26
+ }
27
+ /**
28
+ * A mime type and body pair to upload.
29
+ */
30
+ export interface FetchUploadFileBody {
31
+ /**
32
+ * The mime type of the body content to upload.
33
+ */
34
+ readonly mimeType: ContentTypeMimeType;
35
+ /**
36
+ * The body, passed to fetch.
37
+ *
38
+ * Can be a Uint8Array, Buffer, FormData, string, etc.
39
+ */
40
+ readonly body: BodyInit;
41
+ }
42
+ export declare function fetchUploadFile(input: FetchUploadFile): Promise<Response>;
43
+ export type FetchFileResponseContentType = ReturnType<typeof parseContentType>;
44
+ export interface FetchFileResponse {
45
+ /**
46
+ * The raw response from the fetch request.
47
+ */
48
+ readonly response: Response;
49
+ /**
50
+ * Raw content type from the response's content-type header.
51
+ */
52
+ readonly rawContentType: Maybe<ContentTypeMimeType>;
53
+ /**
54
+ * Parsed content type. Unavailable if the content type could not be parsed.
55
+ */
56
+ readonly contentType: Maybe<FetchFileResponseContentType>;
57
+ /**
58
+ * Parsed mime type. Unavailable if the content type could not be parsed.
59
+ */
60
+ readonly mimeType: Maybe<MimeTypeWithoutParameters>;
61
+ }
62
+ /**
63
+ * Parses the file response and returns the response wrapped in a FetchFileResponse object.
64
+ *
65
+ * @param response
66
+ * @returns
67
+ */
68
+ export declare function parseFetchFileResponse(response: Response): FetchFileResponse;
@@ -1,3 +1,8 @@
1
+ /**
2
+ * The HTTP method to use for the request.
3
+ *
4
+ * I.E. 'GET', 'POST', 'PUT', 'DELETE', etc.
5
+ */
1
6
  export type FetchMethod = Request['method'];
2
7
  export interface RequestTimeoutRef {
3
8
  timeout?: number | null;
@@ -8,10 +8,18 @@ export interface MakeUrlSearchParamsOptions {
8
8
  */
9
9
  readonly omitKeys?: Maybe<IterableOrValue<ObjectKey>>;
10
10
  /**
11
- * Whether to filter out null and undefined values from the input objects.
11
+ * Whether to filter out empty values from the input objects.
12
12
  *
13
13
  * Defaults to true.
14
14
  */
15
+ readonly filterEmptyValues?: boolean;
16
+ /**
17
+ * Whether to filter out null and undefined empty values from the input objects.
18
+ *
19
+ * Defaults to true.
20
+ *
21
+ * @deprecated Use filterEmptyValues instead.
22
+ */
15
23
  readonly filterNullAndUndefinedValues?: boolean;
16
24
  }
17
25
  /**
@@ -1,5 +1,6 @@
1
1
  export * from './error';
2
2
  export * from './fetch';
3
+ export * from './fetch.file';
3
4
  export * from './fetch.limit';
4
5
  export * from './fetch.type';
5
6
  export * from './fetch.page';
package/index.cjs.js CHANGED
@@ -5990,11 +5990,25 @@ function findIndexOfFirstDuplicateValue(values) {
5990
5990
  });
5991
5991
  }
5992
5992
 
5993
+ const COMMA_JOINER = ',';
5993
5994
  function caseInsensitiveString(input) {
5994
5995
  return input?.toLocaleLowerCase();
5995
5996
  }
5997
+ function joinStrings(input, joiner = COMMA_JOINER, trim = false) {
5998
+ if (input == null) {
5999
+ return input;
6000
+ }
6001
+ let array = asArray(input);
6002
+ if (trim) {
6003
+ array = array.map(x => x?.trim());
6004
+ }
6005
+ return array.filter(Boolean).join(joiner);
6006
+ }
6007
+ function joinStringsWithCommas(input, trim = false) {
6008
+ return joinStrings(input, COMMA_JOINER, trim);
6009
+ }
5996
6010
  function splitCommaSeparatedString(input, mapFn = x => x) {
5997
- const splits = input.split(',');
6011
+ const splits = input.split(COMMA_JOINER);
5998
6012
  return splits.map(x => mapFn(x.trim()));
5999
6013
  }
6000
6014
  function splitCommaSeparatedStringToSet(input) {
@@ -6052,6 +6066,7 @@ function splitJoinRemainder(input, separator, limit) {
6052
6066
  }
6053
6067
  return components;
6054
6068
  }
6069
+ const SPACE_JOINER = ' ';
6055
6070
  /**
6056
6071
  * Splits the input string like it is a name with a space separating the first and last name string.
6057
6072
  *
@@ -6059,16 +6074,10 @@ function splitJoinRemainder(input, separator, limit) {
6059
6074
  * @returns
6060
6075
  */
6061
6076
  function splitJoinNameString(input) {
6062
- return splitJoinRemainder(input, ' ', 2);
6077
+ return splitJoinRemainder(input, SPACE_JOINER, 2);
6063
6078
  }
6064
- /**
6065
- * Joins one or more strings together with spaces. Extra spaces are trimmed from the values.
6066
- *
6067
- * @param input
6068
- * @returns
6069
- */
6070
6079
  function joinStringsWithSpaces(input) {
6071
- return input.map(x => x?.trim()).filter(x => Boolean(x)).join(' ');
6080
+ return joinStrings(input, SPACE_JOINER, true);
6072
6081
  }
6073
6082
  /**
6074
6083
  * Creates a string that repeats the given character a number of times.
@@ -6769,6 +6778,18 @@ const filterNullAndUndefinedValues = filterFromPOJOFunction({
6769
6778
  valueFilter: exports.KeyValueTypleValueFilter.NULL
6770
6779
  }
6771
6780
  });
6781
+ /**
6782
+ * Returns a copy of the input object with all empty values filtered from it.
6783
+ *
6784
+ * @param obj
6785
+ * @returns
6786
+ */
6787
+ const filterEmptyPojoValues = filterFromPOJOFunction({
6788
+ copy: true,
6789
+ filter: {
6790
+ valueFilter: exports.KeyValueTypleValueFilter.EMPTY
6791
+ }
6792
+ });
6772
6793
  /**
6773
6794
  * Returns a copy of the input object with all falsy and empty filtered from it.
6774
6795
  *
@@ -13513,6 +13534,7 @@ exports.AssertionIssueHandler = AssertionIssueHandler;
13513
13534
  exports.BooleanStringKeyArrayUtility = BooleanStringKeyArrayUtility;
13514
13535
  exports.BooleanStringKeyArrayUtilityInstance = BooleanStringKeyArrayUtilityInstance;
13515
13536
  exports.CATCH_ALL_HANDLE_RESULT_KEY = CATCH_ALL_HANDLE_RESULT_KEY;
13537
+ exports.COMMA_JOINER = COMMA_JOINER;
13516
13538
  exports.CUT_VALUE_TO_ZERO_PRECISION = CUT_VALUE_TO_ZERO_PRECISION;
13517
13539
  exports.DASH_CHARACTER_PREFIX_INSTANCE = DASH_CHARACTER_PREFIX_INSTANCE;
13518
13540
  exports.DATE_NOW_VALUE = DATE_NOW_VALUE;
@@ -13592,6 +13614,7 @@ exports.SLASH_PATH_SEPARATOR = SLASH_PATH_SEPARATOR;
13592
13614
  exports.SORT_VALUE_EQUAL = SORT_VALUE_EQUAL;
13593
13615
  exports.SORT_VALUE_GREATER_THAN = SORT_VALUE_GREATER_THAN;
13594
13616
  exports.SORT_VALUE_LESS_THAN = SORT_VALUE_LESS_THAN;
13617
+ exports.SPACE_JOINER = SPACE_JOINER;
13595
13618
  exports.SPLIT_STRING_TREE_NODE_ROOT_VALUE = SPLIT_STRING_TREE_NODE_ROOT_VALUE;
13596
13619
  exports.ServerErrorResponse = ServerErrorResponse;
13597
13620
  exports.SimpleStorageObject = SimpleStorageObject;
@@ -13783,6 +13806,7 @@ exports.exponentialPromiseRateLimiter = exponentialPromiseRateLimiter;
13783
13806
  exports.extendLatLngBound = extendLatLngBound;
13784
13807
  exports.filterAndMapFunction = filterAndMapFunction;
13785
13808
  exports.filterEmptyArrayValues = filterEmptyArrayValues;
13809
+ exports.filterEmptyPojoValues = filterEmptyPojoValues;
13786
13810
  exports.filterEmptyValues = filterEmptyValues;
13787
13811
  exports.filterFalsyAndEmptyValues = filterFalsyAndEmptyValues;
13788
13812
  exports.filterFromIterable = filterFromIterable;
@@ -13998,6 +14022,8 @@ exports.iterablesAreSetEquivalent = iterablesAreSetEquivalent;
13998
14022
  exports.iterate = iterate;
13999
14023
  exports.iterateFilteredPages = iterateFilteredPages;
14000
14024
  exports.joinHostAndPort = joinHostAndPort;
14025
+ exports.joinStrings = joinStrings;
14026
+ exports.joinStringsWithCommas = joinStringsWithCommas;
14001
14027
  exports.joinStringsWithSpaces = joinStringsWithSpaces;
14002
14028
  exports.keepCharactersAfterFirstCharacterOccurence = keepCharactersAfterFirstCharacterOccurence;
14003
14029
  exports.keepCharactersAfterFirstCharacterOccurenceFunction = keepCharactersAfterFirstCharacterOccurenceFunction;
package/index.esm.js CHANGED
@@ -5988,11 +5988,25 @@ function findIndexOfFirstDuplicateValue(values) {
5988
5988
  });
5989
5989
  }
5990
5990
 
5991
+ const COMMA_JOINER = ',';
5991
5992
  function caseInsensitiveString(input) {
5992
5993
  return input?.toLocaleLowerCase();
5993
5994
  }
5995
+ function joinStrings(input, joiner = COMMA_JOINER, trim = false) {
5996
+ if (input == null) {
5997
+ return input;
5998
+ }
5999
+ let array = asArray(input);
6000
+ if (trim) {
6001
+ array = array.map(x => x?.trim());
6002
+ }
6003
+ return array.filter(Boolean).join(joiner);
6004
+ }
6005
+ function joinStringsWithCommas(input, trim = false) {
6006
+ return joinStrings(input, COMMA_JOINER, trim);
6007
+ }
5994
6008
  function splitCommaSeparatedString(input, mapFn = x => x) {
5995
- const splits = input.split(',');
6009
+ const splits = input.split(COMMA_JOINER);
5996
6010
  return splits.map(x => mapFn(x.trim()));
5997
6011
  }
5998
6012
  function splitCommaSeparatedStringToSet(input) {
@@ -6050,6 +6064,7 @@ function splitJoinRemainder(input, separator, limit) {
6050
6064
  }
6051
6065
  return components;
6052
6066
  }
6067
+ const SPACE_JOINER = ' ';
6053
6068
  /**
6054
6069
  * Splits the input string like it is a name with a space separating the first and last name string.
6055
6070
  *
@@ -6057,16 +6072,10 @@ function splitJoinRemainder(input, separator, limit) {
6057
6072
  * @returns
6058
6073
  */
6059
6074
  function splitJoinNameString(input) {
6060
- return splitJoinRemainder(input, ' ', 2);
6075
+ return splitJoinRemainder(input, SPACE_JOINER, 2);
6061
6076
  }
6062
- /**
6063
- * Joins one or more strings together with spaces. Extra spaces are trimmed from the values.
6064
- *
6065
- * @param input
6066
- * @returns
6067
- */
6068
6077
  function joinStringsWithSpaces(input) {
6069
- return input.map(x => x?.trim()).filter(x => Boolean(x)).join(' ');
6078
+ return joinStrings(input, SPACE_JOINER, true);
6070
6079
  }
6071
6080
  /**
6072
6081
  * Creates a string that repeats the given character a number of times.
@@ -6767,6 +6776,18 @@ const filterNullAndUndefinedValues = filterFromPOJOFunction({
6767
6776
  valueFilter: KeyValueTypleValueFilter.NULL
6768
6777
  }
6769
6778
  });
6779
+ /**
6780
+ * Returns a copy of the input object with all empty values filtered from it.
6781
+ *
6782
+ * @param obj
6783
+ * @returns
6784
+ */
6785
+ const filterEmptyPojoValues = filterFromPOJOFunction({
6786
+ copy: true,
6787
+ filter: {
6788
+ valueFilter: KeyValueTypleValueFilter.EMPTY
6789
+ }
6790
+ });
6770
6791
  /**
6771
6792
  * Returns a copy of the input object with all falsy and empty filtered from it.
6772
6793
  *
@@ -13491,4 +13512,4 @@ async function iterateFilteredPages(inputPage, loadFn, iterFn) {
13491
13512
  return count;
13492
13513
  }
13493
13514
 
13494
- export { ALL_DOUBLE_SLASHES_REGEX, ALL_SLASHES_REGEX, ALL_SLASH_PATH_FILE_TYPE_SEPARATORS_REGEX, ASSERTION_ERROR_CODE, ASSERTION_HANDLER, AUTH_ADMIN_ROLE, AUTH_ONBOARDED_ROLE, AUTH_ROLE_CLAIMS_DEFAULT_CLAIM_VALUE, AUTH_ROLE_CLAIMS_DEFAULT_EMPTY_VALUE, AUTH_TOS_SIGNED_ROLE, AUTH_USER_ROLE, AbstractUniqueModel, Assert, AssertMax, AssertMin, AssertionError, AssertionIssueHandler, BooleanStringKeyArrayUtility, BooleanStringKeyArrayUtilityInstance, CATCH_ALL_HANDLE_RESULT_KEY, CUT_VALUE_TO_ZERO_PRECISION, DASH_CHARACTER_PREFIX_INSTANCE, DATE_NOW_VALUE, DEFAULT_CUT_STRING_END_TEXT, DEFAULT_LAT_LNG_STRING_VALUE, DEFAULT_RANDOM_EMAIL_FACTORY_CONFIG, DEFAULT_RANDOM_PHONE_NUMBER_FACTORY_CONFIG, DEFAULT_READABLE_ERROR_CODE, DEFAULT_SLASH_PATH_ILLEGAL_CHARACTERS, DEFAULT_SLASH_PATH_ILLEGAL_CHARACTER_REPLACEMENT, DEFAULT_UNKNOWN_MODEL_TYPE_STRING, DOLLAR_AMOUNT_PRECISION, DOLLAR_AMOUNT_STRING_REGEX, DataDoesNotExistError, DataIsExpiredError, Day, DestroyFunctionObject, E164PHONE_NUMBER_REGEX, E164PHONE_NUMBER_WITH_EXTENSION_REGEX, E164PHONE_NUMBER_WITH_OPTIONAL_EXTENSION_REGEX, FINAL_PAGE, FIRST_PAGE, FRACTIONAL_HOURS_PRECISION_FUNCTION, FullStorageObject, HAS_PORT_NUMBER_REGEX, HAS_WEBSITE_DOMAIN_NAME_REGEX, HOURS_IN_DAY, HTTP_OR_HTTPS_REGEX, HashSet, ISO8601_DAY_STRING_REGEX, ISO8601_DAY_STRING_START_REGEX, ISO_8601_DATE_STRING_REGEX, KeyValueTypleValueFilter, LAT_LNG_PATTERN, LAT_LNG_PATTERN_MAX_PRECISION, LAT_LONG_100KM_PRECISION, LAT_LONG_100M_PRECISION, LAT_LONG_10CM_PRECISION, LAT_LONG_10KM_PRECISION, LAT_LONG_10M_PRECISION, LAT_LONG_1CM_PRECISION, LAT_LONG_1KM_PRECISION, LAT_LONG_1MM_PRECISION, LAT_LONG_1M_PRECISION, LAT_LONG_GRAINS_OF_SAND_PRECISION, LEADING_SLASHES_REGEX, MAP_IDENTITY, MAX_BITWISE_SET_SIZE, MAX_LATITUDE_VALUE, MAX_LONGITUDE_VALUE, MINUTES_IN_DAY, MINUTES_IN_HOUR, MINUTE_OF_DAY_MAXMIMUM, MINUTE_OF_DAY_MINIUMUM, MIN_LATITUDE_VALUE, MIN_LONGITUDE_VALUE, MONTH_DAY_SLASH_DATE_STRING_REGEX, MS_IN_DAY, MS_IN_HOUR, MS_IN_MINUTE, MS_IN_SECOND, MemoryStorageInstance, ModelRelationUtility, NOOP_MODIFIER, NUMBER_STRING_DENCODER_64, NUMBER_STRING_DENCODER_64_DEFAULT_NEGATIVE_PREFIX, NUMBER_STRING_DENCODER_64_DIGITS, PHONE_EXTENSION_NUMBER_REGEX, PRIMATIVE_KEY_DENCODER_VALUE, PageCalculator, PropertyDescriptorUtility, REGEX_SPECIAL_CHARACTERS, REGEX_SPECIAL_CHARACTERS_SET, RelationChange, SECONDS_IN_MINUTE, SHARED_MEMORY_STORAGE, SLASH_PATH_FILE_TYPE_SEPARATOR, SLASH_PATH_SEPARATOR, SORT_VALUE_EQUAL, SORT_VALUE_GREATER_THAN, SORT_VALUE_LESS_THAN, SPLIT_STRING_TREE_NODE_ROOT_VALUE, ServerErrorResponse, SetDeltaChange, SimpleStorageObject, StorageObject, StorageObjectUtility, StoredDataError, SyncState, TOTAL_LATITUDE_RANGE, TOTAL_LONGITUDE_RANGE, TOTAL_SPAN_OF_LONGITUDE, TRAILING_FILE_TYPE_SEPARATORS_REGEX, TRAILING_SLASHES_REGEX, TimeAM, TimerCancelledError, TypedServiceRegistryInstance, UNLOADED_PAGE, UNSET_INDEX_NUMBER, US_STATE_CODE_STRING_REGEX, UTC_DATE_STRING_REGEX, UTC_TIMEZONE_STRING, UTF_8_START_CHARACTER, UTF_PRIVATE_USAGE_AREA_START, UnauthorizedServerErrorResponse, WEBSITE_TLD_DETECTION_REGEX, WEB_PROTOCOL_PREFIX_REGEX, ZIP_CODE_STRING_REGEX, addHttpToUrl, addLatLngPoints, addMilliseconds, addModifiers, addPlusPrefixToNumber, addPrefix, addPrefixFunction, addSuffix, addSuffixFunction, addToSet, addToSetCopy, addToSplitStringTree, allFalsyOrEmptyKeys, allIndexesInIndexRange, allKeyValueTuples, allMaybeSoKeys, allNonUndefinedKeys, allObjectsAreEqual, allValuesAreMaybeNot, allValuesAreNotMaybe, allowValueOnceFilter, applyBestFit, applySplitStringTreeWithMultipleValues, applyToMultipleFields, approximateTimerEndDate, areEqualContext, areEqualPOJOValues, areEqualPOJOValuesUsingPojoFilter, arrayContainsDuplicateValue, arrayContentsDiffer, arrayDecision, arrayDecisionFunction, arrayFactory, arrayInputFactory, arrayToLowercase, arrayToMap, arrayToObject, arrayToUppercase, asArray, asDecisionFunction, asGetter, asIndexRangeCheckFunctionConfig, asIterable, asMinuteOfDay, asNumber, asObjectCopyFactory, asPromise, asSet, assignValuesToPOJO, assignValuesToPOJOFunction, authClaims, authRoleClaimsService, authRolesSetHasRoles, baseWebsiteUrl, batch, batchCalc, bitwiseObjectDencoder, bitwiseObjectEncoder, bitwiseObjectdecoder, bitwiseSetDecoder, bitwiseSetDencoder, booleanFactory, booleanKeyArrayUtility, boundNumber, boundNumberFunction, boundToRectangle, build, cachedGetter, calculateExpirationDate, capLatValue, capitalizeFirstLetter, caseInsensitiveFilterByIndexOfDecisionFactory, caseInsensitiveString, catchAllHandlerKey, chainMapFunction, chainMapSameFunctions, characterPrefixSuffixInstance, checkAnyHaveExpired, checkAtleastOneNotExpired, coerceToEmailParticipants, combineMaps, compareEqualityWithValueFromItemsFunction, compareEqualityWithValueFromItemsFunctionFactory, compareFnOrder, compareWithMappedValuesFunction, computeNextFractionalHour, computeNextFreeIndexFunction, computeNextFreeIndexOnSortedValuesFunction, concatArrays, concatArraysUnique, containsAllStringsAnyCase, containsAllValues, containsAnyStringAnyCase, containsAnyValue, containsAnyValueFromSet, containsNoValueFromSet, containsNoneOfValue, containsStringAnyCase, convertEmailParticipantStringToParticipant, convertMaybeToArray, convertParticipantToEmailParticipantString, convertToArray, copyArray, copyField, copyLatLngBound, copyLatLngPoint, copyObject, copySetAndDo, countAllInNestedArray, countPOJOKeys, countPOJOKeysFunction, cronExpressionRepeatingEveryNMinutes, cssClassesSet, cutString, cutStringFunction, cutToPrecision, cutValueToInteger, cutValueToPrecision, cutValueToPrecisionFunction, dateFromDateOrTimeNumber, dateFromLogicalDate, dateFromMinuteOfDay, dateOrMillisecondsToDate, dateToHoursAndMinutes, dateToMinuteOfDay, dayOfWeek, daysOfWeekArray, daysOfWeekFromEnabledDays, daysOfWeekNameFunction, daysOfWeekNameMap, decisionFunction, decodeHashedValues, decodeHashedValuesWithDecodeMap, decodeModelKeyTypePair, defaultFilterFromPOJOFunctionNoCopy, defaultForwardFunctionFactory, defaultLatLngPoint, defaultLatLngString, dencodeBitwiseSet, diffLatLngBoundPoints, diffLatLngPoints, dollarAmountString, dollarAmountStringWithUnitFunction, e164PhoneNumberExtensionPair, e164PhoneNumberFromE164PhoneNumberExtensionPair, enabledDaysFromDaysOfWeek, encodeBitwiseSet, encodeModelKeyTypePair, errorMessageContainsString, errorMessageContainsStringFunction, escapeStringCharactersFunction, escapeStringForRegex, excludeValues, excludeValuesFromArray, excludeValuesFromSet, existsInIterable, expandArrayMapTuples, expandArrayValueTuples, expandFlattenTreeFunction, expandIndexSet, expandTreeFunction, expandTrees, expirationDetails, exponentialPromiseRateLimiter, extendLatLngBound, filterAndMapFunction, filterEmptyArrayValues, filterEmptyValues, filterFalsyAndEmptyValues, filterFromIterable, filterFromPOJO, filterFromPOJOFunction, filterKeyValueTupleFunction, filterKeyValueTuples, filterKeyValueTuplesFunction, filterKeyValueTuplesInputToFilter, filterKeysOnPOJOFunction, filterMaybeArrayFunction, filterMaybeArrayValues, filterMaybeValues, filterNullAndUndefinedValues, filterOnlyUndefinedValues, filterTuplesOnPOJOFunction, filterUndefinedValues, filterUniqueByIndex, filterUniqueCaseInsensitiveStrings, filterUniqueFunction, filterUniqueTransform, filterUniqueValues, filterValuesByDistance, filterValuesByDistanceNoOrder, filterValuesToSet, filterValuesUsingSet, filteredPage, findAllCharacterOccurences, findAllCharacterOccurencesFunction, findBest, findBestIndexMatch, findBestIndexMatchFunction, findBestIndexSetPair, findBestSplitStringTreeChildMatch, findBestSplitStringTreeChildMatchPath, findBestSplitStringTreeMatch, findBestSplitStringTreeMatchPath, findFirstCharacterOccurence, findInIterable, findIndexOfFirstDuplicateValue, findItemsByIndex, findNext, findPOJOKeys, findPOJOKeysFunction, findStringsRegexString, findToIndexSet, findValuesFrom, firstAndLastCharacterOccurrence, firstAndLastValue, firstValue, firstValueFromIterable, fitToIndexRangeFunction, fixExtraQueryParameters, fixMultiSlashesInSlashPath, flattenArray, flattenArrayOrValueArray, flattenArrayToSet, flattenArrayUnique, flattenArrayUniqueCaseInsensitiveStrings, flattenTree, flattenTreeToArray, flattenTreeToArrayFunction, flattenTrees, forEachInIterable, forEachKeyValue, forEachKeyValueOnPOJOFunction, forEachWithArray, forwardFunction, fractionalHoursToMinutes, generateIfDoesNotExist, getArrayNextIndex, getBaseLog, getDayOffset, getDayTomorrow, getDayYesterday, getDaysOfWeekNames, getFunctionType, getNextDay, getNextPageNumber, getOverlappingRectangle, getPageNumber, getPreviousDay, getValueFromGetter, groupValues, handlerBindAccessor, handlerConfigurerFactory, handlerFactory, handlerMappedSetFunction, handlerMappedSetFunctionFactory, handlerSetFunction, hasDifferentStringsNoCase, hasDifferentValues, hasHttpPrefix, hasNonNullValue, hasPortNumber, hasSameTimezone, hasSameValues, hasValueFunction, hasValueOrNotEmpty, hasValueOrNotEmptyObject, hasWebsiteDomain, hasWebsiteTopLevelDomain, hashSetForIndexed, hourToFractionalHour, hoursAndMinutesToString, idBatchFactory, incrementingNumberFactory, indexDeltaGroup, indexDeltaGroupFunction, indexRange, indexRangeCheckFunction, indexRangeCheckReaderFunction, indexRangeForArray, indexRangeOverlapsIndexRange, indexRangeOverlapsIndexRangeFunction, indexRangeReaderPairFactory, indexRefMap, indexedValuesArrayAccessorFactory, insertIntoBooleanKeyArray, invertBooleanReturnFunction, invertDecision, invertFilter, invertMaybeBoolean, isAllowed, isClassLikeType, isCompleteUnitedStatesAddress, isConsideredUtcTimezoneString, isDate, isDefaultLatLngPoint, isDefaultLatLngPointValue, isDefaultReadableError, isDefinedAndNotFalse, isDollarAmountString, isE164PhoneNumber, isE164PhoneNumberWithExtension, isEmptyIterable, isEqualContext, isEqualDate, isEqualToValueDecisionFunction, isEvenNumber, isFalseBooleanKeyArray, isFinalPage, isGetter, isISO8601DateString, isISO8601DayString, isISO8601DayStringStart, isInAllowedDaysOfWeekSet, isInNumberBoundFunction, isInSetDecisionFunction, isIndexNumberInIndexRange, isIndexNumberInIndexRangeFunction, isIndexRangeInIndexRange, isIndexRangeInIndexRangeFunction, isIterable, isKnownHttpWebsiteProtocol, isLatLngBound, isLatLngBoundWithinLatLngBound, isLatLngPoint, isLatLngPointWithinLatLngBound, isLatLngString, isLogicalDateStringCode, isMapIdentityFunction, isMaybeNot, isMaybeNotOrTrue, isMaybeSo, isMinuteOfDay, isModelKey, isMonthDaySlashDate, isNonClassFunction, isNotFalse, isNotNullOrEmptyString, isNumberDivisibleBy, isObjectWithConstructor, isOddNumber, isPast, isPromise, isPromiseLike, isSameLatLngBound, isSameLatLngPoint, isSameNonNullValue, isSameVector, isSelectedDecisionFunctionFactory, isSelectedIndexDecisionFunction, isServerError, isSlashPathFile, isSlashPathFolder, isSlashPathTypedFile, isStandardInternetAccessibleWebsiteUrl, isStringOrTrue, isThrottled, isTrueBooleanKeyArray, isUTCDateString, isUnderThreshold, isUniqueKeyedFunction, isUsStateCodeString, isValidLatLngPoint, isValidLatitude, isValidLongitude, isValidNumberBound, isValidPhoneExtensionNumber, isValidSlashPath, isWebsiteUrl, isWebsiteUrlWithPrefix, isWithinLatLngBoundFunction, isolateSlashPath, isolateSlashPathFunction, isolateWebsitePathFunction, itemCountForBatchIndex, iterableToArray, iterableToMap, iterableToSet, iterablesAreSetEquivalent, iterate, iterateFilteredPages, joinHostAndPort, joinStringsWithSpaces, keepCharactersAfterFirstCharacterOccurence, keepCharactersAfterFirstCharacterOccurenceFunction, keepFromSetCopy, keepValuesFromArray, keepValuesFromSet, keyValueMapFactory, labeledValueMap, lastValue, latLngBound, latLngBoundCenterPoint, latLngBoundEastBound, latLngBoundFromInput, latLngBoundFullyWrapsMap, latLngBoundFunction, latLngBoundNorthBound, latLngBoundNorthEastPoint, latLngBoundNorthWestPoint, latLngBoundOverlapsLatLngBound, latLngBoundSouthBound, latLngBoundSouthEastPoint, latLngBoundSouthWestPoint, latLngBoundStrictlyWrapsMap, latLngBoundTuple, latLngBoundTupleFunction, latLngBoundWestBound, latLngBoundWrapsMap, latLngDataPointFunction, latLngPoint, latLngPointFromString, latLngPointFunction, latLngPointPrecisionFunction, latLngString, latLngStringFunction, latLngTuple, latLngTupleFunction, limitArray, lonLatTuple, lowercaseFirstLetter, mailToUrlString, makeBestFit, makeCopyModelFieldFunction, makeDateMonthForMonthOfYear, makeDefaultNonConcurrentTaskKeyFactory, makeGetter, makeHandler, makeHashDecodeMap, makeKeyPairs, makeModelConversionFieldValuesFunction, makeModelMap, makeModelMapFunctions, makeMultiModelKeyMap, makeTimer, makeValuesGroupMap, makeWithFactory, makeWithFactoryInput, mapArrayFunction, mapFunctionOutput, mapFunctionOutputPair, mapGetter, mapGetterFactory, mapIdentityFunction, mapIterable, mapKeysIntersectionObjectToArray, mapMaybeFunction, mapObjectKeysFunction, mapObjectKeysToLowercase, mapObjectMap, mapObjectMapFunction, mapObjectToTargetObject, mapPromiseOrValue, mapToObject, mapToTuples, mapValuesToSet, mappedUseAsyncFunction, mappedUseFunction, mapsHaveSameKeys, maybeMergeModelModifiers, maybeMergeModifiers, maybeModifierMapToFunction, maybeSet, mergeArrays, mergeArraysIntoArray, mergeFilterFunctions, mergeModifiers, mergeObjects, mergeObjectsFunction, mergeSlashPaths, messageFromError, minAndMaxFunction, minAndMaxIndex, minAndMaxIndexFunction, minAndMaxIndexItemsFunction, minAndMaxNumber, minutesToFractionalHours, minutesToHoursAndMinutes, modelFieldConversions, modelFieldMapFunction, modelFieldMapFunctions, modelTypeDataPairFactory, modifier, modifierMapToFunction, modifyModelMapFunction, modifyModelMapFunctions, monthDaySlashDateToDateString, monthOfYearFromDate, monthOfYearFromDateMonth, monthOfYearFromUTCDate, multiKeyValueMapFactory, multiValueMapBuilder, neMostLatLngPoint, nearestDivisibleValues, numberStringDencoder, numberStringDencoderDecodedNumberValueFunction, numberStringDencoderEncodedStringValueFunction, numberStringDencoderFunction, objectCopyFactory, objectDeltaArrayCompressor, objectFieldEqualityChecker, objectFlatMergeMatrix, objectHasKey, objectHasKeys, objectHasNoKeys, objectIsEmpty, objectKeyEqualityComparatorFunction, objectKeysEqualityComparatorFunction, objectMergeMatrix, objectToMap, objectToTuples, overlapsLatLngBoundFunction, overrideInObject, overrideInObjectFunctionFactory, padStartFunction, pairGroupValues, parseISO8601DayStringToUTCDate, partialServerError, passThrough, percentNumberFromDecimal, percentNumberToDecimal, performAsyncTask, performAsyncTasks, performBatchLoop, performMakeLoop, performTaskCountLoop, performTaskLoop, performTasksFromFactoryInParallelFunction, performTasksInParallel, performTasksInParallelFunction, pickOneRandomly, poll, primativeKeyDencoder, primativeKeyDencoderMap, primativeKeyStringDencoder, primativeValuesDelta, promiseReference, protectedFactory, pushArrayItemsIntoArray, pushElementOntoArray, pushItemOrArrayItemsIntoArray, randomArrayFactory, randomArrayIndex, randomBoolean, randomEmailFactory, randomFromArrayFactory, randomLatLngFactory, randomLatLngFromCenterFactory, randomNumber, randomNumberFactory, randomPhoneNumberFactory, randomPickFactory, range, rangedIndexedValuesArrayAccessorFactory, rangedIndexedValuesArrayAccessorInfoFactory, readBooleanKeySafetyWrap, readDomainFromEmailAddress, readDomainsFromEmailAddresses, readEmailDomainFromUrlOrEmailAddress, readIndexNumber, readKeysFrom, readKeysFromFilterUniqueFunctionAdditionalKeys, readKeysFromFilterUniqueFunctionAdditionalKeysInput, readKeysFunction, readKeysSetFrom, readKeysSetFunction, readKeysToMap, readModelKey, readModelKeyFromObject, readModelKeys, readModelKeysFromObjects, readMultipleKeysToMap, readPortNumber, readUniqueModelKey, readWebsiteProtocol, readableError, readableStreamToBase64, readableStreamToBuffer, readableStreamToStringFunction, rectangleOverlapsRectangle, reduceBooleansFn, reduceBooleansWithAnd, reduceBooleansWithAndFn, reduceBooleansWithOr, reduceBooleansWithOrFn, reduceNumbers, reduceNumbersFn, reduceNumbersWithAdd, reduceNumbersWithAddFn, reduceNumbersWithMax, reduceNumbersWithMaxFn, reduceNumbersWithMin, reduceNumbersWithMinFn, removeByKeyFromBooleanKeyArray, removeCharactersAfterFirstCharacterOccurence, removeCharactersAfterFirstCharacterOccurenceFunction, removeExtensionFromPhoneNumber, removeFromBooleanKeyArray, removeFromSet, removeFromSetCopy, removeHttpFromUrl, removeModelsWithKey, removeModelsWithSameKey, removeModifiers, removeTrailingFileTypeSeparators, removeTrailingSlashes, removeValuesAtIndexesFromArrayCopy, removeWebProtocolPrefix, repeatString, replaceCharacterAtIndexIf, replaceCharacterAtIndexWith, replaceInvalidFilePathTypeSeparatorsInSlashPath, replaceInvalidFilePathTypeSeparatorsInSlashPathFunction, replaceLastCharacterIf, replaceLastCharacterIfIsFunction, replaceMultipleFilePathsInSlashPath, replaceStringsFunction, requireModelKey, resetPeriodPromiseRateLimiter, restoreOrder, restoreOrderWithValues, reverseCompareFn, roundNumberToStepFunction, roundNumberUpToStep, roundToPrecision, roundToPrecisionFunction, roundingFunction, runAsyncTaskForValue, runAsyncTasksForValues, safeCompareEquality, safeEqualityComparatorFunction, safeFindBestIndexMatch, searchStringFilterFunction, separateValues, separateValuesToSets, sequentialIncrementingNumberStringModelIdFactory, serverError, setContainsAllValues, setContainsAnyValue, setContainsNoneOfValue, setDeltaChangeKeys, setDeltaFunction, setHasValueFunction, setIncludes, setIncludesFunction, setKeysOnMap, setWebProtocolPrefix, setsAreEquivalent, simpleSortValuesFunctionWithSortRef, slashPathFactory, slashPathInvalidError, slashPathName, slashPathParts, slashPathStartTypeFactory, slashPathType, slashPathValidationFactory, sliceIndexRangeFunction, sortAscendingIndexNumberRefFunction, sortByIndexAscendingCompareFunction, sortByIndexRangeAscendingCompareFunction, sortByLabelFunction, sortByNumberFunction, sortByStringFunction, sortCompareNumberFunction, sortNumbersAscendingFunction, sortValues, sortValuesFunctionOrMapIdentityWithSortRef, sortValuesFunctionWithSortRef, spaceSeparatedCssClasses, splitCommaSeparatedString, splitCommaSeparatedStringToSet, splitJoinNameString, splitJoinRemainder, splitStringAtFirstCharacterOccurence, splitStringAtFirstCharacterOccurenceFunction, splitStringAtIndex, splitStringTreeFactory, startOfDayForSystemDateInUTC, startOfDayForUTCDateInUTC, stepsFromIndex, stepsFromIndexFunction, stringCharactersToIndexRecord, stringContains, stringFactoryFromFactory, stringToLowercaseFunction, stringToUppercaseFunction, stringTrimFunction, sumOfIntegersBetween, swMostLatLngPoint, symmetricDifferenceArray, symmetricDifferenceArrayBetweenSets, symmetricDifferenceWithModels, takeFront, takeLast, takeValuesFromIterable, telUrlString, telUrlStringForE164PhoneNumberPair, terminatingFactoryFromArray, throwKeyIsRequired, timePeriodCounter, timer, toAbsoluteSlashPathStartType, toCaseInsensitiveStringArray, toMinuteOfDay, toModelFieldConversions, toModelMapFunctions, toReadableError, toRelativeSlashPathStartType, toggleInSet, toggleInSetCopy, toggleTimerRunning, transformNumberFunction, transformNumberFunctionConfig, transformStringFunction, transformStringFunctionConfig, transformStrings, trimArray, tryWithPromiseFactoriesFunction, typedServiceRegistry, unique, uniqueCaseInsensitiveStrings, uniqueCaseInsensitiveStringsSet, uniqueKeys, uniqueModels, unitedStatesAddressString, unixTimeNumberForNow, unixTimeNumberFromDate, unixTimeNumberFromDateOrTimeNumber, unixTimeNumberToDate, updateMaybeValue, urlWithoutParameters, useAsync, useCallback, useContextFunction, useIterableOrValue, useModelOrKey, usePromise, useValue, validLatLngPoint, validLatLngPointFunction, valueAtIndex, valuesAreBothNullishOrEquivalent, valuesFromPOJO, valuesFromPOJOFunction, vectorMinimumSizeResizeFunction, vectorsAreEqual, waitForMs, websiteDomainAndPathPair, websiteDomainAndPathPairFromWebsiteUrl, websitePathAndQueryPair, websitePathFromWebsiteDomainAndPath, websitePathFromWebsiteUrl, websiteUrlFromPaths, wrapIndexRangeFunction, wrapLatLngPoint, wrapLngValue, wrapMapFunctionOutput, wrapNumberFunction, wrapTuples, wrapUseAsyncFunction, wrapUseFunction };
13515
+ export { ALL_DOUBLE_SLASHES_REGEX, ALL_SLASHES_REGEX, ALL_SLASH_PATH_FILE_TYPE_SEPARATORS_REGEX, ASSERTION_ERROR_CODE, ASSERTION_HANDLER, AUTH_ADMIN_ROLE, AUTH_ONBOARDED_ROLE, AUTH_ROLE_CLAIMS_DEFAULT_CLAIM_VALUE, AUTH_ROLE_CLAIMS_DEFAULT_EMPTY_VALUE, AUTH_TOS_SIGNED_ROLE, AUTH_USER_ROLE, AbstractUniqueModel, Assert, AssertMax, AssertMin, AssertionError, AssertionIssueHandler, BooleanStringKeyArrayUtility, BooleanStringKeyArrayUtilityInstance, CATCH_ALL_HANDLE_RESULT_KEY, COMMA_JOINER, CUT_VALUE_TO_ZERO_PRECISION, DASH_CHARACTER_PREFIX_INSTANCE, DATE_NOW_VALUE, DEFAULT_CUT_STRING_END_TEXT, DEFAULT_LAT_LNG_STRING_VALUE, DEFAULT_RANDOM_EMAIL_FACTORY_CONFIG, DEFAULT_RANDOM_PHONE_NUMBER_FACTORY_CONFIG, DEFAULT_READABLE_ERROR_CODE, DEFAULT_SLASH_PATH_ILLEGAL_CHARACTERS, DEFAULT_SLASH_PATH_ILLEGAL_CHARACTER_REPLACEMENT, DEFAULT_UNKNOWN_MODEL_TYPE_STRING, DOLLAR_AMOUNT_PRECISION, DOLLAR_AMOUNT_STRING_REGEX, DataDoesNotExistError, DataIsExpiredError, Day, DestroyFunctionObject, E164PHONE_NUMBER_REGEX, E164PHONE_NUMBER_WITH_EXTENSION_REGEX, E164PHONE_NUMBER_WITH_OPTIONAL_EXTENSION_REGEX, FINAL_PAGE, FIRST_PAGE, FRACTIONAL_HOURS_PRECISION_FUNCTION, FullStorageObject, HAS_PORT_NUMBER_REGEX, HAS_WEBSITE_DOMAIN_NAME_REGEX, HOURS_IN_DAY, HTTP_OR_HTTPS_REGEX, HashSet, ISO8601_DAY_STRING_REGEX, ISO8601_DAY_STRING_START_REGEX, ISO_8601_DATE_STRING_REGEX, KeyValueTypleValueFilter, LAT_LNG_PATTERN, LAT_LNG_PATTERN_MAX_PRECISION, LAT_LONG_100KM_PRECISION, LAT_LONG_100M_PRECISION, LAT_LONG_10CM_PRECISION, LAT_LONG_10KM_PRECISION, LAT_LONG_10M_PRECISION, LAT_LONG_1CM_PRECISION, LAT_LONG_1KM_PRECISION, LAT_LONG_1MM_PRECISION, LAT_LONG_1M_PRECISION, LAT_LONG_GRAINS_OF_SAND_PRECISION, LEADING_SLASHES_REGEX, MAP_IDENTITY, MAX_BITWISE_SET_SIZE, MAX_LATITUDE_VALUE, MAX_LONGITUDE_VALUE, MINUTES_IN_DAY, MINUTES_IN_HOUR, MINUTE_OF_DAY_MAXMIMUM, MINUTE_OF_DAY_MINIUMUM, MIN_LATITUDE_VALUE, MIN_LONGITUDE_VALUE, MONTH_DAY_SLASH_DATE_STRING_REGEX, MS_IN_DAY, MS_IN_HOUR, MS_IN_MINUTE, MS_IN_SECOND, MemoryStorageInstance, ModelRelationUtility, NOOP_MODIFIER, NUMBER_STRING_DENCODER_64, NUMBER_STRING_DENCODER_64_DEFAULT_NEGATIVE_PREFIX, NUMBER_STRING_DENCODER_64_DIGITS, PHONE_EXTENSION_NUMBER_REGEX, PRIMATIVE_KEY_DENCODER_VALUE, PageCalculator, PropertyDescriptorUtility, REGEX_SPECIAL_CHARACTERS, REGEX_SPECIAL_CHARACTERS_SET, RelationChange, SECONDS_IN_MINUTE, SHARED_MEMORY_STORAGE, SLASH_PATH_FILE_TYPE_SEPARATOR, SLASH_PATH_SEPARATOR, SORT_VALUE_EQUAL, SORT_VALUE_GREATER_THAN, SORT_VALUE_LESS_THAN, SPACE_JOINER, SPLIT_STRING_TREE_NODE_ROOT_VALUE, ServerErrorResponse, SetDeltaChange, SimpleStorageObject, StorageObject, StorageObjectUtility, StoredDataError, SyncState, TOTAL_LATITUDE_RANGE, TOTAL_LONGITUDE_RANGE, TOTAL_SPAN_OF_LONGITUDE, TRAILING_FILE_TYPE_SEPARATORS_REGEX, TRAILING_SLASHES_REGEX, TimeAM, TimerCancelledError, TypedServiceRegistryInstance, UNLOADED_PAGE, UNSET_INDEX_NUMBER, US_STATE_CODE_STRING_REGEX, UTC_DATE_STRING_REGEX, UTC_TIMEZONE_STRING, UTF_8_START_CHARACTER, UTF_PRIVATE_USAGE_AREA_START, UnauthorizedServerErrorResponse, WEBSITE_TLD_DETECTION_REGEX, WEB_PROTOCOL_PREFIX_REGEX, ZIP_CODE_STRING_REGEX, addHttpToUrl, addLatLngPoints, addMilliseconds, addModifiers, addPlusPrefixToNumber, addPrefix, addPrefixFunction, addSuffix, addSuffixFunction, addToSet, addToSetCopy, addToSplitStringTree, allFalsyOrEmptyKeys, allIndexesInIndexRange, allKeyValueTuples, allMaybeSoKeys, allNonUndefinedKeys, allObjectsAreEqual, allValuesAreMaybeNot, allValuesAreNotMaybe, allowValueOnceFilter, applyBestFit, applySplitStringTreeWithMultipleValues, applyToMultipleFields, approximateTimerEndDate, areEqualContext, areEqualPOJOValues, areEqualPOJOValuesUsingPojoFilter, arrayContainsDuplicateValue, arrayContentsDiffer, arrayDecision, arrayDecisionFunction, arrayFactory, arrayInputFactory, arrayToLowercase, arrayToMap, arrayToObject, arrayToUppercase, asArray, asDecisionFunction, asGetter, asIndexRangeCheckFunctionConfig, asIterable, asMinuteOfDay, asNumber, asObjectCopyFactory, asPromise, asSet, assignValuesToPOJO, assignValuesToPOJOFunction, authClaims, authRoleClaimsService, authRolesSetHasRoles, baseWebsiteUrl, batch, batchCalc, bitwiseObjectDencoder, bitwiseObjectEncoder, bitwiseObjectdecoder, bitwiseSetDecoder, bitwiseSetDencoder, booleanFactory, booleanKeyArrayUtility, boundNumber, boundNumberFunction, boundToRectangle, build, cachedGetter, calculateExpirationDate, capLatValue, capitalizeFirstLetter, caseInsensitiveFilterByIndexOfDecisionFactory, caseInsensitiveString, catchAllHandlerKey, chainMapFunction, chainMapSameFunctions, characterPrefixSuffixInstance, checkAnyHaveExpired, checkAtleastOneNotExpired, coerceToEmailParticipants, combineMaps, compareEqualityWithValueFromItemsFunction, compareEqualityWithValueFromItemsFunctionFactory, compareFnOrder, compareWithMappedValuesFunction, computeNextFractionalHour, computeNextFreeIndexFunction, computeNextFreeIndexOnSortedValuesFunction, concatArrays, concatArraysUnique, containsAllStringsAnyCase, containsAllValues, containsAnyStringAnyCase, containsAnyValue, containsAnyValueFromSet, containsNoValueFromSet, containsNoneOfValue, containsStringAnyCase, convertEmailParticipantStringToParticipant, convertMaybeToArray, convertParticipantToEmailParticipantString, convertToArray, copyArray, copyField, copyLatLngBound, copyLatLngPoint, copyObject, copySetAndDo, countAllInNestedArray, countPOJOKeys, countPOJOKeysFunction, cronExpressionRepeatingEveryNMinutes, cssClassesSet, cutString, cutStringFunction, cutToPrecision, cutValueToInteger, cutValueToPrecision, cutValueToPrecisionFunction, dateFromDateOrTimeNumber, dateFromLogicalDate, dateFromMinuteOfDay, dateOrMillisecondsToDate, dateToHoursAndMinutes, dateToMinuteOfDay, dayOfWeek, daysOfWeekArray, daysOfWeekFromEnabledDays, daysOfWeekNameFunction, daysOfWeekNameMap, decisionFunction, decodeHashedValues, decodeHashedValuesWithDecodeMap, decodeModelKeyTypePair, defaultFilterFromPOJOFunctionNoCopy, defaultForwardFunctionFactory, defaultLatLngPoint, defaultLatLngString, dencodeBitwiseSet, diffLatLngBoundPoints, diffLatLngPoints, dollarAmountString, dollarAmountStringWithUnitFunction, e164PhoneNumberExtensionPair, e164PhoneNumberFromE164PhoneNumberExtensionPair, enabledDaysFromDaysOfWeek, encodeBitwiseSet, encodeModelKeyTypePair, errorMessageContainsString, errorMessageContainsStringFunction, escapeStringCharactersFunction, escapeStringForRegex, excludeValues, excludeValuesFromArray, excludeValuesFromSet, existsInIterable, expandArrayMapTuples, expandArrayValueTuples, expandFlattenTreeFunction, expandIndexSet, expandTreeFunction, expandTrees, expirationDetails, exponentialPromiseRateLimiter, extendLatLngBound, filterAndMapFunction, filterEmptyArrayValues, filterEmptyPojoValues, filterEmptyValues, filterFalsyAndEmptyValues, filterFromIterable, filterFromPOJO, filterFromPOJOFunction, filterKeyValueTupleFunction, filterKeyValueTuples, filterKeyValueTuplesFunction, filterKeyValueTuplesInputToFilter, filterKeysOnPOJOFunction, filterMaybeArrayFunction, filterMaybeArrayValues, filterMaybeValues, filterNullAndUndefinedValues, filterOnlyUndefinedValues, filterTuplesOnPOJOFunction, filterUndefinedValues, filterUniqueByIndex, filterUniqueCaseInsensitiveStrings, filterUniqueFunction, filterUniqueTransform, filterUniqueValues, filterValuesByDistance, filterValuesByDistanceNoOrder, filterValuesToSet, filterValuesUsingSet, filteredPage, findAllCharacterOccurences, findAllCharacterOccurencesFunction, findBest, findBestIndexMatch, findBestIndexMatchFunction, findBestIndexSetPair, findBestSplitStringTreeChildMatch, findBestSplitStringTreeChildMatchPath, findBestSplitStringTreeMatch, findBestSplitStringTreeMatchPath, findFirstCharacterOccurence, findInIterable, findIndexOfFirstDuplicateValue, findItemsByIndex, findNext, findPOJOKeys, findPOJOKeysFunction, findStringsRegexString, findToIndexSet, findValuesFrom, firstAndLastCharacterOccurrence, firstAndLastValue, firstValue, firstValueFromIterable, fitToIndexRangeFunction, fixExtraQueryParameters, fixMultiSlashesInSlashPath, flattenArray, flattenArrayOrValueArray, flattenArrayToSet, flattenArrayUnique, flattenArrayUniqueCaseInsensitiveStrings, flattenTree, flattenTreeToArray, flattenTreeToArrayFunction, flattenTrees, forEachInIterable, forEachKeyValue, forEachKeyValueOnPOJOFunction, forEachWithArray, forwardFunction, fractionalHoursToMinutes, generateIfDoesNotExist, getArrayNextIndex, getBaseLog, getDayOffset, getDayTomorrow, getDayYesterday, getDaysOfWeekNames, getFunctionType, getNextDay, getNextPageNumber, getOverlappingRectangle, getPageNumber, getPreviousDay, getValueFromGetter, groupValues, handlerBindAccessor, handlerConfigurerFactory, handlerFactory, handlerMappedSetFunction, handlerMappedSetFunctionFactory, handlerSetFunction, hasDifferentStringsNoCase, hasDifferentValues, hasHttpPrefix, hasNonNullValue, hasPortNumber, hasSameTimezone, hasSameValues, hasValueFunction, hasValueOrNotEmpty, hasValueOrNotEmptyObject, hasWebsiteDomain, hasWebsiteTopLevelDomain, hashSetForIndexed, hourToFractionalHour, hoursAndMinutesToString, idBatchFactory, incrementingNumberFactory, indexDeltaGroup, indexDeltaGroupFunction, indexRange, indexRangeCheckFunction, indexRangeCheckReaderFunction, indexRangeForArray, indexRangeOverlapsIndexRange, indexRangeOverlapsIndexRangeFunction, indexRangeReaderPairFactory, indexRefMap, indexedValuesArrayAccessorFactory, insertIntoBooleanKeyArray, invertBooleanReturnFunction, invertDecision, invertFilter, invertMaybeBoolean, isAllowed, isClassLikeType, isCompleteUnitedStatesAddress, isConsideredUtcTimezoneString, isDate, isDefaultLatLngPoint, isDefaultLatLngPointValue, isDefaultReadableError, isDefinedAndNotFalse, isDollarAmountString, isE164PhoneNumber, isE164PhoneNumberWithExtension, isEmptyIterable, isEqualContext, isEqualDate, isEqualToValueDecisionFunction, isEvenNumber, isFalseBooleanKeyArray, isFinalPage, isGetter, isISO8601DateString, isISO8601DayString, isISO8601DayStringStart, isInAllowedDaysOfWeekSet, isInNumberBoundFunction, isInSetDecisionFunction, isIndexNumberInIndexRange, isIndexNumberInIndexRangeFunction, isIndexRangeInIndexRange, isIndexRangeInIndexRangeFunction, isIterable, isKnownHttpWebsiteProtocol, isLatLngBound, isLatLngBoundWithinLatLngBound, isLatLngPoint, isLatLngPointWithinLatLngBound, isLatLngString, isLogicalDateStringCode, isMapIdentityFunction, isMaybeNot, isMaybeNotOrTrue, isMaybeSo, isMinuteOfDay, isModelKey, isMonthDaySlashDate, isNonClassFunction, isNotFalse, isNotNullOrEmptyString, isNumberDivisibleBy, isObjectWithConstructor, isOddNumber, isPast, isPromise, isPromiseLike, isSameLatLngBound, isSameLatLngPoint, isSameNonNullValue, isSameVector, isSelectedDecisionFunctionFactory, isSelectedIndexDecisionFunction, isServerError, isSlashPathFile, isSlashPathFolder, isSlashPathTypedFile, isStandardInternetAccessibleWebsiteUrl, isStringOrTrue, isThrottled, isTrueBooleanKeyArray, isUTCDateString, isUnderThreshold, isUniqueKeyedFunction, isUsStateCodeString, isValidLatLngPoint, isValidLatitude, isValidLongitude, isValidNumberBound, isValidPhoneExtensionNumber, isValidSlashPath, isWebsiteUrl, isWebsiteUrlWithPrefix, isWithinLatLngBoundFunction, isolateSlashPath, isolateSlashPathFunction, isolateWebsitePathFunction, itemCountForBatchIndex, iterableToArray, iterableToMap, iterableToSet, iterablesAreSetEquivalent, iterate, iterateFilteredPages, joinHostAndPort, joinStrings, joinStringsWithCommas, joinStringsWithSpaces, keepCharactersAfterFirstCharacterOccurence, keepCharactersAfterFirstCharacterOccurenceFunction, keepFromSetCopy, keepValuesFromArray, keepValuesFromSet, keyValueMapFactory, labeledValueMap, lastValue, latLngBound, latLngBoundCenterPoint, latLngBoundEastBound, latLngBoundFromInput, latLngBoundFullyWrapsMap, latLngBoundFunction, latLngBoundNorthBound, latLngBoundNorthEastPoint, latLngBoundNorthWestPoint, latLngBoundOverlapsLatLngBound, latLngBoundSouthBound, latLngBoundSouthEastPoint, latLngBoundSouthWestPoint, latLngBoundStrictlyWrapsMap, latLngBoundTuple, latLngBoundTupleFunction, latLngBoundWestBound, latLngBoundWrapsMap, latLngDataPointFunction, latLngPoint, latLngPointFromString, latLngPointFunction, latLngPointPrecisionFunction, latLngString, latLngStringFunction, latLngTuple, latLngTupleFunction, limitArray, lonLatTuple, lowercaseFirstLetter, mailToUrlString, makeBestFit, makeCopyModelFieldFunction, makeDateMonthForMonthOfYear, makeDefaultNonConcurrentTaskKeyFactory, makeGetter, makeHandler, makeHashDecodeMap, makeKeyPairs, makeModelConversionFieldValuesFunction, makeModelMap, makeModelMapFunctions, makeMultiModelKeyMap, makeTimer, makeValuesGroupMap, makeWithFactory, makeWithFactoryInput, mapArrayFunction, mapFunctionOutput, mapFunctionOutputPair, mapGetter, mapGetterFactory, mapIdentityFunction, mapIterable, mapKeysIntersectionObjectToArray, mapMaybeFunction, mapObjectKeysFunction, mapObjectKeysToLowercase, mapObjectMap, mapObjectMapFunction, mapObjectToTargetObject, mapPromiseOrValue, mapToObject, mapToTuples, mapValuesToSet, mappedUseAsyncFunction, mappedUseFunction, mapsHaveSameKeys, maybeMergeModelModifiers, maybeMergeModifiers, maybeModifierMapToFunction, maybeSet, mergeArrays, mergeArraysIntoArray, mergeFilterFunctions, mergeModifiers, mergeObjects, mergeObjectsFunction, mergeSlashPaths, messageFromError, minAndMaxFunction, minAndMaxIndex, minAndMaxIndexFunction, minAndMaxIndexItemsFunction, minAndMaxNumber, minutesToFractionalHours, minutesToHoursAndMinutes, modelFieldConversions, modelFieldMapFunction, modelFieldMapFunctions, modelTypeDataPairFactory, modifier, modifierMapToFunction, modifyModelMapFunction, modifyModelMapFunctions, monthDaySlashDateToDateString, monthOfYearFromDate, monthOfYearFromDateMonth, monthOfYearFromUTCDate, multiKeyValueMapFactory, multiValueMapBuilder, neMostLatLngPoint, nearestDivisibleValues, numberStringDencoder, numberStringDencoderDecodedNumberValueFunction, numberStringDencoderEncodedStringValueFunction, numberStringDencoderFunction, objectCopyFactory, objectDeltaArrayCompressor, objectFieldEqualityChecker, objectFlatMergeMatrix, objectHasKey, objectHasKeys, objectHasNoKeys, objectIsEmpty, objectKeyEqualityComparatorFunction, objectKeysEqualityComparatorFunction, objectMergeMatrix, objectToMap, objectToTuples, overlapsLatLngBoundFunction, overrideInObject, overrideInObjectFunctionFactory, padStartFunction, pairGroupValues, parseISO8601DayStringToUTCDate, partialServerError, passThrough, percentNumberFromDecimal, percentNumberToDecimal, performAsyncTask, performAsyncTasks, performBatchLoop, performMakeLoop, performTaskCountLoop, performTaskLoop, performTasksFromFactoryInParallelFunction, performTasksInParallel, performTasksInParallelFunction, pickOneRandomly, poll, primativeKeyDencoder, primativeKeyDencoderMap, primativeKeyStringDencoder, primativeValuesDelta, promiseReference, protectedFactory, pushArrayItemsIntoArray, pushElementOntoArray, pushItemOrArrayItemsIntoArray, randomArrayFactory, randomArrayIndex, randomBoolean, randomEmailFactory, randomFromArrayFactory, randomLatLngFactory, randomLatLngFromCenterFactory, randomNumber, randomNumberFactory, randomPhoneNumberFactory, randomPickFactory, range, rangedIndexedValuesArrayAccessorFactory, rangedIndexedValuesArrayAccessorInfoFactory, readBooleanKeySafetyWrap, readDomainFromEmailAddress, readDomainsFromEmailAddresses, readEmailDomainFromUrlOrEmailAddress, readIndexNumber, readKeysFrom, readKeysFromFilterUniqueFunctionAdditionalKeys, readKeysFromFilterUniqueFunctionAdditionalKeysInput, readKeysFunction, readKeysSetFrom, readKeysSetFunction, readKeysToMap, readModelKey, readModelKeyFromObject, readModelKeys, readModelKeysFromObjects, readMultipleKeysToMap, readPortNumber, readUniqueModelKey, readWebsiteProtocol, readableError, readableStreamToBase64, readableStreamToBuffer, readableStreamToStringFunction, rectangleOverlapsRectangle, reduceBooleansFn, reduceBooleansWithAnd, reduceBooleansWithAndFn, reduceBooleansWithOr, reduceBooleansWithOrFn, reduceNumbers, reduceNumbersFn, reduceNumbersWithAdd, reduceNumbersWithAddFn, reduceNumbersWithMax, reduceNumbersWithMaxFn, reduceNumbersWithMin, reduceNumbersWithMinFn, removeByKeyFromBooleanKeyArray, removeCharactersAfterFirstCharacterOccurence, removeCharactersAfterFirstCharacterOccurenceFunction, removeExtensionFromPhoneNumber, removeFromBooleanKeyArray, removeFromSet, removeFromSetCopy, removeHttpFromUrl, removeModelsWithKey, removeModelsWithSameKey, removeModifiers, removeTrailingFileTypeSeparators, removeTrailingSlashes, removeValuesAtIndexesFromArrayCopy, removeWebProtocolPrefix, repeatString, replaceCharacterAtIndexIf, replaceCharacterAtIndexWith, replaceInvalidFilePathTypeSeparatorsInSlashPath, replaceInvalidFilePathTypeSeparatorsInSlashPathFunction, replaceLastCharacterIf, replaceLastCharacterIfIsFunction, replaceMultipleFilePathsInSlashPath, replaceStringsFunction, requireModelKey, resetPeriodPromiseRateLimiter, restoreOrder, restoreOrderWithValues, reverseCompareFn, roundNumberToStepFunction, roundNumberUpToStep, roundToPrecision, roundToPrecisionFunction, roundingFunction, runAsyncTaskForValue, runAsyncTasksForValues, safeCompareEquality, safeEqualityComparatorFunction, safeFindBestIndexMatch, searchStringFilterFunction, separateValues, separateValuesToSets, sequentialIncrementingNumberStringModelIdFactory, serverError, setContainsAllValues, setContainsAnyValue, setContainsNoneOfValue, setDeltaChangeKeys, setDeltaFunction, setHasValueFunction, setIncludes, setIncludesFunction, setKeysOnMap, setWebProtocolPrefix, setsAreEquivalent, simpleSortValuesFunctionWithSortRef, slashPathFactory, slashPathInvalidError, slashPathName, slashPathParts, slashPathStartTypeFactory, slashPathType, slashPathValidationFactory, sliceIndexRangeFunction, sortAscendingIndexNumberRefFunction, sortByIndexAscendingCompareFunction, sortByIndexRangeAscendingCompareFunction, sortByLabelFunction, sortByNumberFunction, sortByStringFunction, sortCompareNumberFunction, sortNumbersAscendingFunction, sortValues, sortValuesFunctionOrMapIdentityWithSortRef, sortValuesFunctionWithSortRef, spaceSeparatedCssClasses, splitCommaSeparatedString, splitCommaSeparatedStringToSet, splitJoinNameString, splitJoinRemainder, splitStringAtFirstCharacterOccurence, splitStringAtFirstCharacterOccurenceFunction, splitStringAtIndex, splitStringTreeFactory, startOfDayForSystemDateInUTC, startOfDayForUTCDateInUTC, stepsFromIndex, stepsFromIndexFunction, stringCharactersToIndexRecord, stringContains, stringFactoryFromFactory, stringToLowercaseFunction, stringToUppercaseFunction, stringTrimFunction, sumOfIntegersBetween, swMostLatLngPoint, symmetricDifferenceArray, symmetricDifferenceArrayBetweenSets, symmetricDifferenceWithModels, takeFront, takeLast, takeValuesFromIterable, telUrlString, telUrlStringForE164PhoneNumberPair, terminatingFactoryFromArray, throwKeyIsRequired, timePeriodCounter, timer, toAbsoluteSlashPathStartType, toCaseInsensitiveStringArray, toMinuteOfDay, toModelFieldConversions, toModelMapFunctions, toReadableError, toRelativeSlashPathStartType, toggleInSet, toggleInSetCopy, toggleTimerRunning, transformNumberFunction, transformNumberFunctionConfig, transformStringFunction, transformStringFunctionConfig, transformStrings, trimArray, tryWithPromiseFactoriesFunction, typedServiceRegistry, unique, uniqueCaseInsensitiveStrings, uniqueCaseInsensitiveStringsSet, uniqueKeys, uniqueModels, unitedStatesAddressString, unixTimeNumberForNow, unixTimeNumberFromDate, unixTimeNumberFromDateOrTimeNumber, unixTimeNumberToDate, updateMaybeValue, urlWithoutParameters, useAsync, useCallback, useContextFunction, useIterableOrValue, useModelOrKey, usePromise, useValue, validLatLngPoint, validLatLngPointFunction, valueAtIndex, valuesAreBothNullishOrEquivalent, valuesFromPOJO, valuesFromPOJOFunction, vectorMinimumSizeResizeFunction, vectorsAreEqual, waitForMs, websiteDomainAndPathPair, websiteDomainAndPathPairFromWebsiteUrl, websitePathAndQueryPair, websitePathFromWebsiteDomainAndPath, websitePathFromWebsiteUrl, websiteUrlFromPaths, wrapIndexRangeFunction, wrapLatLngPoint, wrapLngValue, wrapMapFunctionOutput, wrapNumberFunction, wrapTuples, wrapUseAsyncFunction, wrapUseFunction };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/util",
3
- "version": "12.3.6",
3
+ "version": "12.3.8",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./src/index.d.ts",
@@ -67,6 +67,13 @@ export declare const filterOnlyUndefinedValues: GeneralFilterFromPOJOFunction;
67
67
  * @returns
68
68
  */
69
69
  export declare const filterNullAndUndefinedValues: GeneralFilterFromPOJOFunction;
70
+ /**
71
+ * Returns a copy of the input object with all empty values filtered from it.
72
+ *
73
+ * @param obj
74
+ * @returns
75
+ */
76
+ export declare const filterEmptyPojoValues: GeneralFilterFromPOJOFunction;
70
77
  /**
71
78
  * Returns a copy of the input object with all falsy and empty filtered from it.
72
79
  *
@@ -3,6 +3,7 @@ export * from './dencoder';
3
3
  export * from './factory';
4
4
  export * from './html';
5
5
  export * from './json';
6
+ export * from './mimetype';
6
7
  export * from './password';
7
8
  export * from './prefix';
8
9
  export * from './string';
@@ -0,0 +1,12 @@
1
+ /**
2
+ * A simple mime type string with just the type/subtype and no parameters.
3
+ *
4
+ * I.E. "application/json"
5
+ */
6
+ export type MimeTypeWithoutParameters = string;
7
+ /**
8
+ * A mime type string that may contain additional parameters.
9
+ *
10
+ * I.E. "text/plain", "application/json; charset=utf-8"
11
+ */
12
+ export type ContentTypeMimeType = string;
@@ -1,5 +1,6 @@
1
+ import { ArrayOrValue } from '../array';
1
2
  import { type MapFunction } from '../value/map';
2
- import { type Maybe } from '../value/maybe.type';
3
+ import { MaybeNot, type Maybe } from '../value/maybe.type';
3
4
  /**
4
5
  * Converts a string to a value.
5
6
  */
@@ -24,9 +25,36 @@ export type CommaSeparatedString<T = unknown> = string;
24
25
  * I.E. 0 1 2
25
26
  */
26
27
  export type SpaceSeparatedString<T = unknown> = string;
28
+ export declare const COMMA_JOINER = ",";
27
29
  export declare function caseInsensitiveString(input: string): string;
28
30
  export declare function caseInsensitiveString(input: undefined): undefined;
29
31
  export declare function caseInsensitiveString(input: Maybe<string>): Maybe<string>;
32
+ /**
33
+ * Joins an array of strings into a single string. Trims and omits empty values.
34
+ *
35
+ * @param input string or array of strings
36
+ * @param joiner string to join the strings with. Defaults to a comma.
37
+ * @param trim whether or not to trim the strings before joining. Defaults to false.
38
+ * @returns joined string, or null/undefined if the input is null/undefined
39
+ */
40
+ export declare function joinStrings(input: MaybeNot, joiner?: string, trim?: boolean): MaybeNot;
41
+ export declare function joinStrings(input: ArrayOrValue<Maybe<string>>, joiner?: string, trim?: boolean): string;
42
+ /**
43
+ * Joins an array of strings into a single string using commas. Does not trim empty values by default.
44
+ *
45
+ * @param input string or array of strings
46
+ * @param trim whether or not to trim the strings before joining. Defaults to false.
47
+ * @returns joined string, or null/undefined if the input is null/undefined
48
+ */
49
+ export declare function joinStringsWithCommas(input: MaybeNot): MaybeNot;
50
+ export declare function joinStringsWithCommas(input: ArrayOrValue<Maybe<string>>): string;
51
+ /**
52
+ * Splits a comma-separated string into an array of strings.
53
+ *
54
+ * @param input string to split
55
+ * @param mapFn function to map each split string to a value
56
+ * @returns array of strings
57
+ */
30
58
  export declare function splitCommaSeparatedString(input: CommaSeparatedString<string>): string[];
31
59
  export declare function splitCommaSeparatedString<T = unknown>(input: CommaSeparatedString<T>, mapFn: MapStringFunction<T>): T[];
32
60
  export declare function splitCommaSeparatedStringToSet(input: Maybe<CommaSeparatedString>): Set<string>;
@@ -57,6 +85,7 @@ export declare function lowercaseFirstLetter(value: string): string;
57
85
  */
58
86
  export declare function splitJoinRemainder(input: string, separator: string, limit: number): string[];
59
87
  export type FirstNameLastNameTuple = [string, string | undefined];
88
+ export declare const SPACE_JOINER = " ";
60
89
  /**
61
90
  * Splits the input string like it is a name with a space separating the first and last name string.
62
91
  *
@@ -67,10 +96,11 @@ export declare function splitJoinNameString(input: string): FirstNameLastNameTup
67
96
  /**
68
97
  * Joins one or more strings together with spaces. Extra spaces are trimmed from the values.
69
98
  *
70
- * @param input
71
- * @returns
99
+ * @param input string or array of strings
100
+ * @returns joined string, or null/undefined if the input is null/undefined
72
101
  */
73
- export declare function joinStringsWithSpaces(input: Maybe<string>[]): string;
102
+ export declare function joinStringsWithSpaces(input: MaybeNot): MaybeNot;
103
+ export declare function joinStringsWithSpaces(input: ArrayOrValue<Maybe<string>>): string;
74
104
  /**
75
105
  * Creates a string that repeats the given character a number of times.
76
106
  *
package/test/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [12.3.8](https://github.com/dereekb/dbx-components/compare/v12.3.7-dev...v12.3.8) (2025-08-14)
6
+
7
+
8
+
9
+ ## [12.3.7](https://github.com/dereekb/dbx-components/compare/v12.3.6-dev...v12.3.7) (2025-08-14)
10
+
11
+
12
+
5
13
  ## [12.3.6](https://github.com/dereekb/dbx-components/compare/v12.3.5-dev...v12.3.6) (2025-08-13)
6
14
 
7
15
 
package/test/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/util/test",
3
- "version": "12.3.6",
3
+ "version": "12.3.8",
4
4
  "type": "commonjs",
5
5
  "peerDependencies": {
6
6
  "@dereekb/util": "*"