@dereekb/util 11.0.3 → 11.0.5
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/fetch/package.json +1 -1
- package/index.cjs.js +91 -6
- package/index.esm.js +125 -7
- package/package.json +1 -1
- package/src/lib/string/url.d.ts +93 -2
- package/test/CHANGELOG.md +8 -0
- package/test/package.json +1 -1
package/fetch/package.json
CHANGED
package/index.cjs.js
CHANGED
|
@@ -11399,6 +11399,14 @@ function isolateSlashPathFunction(config) {
|
|
|
11399
11399
|
};
|
|
11400
11400
|
}
|
|
11401
11401
|
|
|
11402
|
+
/**
|
|
11403
|
+
* Returns true if the input string is a KnownHttpWebsiteProtocol.
|
|
11404
|
+
*
|
|
11405
|
+
* @param input
|
|
11406
|
+
*/
|
|
11407
|
+
function isKnownHttpWebsiteProtocol(input) {
|
|
11408
|
+
return input === 'http' || input === 'https';
|
|
11409
|
+
}
|
|
11402
11410
|
/**
|
|
11403
11411
|
* Simple website domain regex that looks for a period in the string between the domain and the tld
|
|
11404
11412
|
*/
|
|
@@ -11408,6 +11416,7 @@ const HAS_WEBSITE_DOMAIN_NAME_REGEX = /(.+)\.(.+)/;
|
|
|
11408
11416
|
*
|
|
11409
11417
|
* Examples where it will return true:
|
|
11410
11418
|
* - dereekb.com
|
|
11419
|
+
* - test://dereekb.com
|
|
11411
11420
|
* - https://components.dereekb.com
|
|
11412
11421
|
* - https://components.dereekb.com/
|
|
11413
11422
|
* - https://components.dereekb.com/doc/home
|
|
@@ -11418,6 +11427,48 @@ const HAS_WEBSITE_DOMAIN_NAME_REGEX = /(.+)\.(.+)/;
|
|
|
11418
11427
|
function hasWebsiteDomain(input) {
|
|
11419
11428
|
return HAS_WEBSITE_DOMAIN_NAME_REGEX.test(input);
|
|
11420
11429
|
}
|
|
11430
|
+
/**
|
|
11431
|
+
* This Regex is really only reliable for detecting that the TLD exists, but due to the nature of tld's
|
|
11432
|
+
* it cannot always be determined whether or not the part of the url is part of the tld or a subdomain.
|
|
11433
|
+
*/
|
|
11434
|
+
const WEBSITE_TLD_DETECTION_REGEX = /[^\/.\s]([^.\s]+)\.([^.\s]+)$/;
|
|
11435
|
+
/**
|
|
11436
|
+
* Returns true if the input url has a website top level domain.
|
|
11437
|
+
*
|
|
11438
|
+
* It does not check whether or not the tld is a recognized tld.
|
|
11439
|
+
*/
|
|
11440
|
+
function hasWebsiteTopLevelDomain(input) {
|
|
11441
|
+
return WEBSITE_TLD_DETECTION_REGEX.test(input);
|
|
11442
|
+
}
|
|
11443
|
+
/**
|
|
11444
|
+
* Simple website domain regex that looks for a period in the string between the domain and the tld
|
|
11445
|
+
*/
|
|
11446
|
+
const HAS_PORT_NUMBER_REGEX = /\:(\d+)/;
|
|
11447
|
+
/**
|
|
11448
|
+
* Returns true if the input has a port number attached to it
|
|
11449
|
+
*
|
|
11450
|
+
* Examples where it will return true:
|
|
11451
|
+
* - localhost:8080
|
|
11452
|
+
* - dereekb.com:8080
|
|
11453
|
+
* - https://components.dereekb.com:8080
|
|
11454
|
+
* - https://components.dereekb.com:8080/
|
|
11455
|
+
* - https://components.dereekb.com:8080/doc/home
|
|
11456
|
+
*
|
|
11457
|
+
* @param input
|
|
11458
|
+
* @returns
|
|
11459
|
+
*/
|
|
11460
|
+
function hasPortNumber(input) {
|
|
11461
|
+
return HAS_PORT_NUMBER_REGEX.test(input);
|
|
11462
|
+
}
|
|
11463
|
+
/**
|
|
11464
|
+
* Reads the port number from the input, if possible.
|
|
11465
|
+
*
|
|
11466
|
+
* @param input
|
|
11467
|
+
*/
|
|
11468
|
+
function readPortNumber(input) {
|
|
11469
|
+
const execResult = HAS_PORT_NUMBER_REGEX.exec(input);
|
|
11470
|
+
return execResult ? Number(execResult[1]) : undefined;
|
|
11471
|
+
}
|
|
11421
11472
|
/**
|
|
11422
11473
|
* Creates a base website url from the input domain or url.
|
|
11423
11474
|
*
|
|
@@ -11431,7 +11482,7 @@ function baseWebsiteUrl(input, defaultTld = 'com') {
|
|
|
11431
11482
|
} else {
|
|
11432
11483
|
base = addHttpToUrl(input);
|
|
11433
11484
|
}
|
|
11434
|
-
if (!hasWebsiteDomain(base)) {
|
|
11485
|
+
if (!hasWebsiteDomain(base) && !hasPortNumber(base)) {
|
|
11435
11486
|
base = `${base}.${defaultTld || 'com'}`;
|
|
11436
11487
|
}
|
|
11437
11488
|
return base;
|
|
@@ -11461,15 +11512,27 @@ function isWebsiteUrlWithPrefix(input) {
|
|
|
11461
11512
|
}
|
|
11462
11513
|
return isWebsiteUrlWithPrefix;
|
|
11463
11514
|
}
|
|
11515
|
+
/**
|
|
11516
|
+
* Returns true if the input is a StandardInternetAccessibleWebsiteUrl.
|
|
11517
|
+
*
|
|
11518
|
+
* @param input
|
|
11519
|
+
*/
|
|
11520
|
+
function isStandardInternetAccessibleWebsiteUrl(input) {
|
|
11521
|
+
const protocol = readWebsiteProtocol(input);
|
|
11522
|
+
return hasWebsiteTopLevelDomain(input) && (protocol != null ? isKnownHttpWebsiteProtocol(protocol) : true);
|
|
11523
|
+
}
|
|
11464
11524
|
/**
|
|
11465
11525
|
* Creates a WebsiteUrl from the input
|
|
11466
11526
|
* @param basePath
|
|
11467
11527
|
* @param paths
|
|
11468
11528
|
* @returns
|
|
11469
11529
|
*/
|
|
11470
|
-
function websiteUrlFromPaths(basePath, paths) {
|
|
11471
|
-
|
|
11472
|
-
|
|
11530
|
+
function websiteUrlFromPaths(basePath, paths, defaultProtocol) {
|
|
11531
|
+
var _readWebsiteProtocol;
|
|
11532
|
+
const protocol = (_readWebsiteProtocol = readWebsiteProtocol(basePath)) != null ? _readWebsiteProtocol : defaultProtocol;
|
|
11533
|
+
const baseWebUrl = removeWebProtocolPrefix(baseWebsiteUrl(basePath)); // remove prefix to prevent issues with slash paths
|
|
11534
|
+
const webUrl = mergeSlashPaths([baseWebUrl, ...asArray(paths)]);
|
|
11535
|
+
return setWebProtocolPrefix(webUrl, protocol);
|
|
11473
11536
|
}
|
|
11474
11537
|
/**
|
|
11475
11538
|
* Creates a new ExcludeBaseWebsitePathFunction that excludes the base path from the input website path if it exists.
|
|
@@ -11584,15 +11647,29 @@ function websiteDomainAndPathPair(input) {
|
|
|
11584
11647
|
};
|
|
11585
11648
|
}
|
|
11586
11649
|
const HTTP_OR_HTTPS_REGEX = /^https:\/\/|http:\/\//;
|
|
11587
|
-
const WEB_PROTOCOL_PREFIX_REGEX = /^(
|
|
11650
|
+
const WEB_PROTOCOL_PREFIX_REGEX = /^(.+):\/\//;
|
|
11651
|
+
/**
|
|
11652
|
+
* Reads the website protocol from the input string, if it exists.
|
|
11653
|
+
*
|
|
11654
|
+
* Does not include the "://" components.
|
|
11655
|
+
*
|
|
11656
|
+
* @param input
|
|
11657
|
+
*/
|
|
11658
|
+
function readWebsiteProtocol(input) {
|
|
11659
|
+
const result = WEB_PROTOCOL_PREFIX_REGEX.exec(input);
|
|
11660
|
+
return result ? result[1] : undefined;
|
|
11661
|
+
}
|
|
11588
11662
|
/**
|
|
11589
11663
|
* Removes any existing protocol and sets the protocol to match the input.
|
|
11590
11664
|
*
|
|
11665
|
+
* If no protcol is input, then it is removed from the input.
|
|
11666
|
+
*
|
|
11591
11667
|
* @param url
|
|
11592
11668
|
* @param protocol
|
|
11593
11669
|
*/
|
|
11594
11670
|
function setWebProtocolPrefix(input, protocol) {
|
|
11595
|
-
|
|
11671
|
+
const basePath = removeWebProtocolPrefix(input);
|
|
11672
|
+
return protocol ? `${protocol}://${basePath}` : basePath;
|
|
11596
11673
|
}
|
|
11597
11674
|
/**
|
|
11598
11675
|
* Removes any existing protocol prefix from the input.
|
|
@@ -15862,6 +15939,7 @@ exports.FINAL_PAGE = FINAL_PAGE;
|
|
|
15862
15939
|
exports.FIRST_PAGE = FIRST_PAGE;
|
|
15863
15940
|
exports.FRACTIONAL_HOURS_PRECISION_FUNCTION = FRACTIONAL_HOURS_PRECISION_FUNCTION;
|
|
15864
15941
|
exports.FullStorageObject = FullStorageObject;
|
|
15942
|
+
exports.HAS_PORT_NUMBER_REGEX = HAS_PORT_NUMBER_REGEX;
|
|
15865
15943
|
exports.HAS_WEBSITE_DOMAIN_NAME_REGEX = HAS_WEBSITE_DOMAIN_NAME_REGEX;
|
|
15866
15944
|
exports.HOURS_IN_DAY = HOURS_IN_DAY;
|
|
15867
15945
|
exports.HTTP_OR_HTTPS_REGEX = HTTP_OR_HTTPS_REGEX;
|
|
@@ -15937,6 +16015,7 @@ exports.UTC_TIMEZONE_STRING = UTC_TIMEZONE_STRING;
|
|
|
15937
16015
|
exports.UTF_8_START_CHARACTER = UTF_8_START_CHARACTER;
|
|
15938
16016
|
exports.UTF_PRIVATE_USAGE_AREA_START = UTF_PRIVATE_USAGE_AREA_START;
|
|
15939
16017
|
exports.UnauthorizedServerErrorResponse = UnauthorizedServerErrorResponse;
|
|
16018
|
+
exports.WEBSITE_TLD_DETECTION_REGEX = WEBSITE_TLD_DETECTION_REGEX;
|
|
15940
16019
|
exports.WEB_PROTOCOL_PREFIX_REGEX = WEB_PROTOCOL_PREFIX_REGEX;
|
|
15941
16020
|
exports.ZIP_CODE_STRING_REGEX = ZIP_CODE_STRING_REGEX;
|
|
15942
16021
|
exports.addHttpToUrl = addHttpToUrl;
|
|
@@ -16180,12 +16259,14 @@ exports.hasDifferentStringsNoCase = hasDifferentStringsNoCase;
|
|
|
16180
16259
|
exports.hasDifferentValues = hasDifferentValues;
|
|
16181
16260
|
exports.hasHttpPrefix = hasHttpPrefix;
|
|
16182
16261
|
exports.hasNonNullValue = hasNonNullValue;
|
|
16262
|
+
exports.hasPortNumber = hasPortNumber;
|
|
16183
16263
|
exports.hasSameTimezone = hasSameTimezone;
|
|
16184
16264
|
exports.hasSameValues = hasSameValues;
|
|
16185
16265
|
exports.hasValueFunction = hasValueFunction;
|
|
16186
16266
|
exports.hasValueOrNotEmpty = hasValueOrNotEmpty;
|
|
16187
16267
|
exports.hasValueOrNotEmptyObject = hasValueOrNotEmptyObject;
|
|
16188
16268
|
exports.hasWebsiteDomain = hasWebsiteDomain;
|
|
16269
|
+
exports.hasWebsiteTopLevelDomain = hasWebsiteTopLevelDomain;
|
|
16189
16270
|
exports.hashSetForIndexed = hashSetForIndexed;
|
|
16190
16271
|
exports.hourToFractionalHour = hourToFractionalHour;
|
|
16191
16272
|
exports.idBatchFactory = idBatchFactory;
|
|
@@ -16236,6 +16317,7 @@ exports.isIndexNumberInIndexRangeFunction = isIndexNumberInIndexRangeFunction;
|
|
|
16236
16317
|
exports.isIndexRangeInIndexRange = isIndexRangeInIndexRange;
|
|
16237
16318
|
exports.isIndexRangeInIndexRangeFunction = isIndexRangeInIndexRangeFunction;
|
|
16238
16319
|
exports.isIterable = isIterable;
|
|
16320
|
+
exports.isKnownHttpWebsiteProtocol = isKnownHttpWebsiteProtocol;
|
|
16239
16321
|
exports.isLatLngBound = isLatLngBound;
|
|
16240
16322
|
exports.isLatLngBoundWithinLatLngBound = isLatLngBoundWithinLatLngBound;
|
|
16241
16323
|
exports.isLatLngPoint = isLatLngPoint;
|
|
@@ -16267,6 +16349,7 @@ exports.isServerError = isServerError;
|
|
|
16267
16349
|
exports.isSlashPathFile = isSlashPathFile;
|
|
16268
16350
|
exports.isSlashPathFolder = isSlashPathFolder;
|
|
16269
16351
|
exports.isSlashPathTypedFile = isSlashPathTypedFile;
|
|
16352
|
+
exports.isStandardInternetAccessibleWebsiteUrl = isStandardInternetAccessibleWebsiteUrl;
|
|
16270
16353
|
exports.isStringOrTrue = isStringOrTrue;
|
|
16271
16354
|
exports.isTrueBooleanKeyArray = isTrueBooleanKeyArray;
|
|
16272
16355
|
exports.isUTCDateString = isUTCDateString;
|
|
@@ -16477,7 +16560,9 @@ exports.readModelKeyFromObject = readModelKeyFromObject;
|
|
|
16477
16560
|
exports.readModelKeys = readModelKeys;
|
|
16478
16561
|
exports.readModelKeysFromObjects = readModelKeysFromObjects;
|
|
16479
16562
|
exports.readMultipleKeysToMap = readMultipleKeysToMap;
|
|
16563
|
+
exports.readPortNumber = readPortNumber;
|
|
16480
16564
|
exports.readUniqueModelKey = readUniqueModelKey;
|
|
16565
|
+
exports.readWebsiteProtocol = readWebsiteProtocol;
|
|
16481
16566
|
exports.readableError = readableError;
|
|
16482
16567
|
exports.readableStreamToBase64 = readableStreamToBase64;
|
|
16483
16568
|
exports.readableStreamToBuffer = readableStreamToBuffer;
|
package/index.esm.js
CHANGED
|
@@ -13155,6 +13155,15 @@ function isolateSlashPathFunction(config) {
|
|
|
13155
13155
|
* I.E. http, https, etc.
|
|
13156
13156
|
*/
|
|
13157
13157
|
|
|
13158
|
+
/**
|
|
13159
|
+
* Returns true if the input string is a KnownHttpWebsiteProtocol.
|
|
13160
|
+
*
|
|
13161
|
+
* @param input
|
|
13162
|
+
*/
|
|
13163
|
+
function isKnownHttpWebsiteProtocol(input) {
|
|
13164
|
+
return input === 'http' || input === 'https';
|
|
13165
|
+
}
|
|
13166
|
+
|
|
13158
13167
|
/**
|
|
13159
13168
|
* A website domain.
|
|
13160
13169
|
*
|
|
@@ -13173,6 +13182,7 @@ const HAS_WEBSITE_DOMAIN_NAME_REGEX = /(.+)\.(.+)/;
|
|
|
13173
13182
|
*
|
|
13174
13183
|
* Examples where it will return true:
|
|
13175
13184
|
* - dereekb.com
|
|
13185
|
+
* - test://dereekb.com
|
|
13176
13186
|
* - https://components.dereekb.com
|
|
13177
13187
|
* - https://components.dereekb.com/
|
|
13178
13188
|
* - https://components.dereekb.com/doc/home
|
|
@@ -13184,6 +13194,69 @@ function hasWebsiteDomain(input) {
|
|
|
13184
13194
|
return HAS_WEBSITE_DOMAIN_NAME_REGEX.test(input);
|
|
13185
13195
|
}
|
|
13186
13196
|
|
|
13197
|
+
/**
|
|
13198
|
+
* The top-level domain (tld).
|
|
13199
|
+
*
|
|
13200
|
+
* Examples:
|
|
13201
|
+
* - com
|
|
13202
|
+
* - net
|
|
13203
|
+
*/
|
|
13204
|
+
|
|
13205
|
+
/**
|
|
13206
|
+
* This Regex is really only reliable for detecting that the TLD exists, but due to the nature of tld's
|
|
13207
|
+
* it cannot always be determined whether or not the part of the url is part of the tld or a subdomain.
|
|
13208
|
+
*/
|
|
13209
|
+
const WEBSITE_TLD_DETECTION_REGEX = /[^\/.\s]([^.\s]+)\.([^.\s]+)$/;
|
|
13210
|
+
|
|
13211
|
+
/**
|
|
13212
|
+
* Returns true if the input url has a website top level domain.
|
|
13213
|
+
*
|
|
13214
|
+
* It does not check whether or not the tld is a recognized tld.
|
|
13215
|
+
*/
|
|
13216
|
+
function hasWebsiteTopLevelDomain(input) {
|
|
13217
|
+
return WEBSITE_TLD_DETECTION_REGEX.test(input);
|
|
13218
|
+
}
|
|
13219
|
+
|
|
13220
|
+
/**
|
|
13221
|
+
* Simple website domain regex that looks for a period in the string between the domain and the tld
|
|
13222
|
+
*/
|
|
13223
|
+
const HAS_PORT_NUMBER_REGEX = /\:(\d+)/;
|
|
13224
|
+
|
|
13225
|
+
/**
|
|
13226
|
+
* A connection port number.
|
|
13227
|
+
*
|
|
13228
|
+
* Example:
|
|
13229
|
+
* - 443
|
|
13230
|
+
* - 8080
|
|
13231
|
+
*/
|
|
13232
|
+
|
|
13233
|
+
/**
|
|
13234
|
+
* Returns true if the input has a port number attached to it
|
|
13235
|
+
*
|
|
13236
|
+
* Examples where it will return true:
|
|
13237
|
+
* - localhost:8080
|
|
13238
|
+
* - dereekb.com:8080
|
|
13239
|
+
* - https://components.dereekb.com:8080
|
|
13240
|
+
* - https://components.dereekb.com:8080/
|
|
13241
|
+
* - https://components.dereekb.com:8080/doc/home
|
|
13242
|
+
*
|
|
13243
|
+
* @param input
|
|
13244
|
+
* @returns
|
|
13245
|
+
*/
|
|
13246
|
+
function hasPortNumber(input) {
|
|
13247
|
+
return HAS_PORT_NUMBER_REGEX.test(input);
|
|
13248
|
+
}
|
|
13249
|
+
|
|
13250
|
+
/**
|
|
13251
|
+
* Reads the port number from the input, if possible.
|
|
13252
|
+
*
|
|
13253
|
+
* @param input
|
|
13254
|
+
*/
|
|
13255
|
+
function readPortNumber(input) {
|
|
13256
|
+
const execResult = HAS_PORT_NUMBER_REGEX.exec(input);
|
|
13257
|
+
return execResult ? Number(execResult[1]) : undefined;
|
|
13258
|
+
}
|
|
13259
|
+
|
|
13187
13260
|
/**
|
|
13188
13261
|
* A website url that starts with http:// or https://
|
|
13189
13262
|
*
|
|
@@ -13207,7 +13280,7 @@ function baseWebsiteUrl(input, defaultTld = 'com') {
|
|
|
13207
13280
|
} else {
|
|
13208
13281
|
base = addHttpToUrl(input);
|
|
13209
13282
|
}
|
|
13210
|
-
if (!hasWebsiteDomain(base)) {
|
|
13283
|
+
if (!hasWebsiteDomain(base) && !hasPortNumber(base)) {
|
|
13211
13284
|
base = `${base}.${defaultTld || 'com'}`;
|
|
13212
13285
|
}
|
|
13213
13286
|
return base;
|
|
@@ -13255,6 +13328,33 @@ function isWebsiteUrlWithPrefix(input) {
|
|
|
13255
13328
|
return isWebsiteUrlWithPrefix;
|
|
13256
13329
|
}
|
|
13257
13330
|
|
|
13331
|
+
/**
|
|
13332
|
+
* A "standard" internet accessible website url with a tld (.com/.net/etc) and optionally has the http/https protocol, but no other protocol.
|
|
13333
|
+
*
|
|
13334
|
+
* Examples:
|
|
13335
|
+
* - dereekb.com
|
|
13336
|
+
* - dereekb.com:8080
|
|
13337
|
+
* - components.dereekb.com/
|
|
13338
|
+
* - components.dereekb.com/doc/home
|
|
13339
|
+
* - http://dereekb.com
|
|
13340
|
+
* - https://components.dereekb.com/
|
|
13341
|
+
* - https://components.dereekb.com/doc/home
|
|
13342
|
+
*
|
|
13343
|
+
* Non-examples:
|
|
13344
|
+
* - localhost:8080 // not internet-accessible
|
|
13345
|
+
* - test://dereekb.com // non-http/https protocol
|
|
13346
|
+
*/
|
|
13347
|
+
|
|
13348
|
+
/**
|
|
13349
|
+
* Returns true if the input is a StandardInternetAccessibleWebsiteUrl.
|
|
13350
|
+
*
|
|
13351
|
+
* @param input
|
|
13352
|
+
*/
|
|
13353
|
+
function isStandardInternetAccessibleWebsiteUrl(input) {
|
|
13354
|
+
const protocol = readWebsiteProtocol(input);
|
|
13355
|
+
return hasWebsiteTopLevelDomain(input) && (protocol != null ? isKnownHttpWebsiteProtocol(protocol) : true);
|
|
13356
|
+
}
|
|
13357
|
+
|
|
13258
13358
|
/**
|
|
13259
13359
|
* A website's domain and path combined, without the BaseWebsiteUrl
|
|
13260
13360
|
*
|
|
@@ -13279,9 +13379,12 @@ function isWebsiteUrlWithPrefix(input) {
|
|
|
13279
13379
|
* @param paths
|
|
13280
13380
|
* @returns
|
|
13281
13381
|
*/
|
|
13282
|
-
function websiteUrlFromPaths(basePath, paths) {
|
|
13283
|
-
|
|
13284
|
-
|
|
13382
|
+
function websiteUrlFromPaths(basePath, paths, defaultProtocol) {
|
|
13383
|
+
var _readWebsiteProtocol;
|
|
13384
|
+
const protocol = (_readWebsiteProtocol = readWebsiteProtocol(basePath)) != null ? _readWebsiteProtocol : defaultProtocol;
|
|
13385
|
+
const baseWebUrl = removeWebProtocolPrefix(baseWebsiteUrl(basePath)); // remove prefix to prevent issues with slash paths
|
|
13386
|
+
const webUrl = mergeSlashPaths([baseWebUrl, ...asArray(paths)]);
|
|
13387
|
+
return setWebProtocolPrefix(webUrl, protocol);
|
|
13285
13388
|
}
|
|
13286
13389
|
|
|
13287
13390
|
/**
|
|
@@ -13409,16 +13512,31 @@ function websiteDomainAndPathPair(input) {
|
|
|
13409
13512
|
};
|
|
13410
13513
|
}
|
|
13411
13514
|
const HTTP_OR_HTTPS_REGEX = /^https:\/\/|http:\/\//;
|
|
13412
|
-
const WEB_PROTOCOL_PREFIX_REGEX = /^(
|
|
13515
|
+
const WEB_PROTOCOL_PREFIX_REGEX = /^(.+):\/\//;
|
|
13516
|
+
|
|
13517
|
+
/**
|
|
13518
|
+
* Reads the website protocol from the input string, if it exists.
|
|
13519
|
+
*
|
|
13520
|
+
* Does not include the "://" components.
|
|
13521
|
+
*
|
|
13522
|
+
* @param input
|
|
13523
|
+
*/
|
|
13524
|
+
function readWebsiteProtocol(input) {
|
|
13525
|
+
const result = WEB_PROTOCOL_PREFIX_REGEX.exec(input);
|
|
13526
|
+
return result ? result[1] : undefined;
|
|
13527
|
+
}
|
|
13413
13528
|
|
|
13414
13529
|
/**
|
|
13415
13530
|
* Removes any existing protocol and sets the protocol to match the input.
|
|
13416
13531
|
*
|
|
13532
|
+
* If no protcol is input, then it is removed from the input.
|
|
13533
|
+
*
|
|
13417
13534
|
* @param url
|
|
13418
13535
|
* @param protocol
|
|
13419
13536
|
*/
|
|
13420
13537
|
function setWebProtocolPrefix(input, protocol) {
|
|
13421
|
-
|
|
13538
|
+
const basePath = removeWebProtocolPrefix(input);
|
|
13539
|
+
return protocol ? `${protocol}://${basePath}` : basePath;
|
|
13422
13540
|
}
|
|
13423
13541
|
|
|
13424
13542
|
/**
|
|
@@ -17035,4 +17153,4 @@ async function iterateFilteredPages(inputPage, loadFn, iterFn) {
|
|
|
17035
17153
|
return count;
|
|
17036
17154
|
}
|
|
17037
17155
|
|
|
17038
|
-
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, DATE_NOW_VALUE, 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_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, TimerInstance, TypedServiceRegistryInstance, UNLOADED_PAGE, US_STATE_CODE_STRING_REGEX, UTC_DATE_STRING_REGEX, UTC_TIMEZONE_STRING, UTF_8_START_CHARACTER, UTF_PRIVATE_USAGE_AREA_START, UnauthorizedServerErrorResponse, WEB_PROTOCOL_PREFIX_REGEX, ZIP_CODE_STRING_REGEX, addHttpToUrl, addLatLngPoints, addModifiers, addPlusPrefixToNumber, addPrefix, addPrefixFunction, addSuffix, addSuffixFunction, addToSet, addToSetCopy, addToSplitStringTree, allFalsyOrEmptyKeys, allIndexesInIndexRange, allKeyValueTuples, allMaybeSoKeys, allNonUndefinedKeys, allObjectsAreEqual, allValuesAreMaybeNot, allValuesAreNotMaybe, allowValueOnceFilter, applyBestFit, applySplitStringTreeWithMultipleValues, applyToMultipleFields, approximateTimerEndDate, areEqualContext, areEqualPOJOValues, 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, capLatValue, capitalizeFirstLetter, caseInsensitiveFilterByIndexOfDecisionFactory, caseInsensitiveString, catchAllHandlerKey, chainMapFunction, chainMapSameFunctions, coerceToEmailParticipants, combineMaps, compareEqualityWithValueFromItemsFunction, compareEqualityWithValueFromItemsFunctionFactory, compareFnOrder, compareWithMappedValuesFunction, computeNextFractionalHour, computeNextFreeIndexFunction, 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, cutToPrecision, cutValueToInteger, cutValueToPrecision, cutValueToPrecisionFunction, dateFromLogicalDate, dateFromMinuteOfDay, dateToHoursAndMinutes, dateToMinuteOfDay, dayOfWeek, daysOfWeekArray, daysOfWeekFromEnabledDays, daysOfWeekNameFunction, daysOfWeekNameMap, decisionFunction, decodeHashedValues, decodeHashedValuesWithDecodeMap, decodeModelKeyTypePair, defaultFilterFromPOJOFunctionNoCopy, defaultForwardFunctionFactory, defaultLatLngPoint, defaultLatLngString, dencodeBitwiseSet, diffLatLngBoundPoints, diffLatLngPoints, dollarAmountString, e164PhoneNumberExtensionPair, e164PhoneNumberFromE164PhoneNumberExtensionPair, enabledDaysFromDaysOfWeek, encodeBitwiseSet, encodeModelKeyTypePair, errorMessageContainsString, errorMessageContainsStringFunction, escapeStringCharactersFunction, escapeStringForRegex, excludeValues, excludeValuesFromArray, excludeValuesFromSet, existsInIterable, expandArrayMapTuples, expandArrayValueTuples, expandFlattenTreeFunction, expandIndexSet, expandTreeFunction, expandTrees, extendLatLngBound, filterAndMapFunction, filterEmptyValues, filterFalsyAndEmptyValues, filterFromIterable, filterFromPOJO, filterFromPOJOFunction, filterKeyValueTupleFunction, filterKeyValueTuples, filterKeyValueTuplesFunction, filterKeyValueTuplesInputToFilter, filterMaybeValues, filterNullAndUndefinedValues, filterOnlyUndefinedValues, 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, getDayOffset, getDayTomorrow, getDayYesterday, getDaysOfWeekNames, getFunctionType, getNextDay, getNextPageNumber, getOverlappingRectangle, getPageNumber, getPreviousDay, getValueFromGetter, groupValues, handlerBindAccessor, handlerConfigurerFactory, handlerFactory, handlerMappedSetFunction, handlerMappedSetFunctionFactory, handlerSetFunction, hasDifferentStringsNoCase, hasDifferentValues, hasHttpPrefix, hasNonNullValue, hasSameTimezone, hasSameValues, hasValueFunction, hasValueOrNotEmpty, hasValueOrNotEmptyObject, hasWebsiteDomain, hashSetForIndexed, hourToFractionalHour, idBatchFactory, incrementingNumberFactory, indexDeltaGroup, indexDeltaGroupFunction, indexRange, indexRangeCheckFunction, indexRangeCheckReaderFunction, indexRangeForArray, indexRangeOverlapsIndexRange, indexRangeOverlapsIndexRangeFunction, indexRangeReaderPairFactory, indexRefMap, indexedValuesArrayAccessorFactory, insertIntoBooleanKeyArray, invertBooleanReturnFunction, invertDecision, invertFilter, 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, isLatLngBound, isLatLngBoundWithinLatLngBound, isLatLngPoint, isLatLngPointWithinLatLngBound, isLatLngString, isLogicalDateStringCode, isMapIdentityFunction, isMaybeNot, isMaybeNotOrTrue, isMaybeSo, isMinuteOfDay, isModelKey, isMonthDaySlashDate, isNonClassFunction, isNotNullOrEmptyString, isNumberDivisibleBy, isObjectWithConstructor, isOddNumber, isPast, isPromise, isPromiseLike, isSameLatLngBound, isSameLatLngPoint, isSameNonNullValue, isSameVector, isSelectedDecisionFunctionFactory, isSelectedIndexDecisionFunction, isServerError, isSlashPathFile, isSlashPathFolder, isSlashPathTypedFile, isStringOrTrue, isTrueBooleanKeyArray, isUTCDateString, 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, makeGetter, makeHandler, makeHashDecodeMap, makeKeyPairs, makeModelConversionFieldValuesFunction, makeModelMap, makeModelMapFunctions, makeMultiModelKeyMap, makeValuesGroupMap, makeWithFactory, makeWithFactoryInput, mapArrayFunction, mapFunctionOutput, mapFunctionOutputPair, mapGetter, mapGetterFactory, mapIdentityFunction, mapIterable, mapKeysIntersectionObjectToArray, mapMaybeFunction, 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, 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, readUniqueModelKey, 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, removeWebProtocolPrefix, repeatString, replaceCharacterAtIndexIf, replaceCharacterAtIndexWith, replaceInvalidFilePathTypeSeparatorsInSlashPath, replaceInvalidFilePathTypeSeparatorsInSlashPathFunction, replaceLastCharacterIf, replaceLastCharacterIfIsFunction, replaceMultipleFilePathsInSlashPath, replaceStringsFunction, requireModelKey, 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, 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 };
|
|
17156
|
+
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, DATE_NOW_VALUE, 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, TimerInstance, TypedServiceRegistryInstance, UNLOADED_PAGE, 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, addModifiers, addPlusPrefixToNumber, addPrefix, addPrefixFunction, addSuffix, addSuffixFunction, addToSet, addToSetCopy, addToSplitStringTree, allFalsyOrEmptyKeys, allIndexesInIndexRange, allKeyValueTuples, allMaybeSoKeys, allNonUndefinedKeys, allObjectsAreEqual, allValuesAreMaybeNot, allValuesAreNotMaybe, allowValueOnceFilter, applyBestFit, applySplitStringTreeWithMultipleValues, applyToMultipleFields, approximateTimerEndDate, areEqualContext, areEqualPOJOValues, 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, capLatValue, capitalizeFirstLetter, caseInsensitiveFilterByIndexOfDecisionFactory, caseInsensitiveString, catchAllHandlerKey, chainMapFunction, chainMapSameFunctions, coerceToEmailParticipants, combineMaps, compareEqualityWithValueFromItemsFunction, compareEqualityWithValueFromItemsFunctionFactory, compareFnOrder, compareWithMappedValuesFunction, computeNextFractionalHour, computeNextFreeIndexFunction, 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, cutToPrecision, cutValueToInteger, cutValueToPrecision, cutValueToPrecisionFunction, dateFromLogicalDate, dateFromMinuteOfDay, dateToHoursAndMinutes, dateToMinuteOfDay, dayOfWeek, daysOfWeekArray, daysOfWeekFromEnabledDays, daysOfWeekNameFunction, daysOfWeekNameMap, decisionFunction, decodeHashedValues, decodeHashedValuesWithDecodeMap, decodeModelKeyTypePair, defaultFilterFromPOJOFunctionNoCopy, defaultForwardFunctionFactory, defaultLatLngPoint, defaultLatLngString, dencodeBitwiseSet, diffLatLngBoundPoints, diffLatLngPoints, dollarAmountString, e164PhoneNumberExtensionPair, e164PhoneNumberFromE164PhoneNumberExtensionPair, enabledDaysFromDaysOfWeek, encodeBitwiseSet, encodeModelKeyTypePair, errorMessageContainsString, errorMessageContainsStringFunction, escapeStringCharactersFunction, escapeStringForRegex, excludeValues, excludeValuesFromArray, excludeValuesFromSet, existsInIterable, expandArrayMapTuples, expandArrayValueTuples, expandFlattenTreeFunction, expandIndexSet, expandTreeFunction, expandTrees, extendLatLngBound, filterAndMapFunction, filterEmptyValues, filterFalsyAndEmptyValues, filterFromIterable, filterFromPOJO, filterFromPOJOFunction, filterKeyValueTupleFunction, filterKeyValueTuples, filterKeyValueTuplesFunction, filterKeyValueTuplesInputToFilter, filterMaybeValues, filterNullAndUndefinedValues, filterOnlyUndefinedValues, 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, 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, idBatchFactory, incrementingNumberFactory, indexDeltaGroup, indexDeltaGroupFunction, indexRange, indexRangeCheckFunction, indexRangeCheckReaderFunction, indexRangeForArray, indexRangeOverlapsIndexRange, indexRangeOverlapsIndexRangeFunction, indexRangeReaderPairFactory, indexRefMap, indexedValuesArrayAccessorFactory, insertIntoBooleanKeyArray, invertBooleanReturnFunction, invertDecision, invertFilter, 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, isNotNullOrEmptyString, isNumberDivisibleBy, isObjectWithConstructor, isOddNumber, isPast, isPromise, isPromiseLike, isSameLatLngBound, isSameLatLngPoint, isSameNonNullValue, isSameVector, isSelectedDecisionFunctionFactory, isSelectedIndexDecisionFunction, isServerError, isSlashPathFile, isSlashPathFolder, isSlashPathTypedFile, isStandardInternetAccessibleWebsiteUrl, isStringOrTrue, isTrueBooleanKeyArray, isUTCDateString, 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, makeGetter, makeHandler, makeHashDecodeMap, makeKeyPairs, makeModelConversionFieldValuesFunction, makeModelMap, makeModelMapFunctions, makeMultiModelKeyMap, makeValuesGroupMap, makeWithFactory, makeWithFactoryInput, mapArrayFunction, mapFunctionOutput, mapFunctionOutputPair, mapGetter, mapGetterFactory, mapIdentityFunction, mapIterable, mapKeysIntersectionObjectToArray, mapMaybeFunction, 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, 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, removeWebProtocolPrefix, repeatString, replaceCharacterAtIndexIf, replaceCharacterAtIndexWith, replaceInvalidFilePathTypeSeparatorsInSlashPath, replaceInvalidFilePathTypeSeparatorsInSlashPathFunction, replaceLastCharacterIf, replaceLastCharacterIfIsFunction, replaceMultipleFilePathsInSlashPath, replaceStringsFunction, requireModelKey, 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, 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
package/src/lib/string/url.d.ts
CHANGED
|
@@ -13,6 +13,12 @@ export type WebsiteProtocol = string;
|
|
|
13
13
|
export type HttpWebsiteProtocol = 'http';
|
|
14
14
|
export type HttpsWebsiteProtocol = 'https';
|
|
15
15
|
export type KnownHttpWebsiteProtocol = HttpWebsiteProtocol | HttpsWebsiteProtocol;
|
|
16
|
+
/**
|
|
17
|
+
* Returns true if the input string is a KnownHttpWebsiteProtocol.
|
|
18
|
+
*
|
|
19
|
+
* @param input
|
|
20
|
+
*/
|
|
21
|
+
export declare function isKnownHttpWebsiteProtocol(input: string): input is KnownHttpWebsiteProtocol;
|
|
16
22
|
/**
|
|
17
23
|
* A website domain.
|
|
18
24
|
*
|
|
@@ -30,6 +36,7 @@ export declare const HAS_WEBSITE_DOMAIN_NAME_REGEX: RegExp;
|
|
|
30
36
|
*
|
|
31
37
|
* Examples where it will return true:
|
|
32
38
|
* - dereekb.com
|
|
39
|
+
* - test://dereekb.com
|
|
33
40
|
* - https://components.dereekb.com
|
|
34
41
|
* - https://components.dereekb.com/
|
|
35
42
|
* - https://components.dereekb.com/doc/home
|
|
@@ -38,6 +45,57 @@ export declare const HAS_WEBSITE_DOMAIN_NAME_REGEX: RegExp;
|
|
|
38
45
|
* @returns
|
|
39
46
|
*/
|
|
40
47
|
export declare function hasWebsiteDomain(input: string): input is WebsiteDomain;
|
|
48
|
+
/**
|
|
49
|
+
* The top-level domain (tld).
|
|
50
|
+
*
|
|
51
|
+
* Examples:
|
|
52
|
+
* - com
|
|
53
|
+
* - net
|
|
54
|
+
*/
|
|
55
|
+
export type WebsiteTopLevelDomain = string;
|
|
56
|
+
/**
|
|
57
|
+
* This Regex is really only reliable for detecting that the TLD exists, but due to the nature of tld's
|
|
58
|
+
* it cannot always be determined whether or not the part of the url is part of the tld or a subdomain.
|
|
59
|
+
*/
|
|
60
|
+
export declare const WEBSITE_TLD_DETECTION_REGEX: RegExp;
|
|
61
|
+
/**
|
|
62
|
+
* Returns true if the input url has a website top level domain.
|
|
63
|
+
*
|
|
64
|
+
* It does not check whether or not the tld is a recognized tld.
|
|
65
|
+
*/
|
|
66
|
+
export declare function hasWebsiteTopLevelDomain(input: string): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Simple website domain regex that looks for a period in the string between the domain and the tld
|
|
69
|
+
*/
|
|
70
|
+
export declare const HAS_PORT_NUMBER_REGEX: RegExp;
|
|
71
|
+
/**
|
|
72
|
+
* A connection port number.
|
|
73
|
+
*
|
|
74
|
+
* Example:
|
|
75
|
+
* - 443
|
|
76
|
+
* - 8080
|
|
77
|
+
*/
|
|
78
|
+
export type PortNumber = number;
|
|
79
|
+
/**
|
|
80
|
+
* Returns true if the input has a port number attached to it
|
|
81
|
+
*
|
|
82
|
+
* Examples where it will return true:
|
|
83
|
+
* - localhost:8080
|
|
84
|
+
* - dereekb.com:8080
|
|
85
|
+
* - https://components.dereekb.com:8080
|
|
86
|
+
* - https://components.dereekb.com:8080/
|
|
87
|
+
* - https://components.dereekb.com:8080/doc/home
|
|
88
|
+
*
|
|
89
|
+
* @param input
|
|
90
|
+
* @returns
|
|
91
|
+
*/
|
|
92
|
+
export declare function hasPortNumber(input: string): boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Reads the port number from the input, if possible.
|
|
95
|
+
*
|
|
96
|
+
* @param input
|
|
97
|
+
*/
|
|
98
|
+
export declare function readPortNumber(input: string): Maybe<PortNumber>;
|
|
41
99
|
/**
|
|
42
100
|
* A website url that starts with http:// or https://
|
|
43
101
|
*
|
|
@@ -82,6 +140,29 @@ export type WebsiteUrlWithPrefix = string;
|
|
|
82
140
|
* Checks that it has the http/https prefix, has a domain, and the path is a slash path. The query parameters are ignored.
|
|
83
141
|
*/
|
|
84
142
|
export declare function isWebsiteUrlWithPrefix(input: string): input is WebsiteUrl;
|
|
143
|
+
/**
|
|
144
|
+
* A "standard" internet accessible website url with a tld (.com/.net/etc) and optionally has the http/https protocol, but no other protocol.
|
|
145
|
+
*
|
|
146
|
+
* Examples:
|
|
147
|
+
* - dereekb.com
|
|
148
|
+
* - dereekb.com:8080
|
|
149
|
+
* - components.dereekb.com/
|
|
150
|
+
* - components.dereekb.com/doc/home
|
|
151
|
+
* - http://dereekb.com
|
|
152
|
+
* - https://components.dereekb.com/
|
|
153
|
+
* - https://components.dereekb.com/doc/home
|
|
154
|
+
*
|
|
155
|
+
* Non-examples:
|
|
156
|
+
* - localhost:8080 // not internet-accessible
|
|
157
|
+
* - test://dereekb.com // non-http/https protocol
|
|
158
|
+
*/
|
|
159
|
+
export type StandardInternetAccessibleWebsiteUrl = string;
|
|
160
|
+
/**
|
|
161
|
+
* Returns true if the input is a StandardInternetAccessibleWebsiteUrl.
|
|
162
|
+
*
|
|
163
|
+
* @param input
|
|
164
|
+
*/
|
|
165
|
+
export declare function isStandardInternetAccessibleWebsiteUrl(input: string): input is StandardInternetAccessibleWebsiteUrl;
|
|
85
166
|
/**
|
|
86
167
|
* A website's domain and path combined, without the BaseWebsiteUrl
|
|
87
168
|
*
|
|
@@ -106,7 +187,7 @@ export type WebsitePath = `/${string}`;
|
|
|
106
187
|
* @param paths
|
|
107
188
|
* @returns
|
|
108
189
|
*/
|
|
109
|
-
export declare function websiteUrlFromPaths(basePath: BaseWebsiteUrlInput, paths: ArrayOrValue<Maybe<WebsitePath
|
|
190
|
+
export declare function websiteUrlFromPaths(basePath: BaseWebsiteUrlInput, paths: ArrayOrValue<Maybe<WebsitePath>>, defaultProtocol?: WebsiteProtocol): WebsiteUrl;
|
|
110
191
|
/**
|
|
111
192
|
* Any query parameters that follow the path.
|
|
112
193
|
*/
|
|
@@ -181,13 +262,23 @@ export interface WebsiteDomainAndPathPair {
|
|
|
181
262
|
export declare function websiteDomainAndPathPair(input: WebsiteDomainAndPath): WebsiteDomainAndPathPair;
|
|
182
263
|
export declare const HTTP_OR_HTTPS_REGEX: RegExp;
|
|
183
264
|
export declare const WEB_PROTOCOL_PREFIX_REGEX: RegExp;
|
|
265
|
+
/**
|
|
266
|
+
* Reads the website protocol from the input string, if it exists.
|
|
267
|
+
*
|
|
268
|
+
* Does not include the "://" components.
|
|
269
|
+
*
|
|
270
|
+
* @param input
|
|
271
|
+
*/
|
|
272
|
+
export declare function readWebsiteProtocol(input: string): Maybe<WebsiteProtocol>;
|
|
184
273
|
/**
|
|
185
274
|
* Removes any existing protocol and sets the protocol to match the input.
|
|
186
275
|
*
|
|
276
|
+
* If no protcol is input, then it is removed from the input.
|
|
277
|
+
*
|
|
187
278
|
* @param url
|
|
188
279
|
* @param protocol
|
|
189
280
|
*/
|
|
190
|
-
export declare function setWebProtocolPrefix(input: string, protocol
|
|
281
|
+
export declare function setWebProtocolPrefix(input: string, protocol?: Maybe<WebsiteProtocol>): string;
|
|
191
282
|
/**
|
|
192
283
|
* Removes any existing protocol prefix from the input.
|
|
193
284
|
*
|
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
|
+
## [11.0.5](https://github.com/dereekb/dbx-components/compare/v11.0.4-dev...v11.0.5) (2024-11-19)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## [11.0.4](https://github.com/dereekb/dbx-components/compare/v11.0.3-dev...v11.0.4) (2024-11-19)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
5
13
|
## [11.0.3](https://github.com/dereekb/dbx-components/compare/v11.0.2-dev...v11.0.3) (2024-11-15)
|
|
6
14
|
|
|
7
15
|
|