@dereekb/util 10.2.0 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fetch/index.cjs.js +223 -145
- package/fetch/package.json +1 -1
- package/index.cjs.js +3919 -2732
- package/index.esm.js +54 -24
- package/package.json +1 -1
- package/src/lib/array/array.d.ts +0 -12
- package/src/lib/date/date.d.ts +8 -1
- package/src/lib/promise/index.d.ts +1 -0
- package/src/lib/promise/promise.factory.d.ts +33 -0
- package/src/lib/value/point.d.ts +1 -1
- package/test/CHANGELOG.md +4 -0
- package/test/package.json +1 -1
- package/test/src/lib/jest.fail.js +3 -3
- package/test/src/lib/jest.fail.js.map +1 -1
- package/test/src/lib/jest.js +8 -7
- package/test/src/lib/jest.js.map +1 -1
- package/test/src/lib/jest.wrap.js +16 -15
- package/test/src/lib/jest.wrap.js.map +1 -1
package/index.esm.js
CHANGED
|
@@ -1847,22 +1847,6 @@ function countAllInNestedArray(array) {
|
|
|
1847
1847
|
return array.reduce((acc, curr) => acc + curr.length, 0);
|
|
1848
1848
|
}
|
|
1849
1849
|
|
|
1850
|
-
// MARK: Compat
|
|
1851
|
-
/**
|
|
1852
|
-
* @deprecated Use mergeArraysIntoArray() instead. Will be removed in v10.1.
|
|
1853
|
-
*/
|
|
1854
|
-
const mergeIntoArray = mergeArraysIntoArray;
|
|
1855
|
-
|
|
1856
|
-
/**
|
|
1857
|
-
* @deprecated Use pushArrayItemsIntoArray() instead. Will be removed in v10.1.
|
|
1858
|
-
*/
|
|
1859
|
-
const mergeArrayIntoArray = pushArrayItemsIntoArray;
|
|
1860
|
-
|
|
1861
|
-
/**
|
|
1862
|
-
* @deprecated Use pushArrayItemsOrItemIntoArray() instead. Will be removed in v10.1.
|
|
1863
|
-
*/
|
|
1864
|
-
const mergeArrayOrValueIntoArray = pushItemOrArrayItemsIntoArray;
|
|
1865
|
-
|
|
1866
1850
|
var wellKnownSymbol$d = wellKnownSymbol$k;
|
|
1867
1851
|
|
|
1868
1852
|
var TO_STRING_TAG$1 = wellKnownSymbol$d('toStringTag');
|
|
@@ -2590,8 +2574,6 @@ function containsAnyValue(values, valuesToFind, emptyValuesToFindArrayResult) {
|
|
|
2590
2574
|
return setContainsAnyValue(set, valuesToFind, emptyValuesToFindArrayResult);
|
|
2591
2575
|
}
|
|
2592
2576
|
|
|
2593
|
-
// TODO: Continue checking all values
|
|
2594
|
-
|
|
2595
2577
|
/**
|
|
2596
2578
|
* Returns true if one or more of the input values are contained within the input set.
|
|
2597
2579
|
*
|
|
@@ -6496,7 +6478,7 @@ function sliceIndexRangeFunction(inputRange) {
|
|
|
6496
6478
|
* If order is irrelevant, use filterValuesByDistanceNoOrder().
|
|
6497
6479
|
*/
|
|
6498
6480
|
function filterValuesByDistance(input, minDistance, getValue) {
|
|
6499
|
-
// TODO: Implement if needed.
|
|
6481
|
+
// TODO(FUTURE): Implement if needed.
|
|
6500
6482
|
|
|
6501
6483
|
throw new Error('Incomplete implementation!');
|
|
6502
6484
|
}
|
|
@@ -6512,7 +6494,7 @@ function filterValuesByDistanceNoOrder(input, minDistance, getValue) {
|
|
|
6512
6494
|
return _filterValuesByDistance(values, minDistance, x => x[0]);
|
|
6513
6495
|
}
|
|
6514
6496
|
|
|
6515
|
-
// TODO: Can add a "mergeValuesByDistance" too to merge together values that are too close together.
|
|
6497
|
+
// TODO(FUTURE): Can add a "mergeValuesByDistance" too to merge together values that are too close together.
|
|
6516
6498
|
|
|
6517
6499
|
function _filterValuesByDistance(values, minDistance, toOutputValue) {
|
|
6518
6500
|
// Exit if nothing to do.
|
|
@@ -10152,7 +10134,7 @@ const TOTAL_LONGITUDE_RANGE = MAX_LONGITUDE_VALUE - MIN_LONGITUDE_VALUE;
|
|
|
10152
10134
|
/**
|
|
10153
10135
|
* A point decorated as LonLat.
|
|
10154
10136
|
*
|
|
10155
|
-
* NOTE: This library prefers the use of LatLngPoint over LonLatPoint. This is only provided as compatability for libraries (like Mapbox) that have LonLat-like points
|
|
10137
|
+
* NOTE: This library (dbx-components) prefers the use of LatLngPoint over LonLatPoint. This is only provided as compatability for libraries (like Mapbox) that have LonLat-like points
|
|
10156
10138
|
*/
|
|
10157
10139
|
|
|
10158
10140
|
function isLatLngPoint(input) {
|
|
@@ -11028,7 +11010,7 @@ function compareEqualityWithValueFromItemsFunctionFactory(readValues) {
|
|
|
11028
11010
|
*/
|
|
11029
11011
|
|
|
11030
11012
|
/**
|
|
11031
|
-
* TODO: Need to improve to support negative years.
|
|
11013
|
+
* TODO(FUTURE): Need to improve to support negative years.
|
|
11032
11014
|
*/
|
|
11033
11015
|
const ISO_8601_DATE_STRING_REGEX = /(\d{4,})-(\d{2})-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})(Z|[+-](\d{2})\:(\d{2}))?/;
|
|
11034
11016
|
function isISO8601DateString(input) {
|
|
@@ -11294,6 +11276,16 @@ function isEqualDate(a, b) {
|
|
|
11294
11276
|
return a.getTime() === b.getTime();
|
|
11295
11277
|
}
|
|
11296
11278
|
|
|
11279
|
+
/**
|
|
11280
|
+
* Returns true if the input date is in the past.
|
|
11281
|
+
*
|
|
11282
|
+
* @param input
|
|
11283
|
+
* @returns
|
|
11284
|
+
*/
|
|
11285
|
+
function isPast(input) {
|
|
11286
|
+
return input.getTime() < Date.now();
|
|
11287
|
+
}
|
|
11288
|
+
|
|
11297
11289
|
/**
|
|
11298
11290
|
* A number that represents hours and rounded to the nearest minute.
|
|
11299
11291
|
*
|
|
@@ -14297,7 +14289,7 @@ function numberStringDencoderDecodedNumberValueFunction(dencoder) {
|
|
|
14297
14289
|
};
|
|
14298
14290
|
}
|
|
14299
14291
|
|
|
14300
|
-
// TODO: can add a function that can encode/decode fractions by splitting at the decimal point and encoding twice.
|
|
14292
|
+
// TODO(FUTURE): can add a function that can encode/decode fractions by splitting at the decimal point and encoding twice.
|
|
14301
14293
|
|
|
14302
14294
|
/**
|
|
14303
14295
|
* A factory for generating a unique model identifier.
|
|
@@ -15149,6 +15141,44 @@ function performTasksFromFactoryInParallelFunction(config) {
|
|
|
15149
15141
|
};
|
|
15150
15142
|
}
|
|
15151
15143
|
|
|
15144
|
+
/**
|
|
15145
|
+
* Function that uses an array of Factories to produce Promises, one after the other, to attempt to return the value.
|
|
15146
|
+
*
|
|
15147
|
+
* Returns a Maybe value of the expected output, and returns null if no factory/promise returns the intended value.
|
|
15148
|
+
*/
|
|
15149
|
+
|
|
15150
|
+
function tryWithPromiseFactoriesFunction(config) {
|
|
15151
|
+
const {
|
|
15152
|
+
promiseFactories,
|
|
15153
|
+
successOnMaybe: defaultSuccessOnMaybe,
|
|
15154
|
+
throwErrors: defaultThrowErrors
|
|
15155
|
+
} = config;
|
|
15156
|
+
return async (input, config) => {
|
|
15157
|
+
const {
|
|
15158
|
+
successOnMaybe: inputSuccessOnMaybe,
|
|
15159
|
+
throwErrors: inputThrowErrors
|
|
15160
|
+
} = config != null ? config : {};
|
|
15161
|
+
const successOnMaybe = inputSuccessOnMaybe != null ? inputSuccessOnMaybe : defaultSuccessOnMaybe;
|
|
15162
|
+
const throwErrors = inputThrowErrors != null ? inputThrowErrors : defaultThrowErrors;
|
|
15163
|
+
let result;
|
|
15164
|
+
for (let i = 0; i < promiseFactories.length; i += 1) {
|
|
15165
|
+
try {
|
|
15166
|
+
const nextPromise = promiseFactories[i](input);
|
|
15167
|
+
result = await nextPromise;
|
|
15168
|
+
if (result != null || successOnMaybe) {
|
|
15169
|
+
break; // end loop early
|
|
15170
|
+
}
|
|
15171
|
+
} catch (e) {
|
|
15172
|
+
if (throwErrors) {
|
|
15173
|
+
throw e; // throw the error if requested
|
|
15174
|
+
}
|
|
15175
|
+
}
|
|
15176
|
+
}
|
|
15177
|
+
|
|
15178
|
+
return result;
|
|
15179
|
+
};
|
|
15180
|
+
}
|
|
15181
|
+
|
|
15152
15182
|
/**
|
|
15153
15183
|
* Uses a cached promise value.
|
|
15154
15184
|
*/
|
|
@@ -16996,4 +17026,4 @@ async function iterateFilteredPages(inputPage, loadFn, iterFn) {
|
|
|
16996
17026
|
return count;
|
|
16997
17027
|
}
|
|
16998
17028
|
|
|
16999
|
-
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, BooleanKeyArrayUtilityInstance, 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, 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, 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, mergeArrayIntoArray, mergeArrayOrValueIntoArray, mergeArrays, mergeArraysIntoArray, mergeFilterFunctions, mergeIntoArray, 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, 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 };
|
|
17029
|
+
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, BooleanKeyArrayUtilityInstance, 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, 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 };
|
package/package.json
CHANGED
package/src/lib/array/array.d.ts
CHANGED
|
@@ -118,15 +118,3 @@ export declare function forEachWithArray<T>(array: Maybe<ArrayOrValue<T>>, forEa
|
|
|
118
118
|
* @returns
|
|
119
119
|
*/
|
|
120
120
|
export declare function countAllInNestedArray<T>(array: T[][]): number;
|
|
121
|
-
/**
|
|
122
|
-
* @deprecated Use mergeArraysIntoArray() instead. Will be removed in v10.1.
|
|
123
|
-
*/
|
|
124
|
-
export declare const mergeIntoArray: typeof mergeArraysIntoArray;
|
|
125
|
-
/**
|
|
126
|
-
* @deprecated Use pushArrayItemsIntoArray() instead. Will be removed in v10.1.
|
|
127
|
-
*/
|
|
128
|
-
export declare const mergeArrayIntoArray: typeof pushArrayItemsIntoArray;
|
|
129
|
-
/**
|
|
130
|
-
* @deprecated Use pushArrayItemsOrItemIntoArray() instead. Will be removed in v10.1.
|
|
131
|
-
*/
|
|
132
|
-
export declare const mergeArrayOrValueIntoArray: typeof pushItemOrArrayItemsIntoArray;
|
package/src/lib/date/date.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type DateHourMinuteOrSecond = 'hour' | 'minute' | 'second';
|
|
|
14
14
|
*/
|
|
15
15
|
export type ISO8601DateString = string;
|
|
16
16
|
/**
|
|
17
|
-
* TODO: Need to improve to support negative years.
|
|
17
|
+
* TODO(FUTURE): Need to improve to support negative years.
|
|
18
18
|
*/
|
|
19
19
|
export declare const ISO_8601_DATE_STRING_REGEX: RegExp;
|
|
20
20
|
export declare function isISO8601DateString(input: string): input is ISO8601DateString;
|
|
@@ -225,3 +225,10 @@ export declare function isDate(value: unknown): value is Date;
|
|
|
225
225
|
* @returns
|
|
226
226
|
*/
|
|
227
227
|
export declare function isEqualDate(a: Date, b: Date): boolean;
|
|
228
|
+
/**
|
|
229
|
+
* Returns true if the input date is in the past.
|
|
230
|
+
*
|
|
231
|
+
* @param input
|
|
232
|
+
* @returns
|
|
233
|
+
*/
|
|
234
|
+
export declare function isPast(input: Date): boolean;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type FactoryWithRequiredInput } from '../getter/getter';
|
|
2
|
+
import { type Maybe } from '../value/maybe.type';
|
|
3
|
+
/**
|
|
4
|
+
* Function that uses an array of Factories to produce Promises, one after the other, to attempt to return the value.
|
|
5
|
+
*
|
|
6
|
+
* Returns a Maybe value of the expected output, and returns null if no factory/promise returns the intended value.
|
|
7
|
+
*/
|
|
8
|
+
export type TryWithPromiseFactoriesFunction<I, O> = (input: I, config?: TryWithPromiseFactoriesFunctionOptionalConfig<I, O>) => Promise<Maybe<O>>;
|
|
9
|
+
export interface TryWithPromiseFactoriesFunctionOptionalConfig<I, O> {
|
|
10
|
+
/**
|
|
11
|
+
* Whether or not to return a Maybe value if it is returned by one of the created promises.
|
|
12
|
+
*
|
|
13
|
+
* Defaults to false.
|
|
14
|
+
*/
|
|
15
|
+
readonly successOnMaybe?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Whether or not to throw errors.
|
|
18
|
+
*
|
|
19
|
+
* Defaults to false.
|
|
20
|
+
*/
|
|
21
|
+
readonly throwErrors?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface TryWithPromiseFactoriesFunctionConfig<I, O> extends TryWithPromiseFactoriesFunctionOptionalConfig<I, O> {
|
|
24
|
+
/**
|
|
25
|
+
* Factories used to create new Promise valeus to test.
|
|
26
|
+
*
|
|
27
|
+
* Promises are generated one at a time.
|
|
28
|
+
*
|
|
29
|
+
* I.E. if the first factory's generated promise returns a non-successful value or throws an error, the next promise will be generated and tried.
|
|
30
|
+
*/
|
|
31
|
+
readonly promiseFactories: FactoryWithRequiredInput<Promise<Maybe<O>>, I>[];
|
|
32
|
+
}
|
|
33
|
+
export declare function tryWithPromiseFactoriesFunction<I, O>(config: TryWithPromiseFactoriesFunctionConfig<I, O>): TryWithPromiseFactoriesFunction<I, O>;
|
package/src/lib/value/point.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export interface LatLngPoint {
|
|
|
22
22
|
/**
|
|
23
23
|
* A point decorated as LonLat.
|
|
24
24
|
*
|
|
25
|
-
* NOTE: This library prefers the use of LatLngPoint over LonLatPoint. This is only provided as compatability for libraries (like Mapbox) that have LonLat-like points
|
|
25
|
+
* NOTE: This library (dbx-components) prefers the use of LatLngPoint over LonLatPoint. This is only provided as compatability for libraries (like Mapbox) that have LonLat-like points
|
|
26
26
|
*/
|
|
27
27
|
export interface LonLatPoint {
|
|
28
28
|
lat: Latitude;
|
package/test/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
# [11.0.0](https://github.com/dereekb/dbx-components/compare/v10.2.0-dev...v11.0.0) (2024-11-12)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
5
9
|
# [10.2.0](https://github.com/dereekb/dbx-components/compare/v10.1.30-dev...v10.2.0) (2024-11-07)
|
|
6
10
|
|
|
7
11
|
|
package/test/package.json
CHANGED
|
@@ -44,7 +44,7 @@ class JestUnexpectedSuccessFailureError extends make_error_1.BaseError {
|
|
|
44
44
|
}
|
|
45
45
|
exports.JestUnexpectedSuccessFailureError = JestUnexpectedSuccessFailureError;
|
|
46
46
|
function failDueToSuccessError(message) {
|
|
47
|
-
return new JestUnexpectedSuccessFailureError(message
|
|
47
|
+
return new JestUnexpectedSuccessFailureError(message ?? 'expected an error to occur but was successful instead');
|
|
48
48
|
}
|
|
49
49
|
exports.failDueToSuccessError = failDueToSuccessError;
|
|
50
50
|
/**
|
|
@@ -52,7 +52,7 @@ exports.failDueToSuccessError = failDueToSuccessError;
|
|
|
52
52
|
*/
|
|
53
53
|
class JestExpeectedErrorOfSpecificTypeError extends make_error_1.BaseError {
|
|
54
54
|
constructor(encounteredType, expectedType) {
|
|
55
|
-
super(`The error encountered was not of the expected type. Expected: ${expectedType
|
|
55
|
+
super(`The error encountered was not of the expected type. Expected: ${expectedType ?? 'n/a'}, but encountered: ${encounteredType} `);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
exports.JestExpeectedErrorOfSpecificTypeError = JestExpeectedErrorOfSpecificTypeError;
|
|
@@ -97,7 +97,7 @@ function expectFail(errorFn, assertFailType) {
|
|
|
97
97
|
throw e;
|
|
98
98
|
}
|
|
99
99
|
else {
|
|
100
|
-
const assertionResult = assertFailType
|
|
100
|
+
const assertionResult = assertFailType?.(e);
|
|
101
101
|
if (assertionResult === false) {
|
|
102
102
|
throw new JestExpeectedErrorOfSpecificTypeError(e);
|
|
103
103
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jest.fail.js","sourceRoot":"","sources":["../../../../../../packages/util/test/src/lib/jest.fail.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,wCAAgJ;AAChJ,2CAAoD;AAapD;;;;GAIG;AACH,SAAgB,wBAAwB,CAAC,IAAsB,EAAE,IAAa,IAAI,KAAK,CAAC,aAAa,CAAC;IACpG,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE;QACrB,IAAI,CAAC,IAAI,CAAC,CAAU,CAAC,CAAC;KACvB;SAAM;QACL,IAAI,CAAC,CAAC,CAAC,CAAC;KACT;AACH,CAAC;AAND,4DAMC;AAKD,eAAe;AACf;;GAEG;AACH,MAAa,qBAAsB,SAAQ,sBAAS;CAAG;AAAvD,sDAAuD;AAEvD,SAAgB,qBAAqB,CAAC,OAAgB;IACpD,OAAO,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC;AAFD,sDAEC;AAED,SAAgB,gBAAgB,CAAC,OAAgB;IAC/C,MAAM,qBAAqB,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC;AAFD,4CAEC;AAED;;GAEG;AACH,MAAa,iCAAkC,SAAQ,sBAAS;CAAG;AAAnE,8EAAmE;AAEnE,SAAgB,qBAAqB,CAAC,OAAgB;IACpD,OAAO,IAAI,iCAAiC,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"jest.fail.js","sourceRoot":"","sources":["../../../../../../packages/util/test/src/lib/jest.fail.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,wCAAgJ;AAChJ,2CAAoD;AAapD;;;;GAIG;AACH,SAAgB,wBAAwB,CAAC,IAAsB,EAAE,IAAa,IAAI,KAAK,CAAC,aAAa,CAAC;IACpG,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE;QACrB,IAAI,CAAC,IAAI,CAAC,CAAU,CAAC,CAAC;KACvB;SAAM;QACL,IAAI,CAAC,CAAC,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KAAK,QAAQ,EAAE;QACpC,WAAW,GAAG,eAAe,YAAY,EAAE,CAAC;KAC7C;SAAM;QACL,EAAE,GAAG,YAAY,CAAC;QAClB,WAAW,GAAG,aAAa,CAAC;KAC7B;IAED,EAAE,CAAC,WAAW,EAAE,UAAU,CAAC,EAAoC,CAAC,CAAC,CAAC;AACpE,CAAC;AAXD,oCAWC;AAOD,SAAgB,eAAe;IAC7B,MAAM,UAAU,GAAG,IAAA,uBAAgB,GAAE,CAAC;IAEtC,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,CAAC;IACvC,MAAM,WAAW,GAAG,CAAC,CAAU,EAAE,EAAE;QACjC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC,CAAC;IAEF,MAAM,QAAQ,GAAkC,CAAC,KAAoC,EAAE,EAAE;QACvF,IAAI,KAAK,EAAE;YACT,WAAW,CAAC,KAAK,CAAC,CAAC;SACpB;aAAM;YACL,WAAW,CAAC,CAAC,CAAC,CAAC;SAChB;IACH,CAAC,CAAC;IAEF,QAAQ,CAAC,IAAI,GAAG,CAAC,KAAoC,EAAE,EAAE;QACvD,WAAW,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC,CAAC;IAEF,QAAQ,CAAC,IAAI,GAAG,UAAU,CAAC;IAC3B,QAAQ,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;IACtC,QAAQ,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;IACtC,QAAQ,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAEpC,OAAO,QAA+B,CAAC;AACzC,CAAC;AA1BD,0CA0BC"}
|
package/test/src/lib/jest.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useJestContextFixture = exports.jestTestContextBuilder = exports.AbstractChildJestTestContextFixture = exports.AbstractJestTestContextFixture = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
/**
|
|
6
5
|
* Abstract JestTestContextFixture instance.
|
|
7
6
|
*/
|
|
8
7
|
class AbstractJestTestContextFixture {
|
|
8
|
+
_instance;
|
|
9
9
|
get instance() {
|
|
10
10
|
return this._instance;
|
|
11
11
|
}
|
|
@@ -24,6 +24,7 @@ exports.AbstractJestTestContextFixture = AbstractJestTestContextFixture;
|
|
|
24
24
|
* Abstract JestTestContextFixture instance with a parent.
|
|
25
25
|
*/
|
|
26
26
|
class AbstractChildJestTestContextFixture extends AbstractJestTestContextFixture {
|
|
27
|
+
parent;
|
|
27
28
|
constructor(parent) {
|
|
28
29
|
super();
|
|
29
30
|
this.parent = parent;
|
|
@@ -73,9 +74,9 @@ function useJestContextFixture(config) {
|
|
|
73
74
|
let clearInstance;
|
|
74
75
|
let instance;
|
|
75
76
|
// Create an instance
|
|
76
|
-
beforeEach(() =>
|
|
77
|
+
beforeEach(async () => {
|
|
77
78
|
try {
|
|
78
|
-
instance =
|
|
79
|
+
instance = await initInstance();
|
|
79
80
|
clearInstance = fixture.setInstance(instance);
|
|
80
81
|
}
|
|
81
82
|
catch (e) {
|
|
@@ -85,11 +86,11 @@ function useJestContextFixture(config) {
|
|
|
85
86
|
}
|
|
86
87
|
throw e;
|
|
87
88
|
}
|
|
88
|
-
})
|
|
89
|
+
});
|
|
89
90
|
// Declare tests
|
|
90
91
|
buildTests(fixture);
|
|
91
92
|
// Cleanup
|
|
92
|
-
afterEach(() =>
|
|
93
|
+
afterEach(async () => {
|
|
93
94
|
if (clearInstance) {
|
|
94
95
|
clearInstance();
|
|
95
96
|
}
|
|
@@ -98,7 +99,7 @@ function useJestContextFixture(config) {
|
|
|
98
99
|
}
|
|
99
100
|
if (destroyInstance) {
|
|
100
101
|
try {
|
|
101
|
-
|
|
102
|
+
await destroyInstance(instance);
|
|
102
103
|
instance = undefined;
|
|
103
104
|
}
|
|
104
105
|
catch (e) {
|
|
@@ -106,7 +107,7 @@ function useJestContextFixture(config) {
|
|
|
106
107
|
throw e;
|
|
107
108
|
}
|
|
108
109
|
}
|
|
109
|
-
})
|
|
110
|
+
});
|
|
110
111
|
}
|
|
111
112
|
exports.useJestContextFixture = useJestContextFixture;
|
|
112
113
|
//# sourceMappingURL=jest.js.map
|
package/test/src/lib/jest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jest.js","sourceRoot":"","sources":["../../../../../../packages/util/test/src/lib/jest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jest.js","sourceRoot":"","sources":["../../../../../../packages/util/test/src/lib/jest.ts"],"names":[],"mappings":";;;AAkCA;;GAEG;AACH,MAAsB,8BAA8B;IAC1C,SAAS,CAAK;IAEtB,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,SAAU,CAAC;IACzB,CAAC;IAED,WAAW,CAAC,QAAW;QACrB,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,EAAE;YAC1B,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;SACtF;QAED,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAE1B,OAAO,GAAG,EAAE;YACV,OAAO,IAAI,CAAC,SAAS,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC;CACF;AAlBD,wEAkBC;AAED;;GAEG;AACH,MAAsB,mCAA8E,SAAQ,8BAAiC;IACtH;IAArB,YAAqB,MAAS;QAC5B,KAAK,EAAE,CAAC;QADW,WAAM,GAAN,MAAM,CAAG;IAE9B,CAAC;CACF;AAJD,kFAIC;AAkDD;;;;;GAKG;AACH,SAAgB,sBAAsB,CAA4C,OAA8C;IAC9H,OAAO,CAAC,WAAwB,EAAE,EAAE;QAClC,MAAM,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAEhD,OAAO,CAAC,UAAgD,EAAE,EAAE;YAC1D,MAAM,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,CA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AI,aAAa,EAAE;YACjB,aAAa,EAAE,CAAC;SACjB;QAED,IAAI,OAAO,CAAC,QAAQ,IAAI,IAAI,EAAE;YAC5B,OAAO,CAAC,IAAI,CAAC,mFAAmF,CAAC,CAAC;SACnG;QAED,IAAI,eAAe,EAAE;YACnB,IAAI;gBACF,MAAM,eAAe,CAAC,QAAQ,CAAC,CAAC;gBAChC,QAAQ,GAAG,SAAgB,CAAC;aAC7B;YAAC,OAAO,CAAC,EAAE;gBACV,OAAO,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;gBAC1D,MAAM,CAAC,CAAC;aACT;SACF;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AA7CD,sDA6CC"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.instanceWrapJestTestContextFactory = exports.wrapJestTestContextFactory = exports.AbstractWrappedFixtureWithInstance = exports.AbstractWrappedFixture = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const jest_1 = require("./jest");
|
|
6
5
|
class AbstractWrappedFixture {
|
|
6
|
+
fixture;
|
|
7
7
|
constructor(fixture) {
|
|
8
8
|
this.fixture = fixture;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
exports.AbstractWrappedFixture = AbstractWrappedFixture;
|
|
12
12
|
class AbstractWrappedFixtureWithInstance extends jest_1.AbstractJestTestContextFixture {
|
|
13
|
+
parent;
|
|
13
14
|
constructor(parent) {
|
|
14
15
|
super();
|
|
15
16
|
this.parent = parent;
|
|
@@ -29,17 +30,17 @@ function wrapJestTestContextFactory(config) {
|
|
|
29
30
|
let effect;
|
|
30
31
|
// add before each
|
|
31
32
|
if (config.setupWrap != null) {
|
|
32
|
-
beforeEach(() =>
|
|
33
|
-
effect =
|
|
34
|
-
})
|
|
33
|
+
beforeEach(async () => {
|
|
34
|
+
effect = await config.setupWrap(wrap);
|
|
35
|
+
});
|
|
35
36
|
}
|
|
36
37
|
// add tests
|
|
37
38
|
buildTests(wrap);
|
|
38
39
|
// add after each
|
|
39
40
|
if (config.teardownWrap != null) {
|
|
40
|
-
afterEach(() =>
|
|
41
|
-
|
|
42
|
-
})
|
|
41
|
+
afterEach(async () => {
|
|
42
|
+
await config.teardownWrap(wrap, effect);
|
|
43
|
+
});
|
|
43
44
|
}
|
|
44
45
|
});
|
|
45
46
|
};
|
|
@@ -49,20 +50,20 @@ exports.wrapJestTestContextFactory = wrapJestTestContextFactory;
|
|
|
49
50
|
function instanceWrapJestTestContextFactory(config) {
|
|
50
51
|
return wrapJestTestContextFactory({
|
|
51
52
|
wrapFixture: config.wrapFixture,
|
|
52
|
-
setupWrap: (wrap) =>
|
|
53
|
-
const instance =
|
|
53
|
+
setupWrap: async (wrap) => {
|
|
54
|
+
const instance = await config.makeInstance(wrap);
|
|
54
55
|
const effect = wrap.setInstance(instance);
|
|
55
56
|
if (config.setupInstance) {
|
|
56
|
-
|
|
57
|
+
await config.setupInstance(instance, wrap);
|
|
57
58
|
}
|
|
58
59
|
return effect;
|
|
59
|
-
}
|
|
60
|
-
teardownWrap: (wrap, deleteInstanceEffect) =>
|
|
61
|
-
deleteInstanceEffect
|
|
60
|
+
},
|
|
61
|
+
teardownWrap: async (wrap, deleteInstanceEffect) => {
|
|
62
|
+
deleteInstanceEffect?.();
|
|
62
63
|
if (config.teardownInstance) {
|
|
63
|
-
|
|
64
|
+
await config.teardownInstance(wrap.instance);
|
|
64
65
|
}
|
|
65
|
-
}
|
|
66
|
+
}
|
|
66
67
|
});
|
|
67
68
|
}
|
|
68
69
|
exports.instanceWrapJestTestContextFactory = instanceWrapJestTestContextFactory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jest.wrap.js","sourceRoot":"","sources":["../../../../../../packages/util/test/src/lib/jest.wrap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jest.wrap.js","sourceRoot":"","sources":["../../../../../../packages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