inferred-types 0.55.0 → 0.55.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -129,6 +129,13 @@ type AnyObject = Dictionary | EmptyObject | ExplicitlyEmptyObject;
129
129
  */
130
130
  type Container = Dictionary | readonly unknown[] | Map<unknown, unknown> | WeakMap<object, unknown> | Set<unknown> | object;
131
131
 
132
+ /**
133
+ * **Empty**
134
+ *
135
+ * values/types considered to be "empty"
136
+ */
137
+ type Empty = undefined | null | EmptyObject | [] | "";
138
+
132
139
  /**
133
140
  * **FalsyValue**
134
141
  *
@@ -11806,7 +11813,7 @@ declare function getYesterday(): Iso8601Date<"explicit">;
11806
11813
  */
11807
11814
  declare function isLeapYear(val: NumberLike | Record<string, any> | Date | number): boolean;
11808
11815
 
11809
- type Returns$2<T extends DefineObject, P extends readonly (keyof T & string)[]> = P["length"] extends 0 ? FromDefineObject<T> : MakeKeysOptional<T, P> extends DefineObject ? FromDefineObject<MakeKeysOptional<T, P>> : never;
11816
+ type Returns$4<T extends DefineObject, P extends readonly (keyof T & string)[]> = P["length"] extends 0 ? FromDefineObject<T> : MakeKeysOptional<T, P> extends DefineObject ? FromDefineObject<MakeKeysOptional<T, P>> : never;
11810
11817
  /**
11811
11818
  * Takes an object definition where the values are either
11812
11819
  * `SimpleToken` representations of a type or a `ShapeCallback`.
@@ -11814,7 +11821,7 @@ type Returns$2<T extends DefineObject, P extends readonly (keyof T & string)[]>
11814
11821
  * In both cases the runtime type is left unchanged but the
11815
11822
  * type is converted to represent the designed object shape.
11816
11823
  */
11817
- declare function defineObject<T extends DefineObject, P extends readonly (keyof T & string)[]>(defn: T, ..._optProps: P): Returns$2<T, P>;
11824
+ declare function defineObject<T extends DefineObject, P extends readonly (keyof T & string)[]>(defn: T, ..._optProps: P): Returns$4<T, P>;
11818
11825
 
11819
11826
  /**
11820
11827
  * **entries**
@@ -12492,14 +12499,14 @@ type _Index<T extends readonly string[], IF, ELSE, Results extends readonly unkn
12492
12499
  ...Results,
12493
12500
  If<Extends<T, LowerAlphaChar>, IF, ELSE>
12494
12501
  ]>;
12495
- type Returns$1<T extends string | readonly string[], IF, ELSE> = T extends string ? If<Extends<T, LowerAlphaChar>, IF, ELSE> : T extends readonly string[] ? _Index<T, IF, ELSE> : never;
12502
+ type Returns$3<T extends string | readonly string[], IF, ELSE> = T extends string ? If<Extends<T, LowerAlphaChar>, IF, ELSE> : T extends readonly string[] ? _Index<T, IF, ELSE> : never;
12496
12503
  /**
12497
12504
  * **ifLowercaseChar**(ch)
12498
12505
  *
12499
12506
  * Tests whether a passed in character is lowercase and then uses the appropriate callback to
12500
12507
  * mutate the value.
12501
12508
  */
12502
- declare function ifLowercaseChar<T extends string, IF, ELSE>(ch: T, callbackForMatch: <V extends T>(v: V) => IF, callbackForNoMatch: <V extends T>(v: V) => ELSE): Returns$1<T, IF, ELSE>;
12509
+ declare function ifLowercaseChar<T extends string, IF, ELSE>(ch: T, callbackForMatch: <V extends T>(v: V) => IF, callbackForNoMatch: <V extends T>(v: V) => ELSE): Returns$3<T, IF, ELSE>;
12503
12510
 
12504
12511
  type Convert<T, IF, ELSE> = If<Extends<T, UpperAlphaChar>, IF, ELSE>;
12505
12512
  /**
@@ -12555,7 +12562,7 @@ interface GetInferenceProps<TPattern extends string> {
12555
12562
  typeWide: WiderTypeLiteral<TPattern>;
12556
12563
  }
12557
12564
  type GetInference<TPattern extends string> = (<T extends string>(test: T) => T extends TypeLiteral<TPattern> ? Shape<TPattern> : false | Shape<TPattern>) & GetInferenceProps<TPattern>;
12558
- type Returns<T extends string> = IsDynamic<T> extends true ? GetInference<T> : never;
12565
+ type Returns$2<T extends string> = IsDynamic<T> extends true ? GetInference<T> : never;
12559
12566
  /**
12560
12567
  * **infer**`(pattern)`
12561
12568
  *
@@ -12575,7 +12582,7 @@ type Returns<T extends string> = IsDynamic<T> extends true ? GetInference<T> : n
12575
12582
  * const {foo} = matcher("foo-bar");
12576
12583
  * ```
12577
12584
  */
12578
- declare function infer<TTempl extends string>(inference: TTempl): Returns<TTempl>;
12585
+ declare function infer<TTempl extends string>(inference: TTempl): Returns$2<TTempl>;
12579
12586
 
12580
12587
  /**
12581
12588
  * Takes an object as input --which has an `id` property and returns it as the same
@@ -12815,13 +12822,14 @@ declare function stripBefore<TContent extends string, TBreak extends string>(con
12815
12822
  */
12816
12823
  declare function stripChars<TContent extends string, TRetain extends readonly string[]>(content: TContent, ...strip: TRetain): StripChars<TContent, TRetain[number]>;
12817
12824
 
12825
+ type Returns$1<T extends string | number | undefined, U extends readonly (string | number)[]> = T extends undefined ? undefined : T extends string | number ? StripLeading<T, TupleToUnion<U>> : never;
12818
12826
  /**
12819
12827
  * **stripLeading**(content, ...strip)
12820
12828
  *
12821
12829
  * Runtime utility which strips of a leading substring from the
12822
12830
  * primary content if it exists and leaves content unchanged otherwise.
12823
12831
  */
12824
- declare function stripLeading<T extends string | number, U extends readonly (string | number)[]>(content: T, ...strip: U): StripLeading<T, TupleToUnion<U>>;
12832
+ declare function stripLeading<T extends string | number | undefined, U extends readonly (string | number)[]>(content: T, ...strip: U): Returns$1<T, U>;
12825
12833
 
12826
12834
  type StripSurroundConfigured<TStrip extends readonly (string | number)[]> = <TInput extends string | number>(input: TInput) => StripSurround<TInput, TStrip[number]>;
12827
12835
  /**
@@ -12841,13 +12849,14 @@ type StripSurroundConfigured<TStrip extends readonly (string | number)[]> = <TIn
12841
12849
  */
12842
12850
  declare function stripSurround<TChars extends readonly (number | string)[]>(...chars: TChars): StripSurroundConfigured<TChars>;
12843
12851
 
12852
+ type Returns<T extends string | number | undefined, U extends readonly (string | number)[]> = T extends undefined ? undefined : T extends string | number ? StripTrailing<T, TupleToUnion<U>> : never;
12844
12853
  /**
12845
12854
  * **stripTrailing**(content, strip)
12846
12855
  *
12847
12856
  * Runtime utility which ensures that last part of a string has substring
12848
12857
  * removed if it exists and that strong typing is preserved.
12849
12858
  */
12850
- declare function stripTrailing<T extends string | number, U extends readonly (string | number)[]>(content: T, ...strip: U): StripTrailing<T, TupleToUnion<U>>;
12859
+ declare function stripTrailing<T extends string | number | undefined, U extends readonly (string | number)[]>(content: T, ...strip: U): Returns<T, U>;
12851
12860
 
12852
12861
  /**
12853
12862
  * **stripUntil**`(content, ...until)`
@@ -14077,6 +14086,18 @@ declare function isDoneFn<T>(val: T): val is AsDoneFn<T>;
14077
14086
  */
14078
14087
  declare function isEmail(val: unknown): val is Email;
14079
14088
 
14089
+ /**
14090
+ * **isEmpty**(val)
14091
+ *
14092
+ * type guard which validates that `val` is an `Empty` value:
14093
+ *
14094
+ * - `null` or `undefined`
14095
+ * - empty string
14096
+ * - empty array
14097
+ * - empty object
14098
+ */
14099
+ declare function isEmpty<T>(val: T): val is T & Empty;
14100
+
14080
14101
  /**
14081
14102
  * **isErrorCondition**(value)
14082
14103
  *
@@ -15186,4 +15207,4 @@ declare function isYouTubeVideosInPlaylist<T>(val: T): val is T & YouTubeVideosI
15186
15207
  */
15187
15208
  declare function asVueRef<T extends Narrowable>(value: T): VueRef<T>;
15188
15209
 
15189
- export { type AsClassSelector, type AsList, type BoxValue, type BoxedFnParams, type ConfigRestApi, type CssKeyframeCallback, type CssSelectorOptions, type CsvFormat, type DictionaryWithValueFilter, type DictionaryWithoutValueFilter, type EndingWithTypeGuard, type EndpointGenerator, type EqualTo, type Finder, type FnParam, type FnParams, type GenParam, type GenParams, type GetEachOptions, type GetInference, type GetInferenceProps, type GetOptions, type Joiner, type KeyframeApi, type Mapper, type Rtn, ShapeApiImplementation, type SingletonClosure, type StartingWithTypeGuard, type StripSurroundConfigured, type SurroundWith, type TokenContainerClosure, type TokenFunctionClosure, type TokenSetClosure, type TypeOfTypeGuard, type Unbox, type UndefinedArrayIsUnknown, type UnionClosure, type UrlMeta, type YouTubeMeta, addFnToProps, addPropsToFn, and, asApi, asArray, asChars, asDate, asEscapeFunction, asIsoDate, asOptionalParamFunction, asPhoneFormat, asRecord, asString, asStringLiteral, asType, asTypeToken, asVueRef, box, boxDictionaryValues, capitalize, choices, createConverter, createCssKeyframe, createCssSelector, createErrorCondition, createFifoQueue, createFixedLengthArray, createFnWithProps, createFnWithPropsExplicit, createLifoQueue, createMapper, createObjectMap, createTypeToken, cssColor, csv, defineCss, defineObj, defineObject, defineObjectApi, defineTuple, endsWith, ensureLeading, ensureSurround, ensureTrailing, entries, errCondition, filter, find, fnMeta, fromDefineObject, get, getDaysBetween, getEach, getPhoneCountryCode, getTailwindModifiers, getToday, getTokenKind, getTomorrow, getTypeSubtype, getUrlBase, getUrlDefaultPort, getUrlDynamics, getUrlPath, getUrlPort, getUrlProtocol, getUrlQueryParams, getUrlSource, getWeekNumber, getYesterday, getYouTubePageType, handleDoneFn, hasDefaultValue, hasIndexOf, hasKeys, hasOverlappingKeys, hasProtocol, hasProtocolPrefix, hasUrlPort, hasUrlQueryParameter, hasWhiteSpace, idLiteral, idTypeGuard, identity, ifArray, ifArrayPartial, ifBoolean, ifChar, ifContainer, ifDefined, ifFalse, ifFunction, ifHasKey, ifLength, ifLowercaseChar, ifNotNull, ifNull, ifNumber, ifObject, ifSameType, ifScalar, ifString, ifTrue, ifUndefined, ifUppercaseChar, indexOf, infer, intersect, intersection, ip6GroupExpansion, ip6Prefix, isAccelerationMetric, isAccelerationUom, isAlpha, isAmazonUrl, isApi, isApiSurface, isAppleUrl, isAreaMetric, isAreaUom, isArray, isArrayToken, isAtomicKind, isAtomicToken, isAustralianNewsUrl, isBelgiumNewsUrl, isBestBuyUrl, isBitbucketUrl, isBoolean, isBooleanLike, isBox, isCanadianNewsUrl, isChineseNewsUrl, isCodeCommitUrl, isConstant, isContainer, isContainerToken, isCostCoUrl, isCountryAbbrev, isCountryCode2, isCountryCode3, isCountryName, isCssAspectRatio, isCsv, isCurrentMetric, isCurrentUom, isCvsUrl, isDanishNewsUrl, isDate, isDefineObject, isDefined, isDellUrl, isDistanceMetric, isDistanceUom, isDomainName, isDoneFn, isDutchNewsUrl, isEbayUrl, isEmail, isEnergyMetric, isEnergyUom, isEqual, isErrorCondition, isEscapeFunction, isEtsyUrl, isFalse, isFalsy, isFnBasedKind, isFnBasedToken, isFnWithParams, isFrenchNewsUrl, isFrequencyMetric, isFrequencyUom, isFunction, isGermanNewsUrl, isGithubIssueUrl, isGithubIssuesListUrl, isGithubOrgUrl, isGithubProjectUrl, isGithubProjectsListUrl, isGithubReleaseTagUrl, isGithubReleasesListUrl, isGithubRepoReleaseTagUrl, isGithubRepoReleasesUrl, isGithubRepoUrl, isGithubUrl, isHexadecimal, isHmUrl, isHomeDepotUrl, isHtmlElement, isIkeaUrl, isIndexable, isIndianNewsUrl, isInlineSvg, isIp4Address, isIp6Address, isIpAddress, isIso3166Alpha2, isIso3166Alpha3, isIso3166CountryCode, isIso3166CountryName, isIsoDate, isIsoDateTime, isIsoExplicitDate, isIsoExplicitTime, isIsoImplicitDate, isIsoImplicitTime, isIsoTime, isIsoYear, isItalianNewsUrl, isJapaneseNewsUrl, isKrogersUrl, isLeapYear, isLength, isLikeRegExp, isLowesUrl, isLuminosityMetric, isLuminosityUom, isLuxonDateTime, isMacysUrl, isMap, isMapToken, isMassMetric, isMassUom, isMetric, isMexicanNewsUrl, isMoment, isNarrowableObject, isNever, isNewsUrl, isNikeUrl, isNorwegianNewsUrl, isNotNull, isNothing, isNull, isNumber, isNumberLike, isNumericArray, isNumericString, isObject, isObjectToken, isOptionalParamFunction, isPhoneNumber, isPowerMetric, isPowerUom, isPressureMetric, isPressureUom, isProtocol, isProtocolPrefix, isReadonlyArray, isRecordToken, isRef, isRegExp, isRepoSource, isRepoUrl, isResistance, isResistanceUom, isRetailUrl, isSameTypeOf, isScalar, isSemanticVersion, isSet, isSetBasedKind, isSetBasedToken, isSetContainer, isSetToken, isShape, isShapeCallback, isSimpleContainerToken, isSimpleContainerTokenTuple, isSimpleScalarToken, isSimpleScalarTokenTuple, isSimpleToken, isSimpleTokenTuple, isSingletonKind, isSingletonToken, isSocialMediaProfileUrl, isSocialMediaUrl, isSouthKoreanNewsUrl, isSpanishNewsUrl, isSpecificConstant, isSpeedMetric, isSpeedUom, isString, isStringArray, isSwissNewsUrl, isSymbol, isTailwindColor, isTailwindColorClass, isTailwindColorName, isTailwindColorTarget, isTailwindColorWithLuminosity, isTailwindColorWithLuminosityAndOpacity, isTailwindModifier, isTargetUrl, isTemperatureMetric, isTemperatureUom, isThenable, isThisMonth, isThisWeek, isThisYear, isTimeMetric, isTimeUom, isToday, isTomorrow, isTrimable, isTrue, isTruthy, isTuple, isTupleToken, isTurkishNewsUrl, isTypeOf, isTypeSubtype, isTypeToken, isTypeTokenKind, isTypeTuple, isUkNewsUrl, isUndefined, isUnset, isUom, isUri, isUrl, isUrlPath, isUrlSource, isUsNewsUrl, isUsStateAbbreviation, isUsStateName, isVariable, isVoltageMetric, isVoltageUom, isVolumeMetric, isVolumeUom, isWalgreensUrl, isWalmartUrl, isWayfairUrl, isWholeFoodsUrl, isYesterday, isYouTubeCreatorUrl, isYouTubeFeedHistoryUrl, isYouTubeFeedUrl, isYouTubePlaylistUrl, isYouTubePlaylistsUrl, isYouTubeShareUrl, isYouTubeSubscriptionsUrl, isYouTubeTrendingUrl, isYouTubeUrl, isYouTubeVideoUrl, isYouTubeVideosInPlaylist, isZaraUrl, isZipCode, isZipCode5, isZipPlus4, joinWith, jsonValue, jsonValues, keysOf, kindLiteral, last, list, literal, logicalReturns, lookupCountryAlpha2, lookupCountryAlpha3, lookupCountryCode, lookupCountryName, lowercase, mergeObjects, mergeScalars, mergeTuples, nameLiteral, narrow, narrowObjectTo, narrowObjectToType, never, objectToApi, objectValues, omit, optional, optionalOrNull, or, orNull, pathJoin, pluralize, removePhoneCountryCode, removeTailwindModifiers, removeUrlProtocol, result, retain, retainAfter, retainAfterInclusive, retainChars, retainUntil, retainUntilInclusive, retainWhile, reverse, rightWhitespace, shape, sharedKeys, shift, simpleContainerToken, simpleContainerTokenToTypeToken, simpleContainerType, simpleScalarToken, simpleScalarTokenToTypeToken, simpleScalarType, simpleToken, simpleType, simpleUnionTokenToTypeToken, slice, split, startsWith, stripAfter, stripBefore, stripChars, stripLeading, stripParenthesis, stripSurround, stripTrailing, stripUntil, stripWhile, surround, takeNumericCharacters, takeProp, toCamelCase, toKebabCase, toNumber, toNumericArray, toPascalCase, toSnakeCase, toString, toUppercase, trim, trimEnd, trimLeft, trimRight, trimStart, truncate, tuple, twColor, unbox, uncapitalize, union, unionize, unique, uniqueKeys, unset, uppercase, urlMeta, valuesOf, widen, withDefaults, withKeys, withValue, withoutKeys, withoutValue, wrapFn, youtubeEmbed, youtubeMeta };
15210
+ export { type AsClassSelector, type AsList, type BoxValue, type BoxedFnParams, type ConfigRestApi, type CssKeyframeCallback, type CssSelectorOptions, type CsvFormat, type DictionaryWithValueFilter, type DictionaryWithoutValueFilter, type EndingWithTypeGuard, type EndpointGenerator, type EqualTo, type Finder, type FnParam, type FnParams, type GenParam, type GenParams, type GetEachOptions, type GetInference, type GetInferenceProps, type GetOptions, type Joiner, type KeyframeApi, type Mapper, type Rtn, ShapeApiImplementation, type SingletonClosure, type StartingWithTypeGuard, type StripSurroundConfigured, type SurroundWith, type TokenContainerClosure, type TokenFunctionClosure, type TokenSetClosure, type TypeOfTypeGuard, type Unbox, type UndefinedArrayIsUnknown, type UnionClosure, type UrlMeta, type YouTubeMeta, addFnToProps, addPropsToFn, and, asApi, asArray, asChars, asDate, asEscapeFunction, asIsoDate, asOptionalParamFunction, asPhoneFormat, asRecord, asString, asStringLiteral, asType, asTypeToken, asVueRef, box, boxDictionaryValues, capitalize, choices, createConverter, createCssKeyframe, createCssSelector, createErrorCondition, createFifoQueue, createFixedLengthArray, createFnWithProps, createFnWithPropsExplicit, createLifoQueue, createMapper, createObjectMap, createTypeToken, cssColor, csv, defineCss, defineObj, defineObject, defineObjectApi, defineTuple, endsWith, ensureLeading, ensureSurround, ensureTrailing, entries, errCondition, filter, find, fnMeta, fromDefineObject, get, getDaysBetween, getEach, getPhoneCountryCode, getTailwindModifiers, getToday, getTokenKind, getTomorrow, getTypeSubtype, getUrlBase, getUrlDefaultPort, getUrlDynamics, getUrlPath, getUrlPort, getUrlProtocol, getUrlQueryParams, getUrlSource, getWeekNumber, getYesterday, getYouTubePageType, handleDoneFn, hasDefaultValue, hasIndexOf, hasKeys, hasOverlappingKeys, hasProtocol, hasProtocolPrefix, hasUrlPort, hasUrlQueryParameter, hasWhiteSpace, idLiteral, idTypeGuard, identity, ifArray, ifArrayPartial, ifBoolean, ifChar, ifContainer, ifDefined, ifFalse, ifFunction, ifHasKey, ifLength, ifLowercaseChar, ifNotNull, ifNull, ifNumber, ifObject, ifSameType, ifScalar, ifString, ifTrue, ifUndefined, ifUppercaseChar, indexOf, infer, intersect, intersection, ip6GroupExpansion, ip6Prefix, isAccelerationMetric, isAccelerationUom, isAlpha, isAmazonUrl, isApi, isApiSurface, isAppleUrl, isAreaMetric, isAreaUom, isArray, isArrayToken, isAtomicKind, isAtomicToken, isAustralianNewsUrl, isBelgiumNewsUrl, isBestBuyUrl, isBitbucketUrl, isBoolean, isBooleanLike, isBox, isCanadianNewsUrl, isChineseNewsUrl, isCodeCommitUrl, isConstant, isContainer, isContainerToken, isCostCoUrl, isCountryAbbrev, isCountryCode2, isCountryCode3, isCountryName, isCssAspectRatio, isCsv, isCurrentMetric, isCurrentUom, isCvsUrl, isDanishNewsUrl, isDate, isDefineObject, isDefined, isDellUrl, isDistanceMetric, isDistanceUom, isDomainName, isDoneFn, isDutchNewsUrl, isEbayUrl, isEmail, isEmpty, isEnergyMetric, isEnergyUom, isEqual, isErrorCondition, isEscapeFunction, isEtsyUrl, isFalse, isFalsy, isFnBasedKind, isFnBasedToken, isFnWithParams, isFrenchNewsUrl, isFrequencyMetric, isFrequencyUom, isFunction, isGermanNewsUrl, isGithubIssueUrl, isGithubIssuesListUrl, isGithubOrgUrl, isGithubProjectUrl, isGithubProjectsListUrl, isGithubReleaseTagUrl, isGithubReleasesListUrl, isGithubRepoReleaseTagUrl, isGithubRepoReleasesUrl, isGithubRepoUrl, isGithubUrl, isHexadecimal, isHmUrl, isHomeDepotUrl, isHtmlElement, isIkeaUrl, isIndexable, isIndianNewsUrl, isInlineSvg, isIp4Address, isIp6Address, isIpAddress, isIso3166Alpha2, isIso3166Alpha3, isIso3166CountryCode, isIso3166CountryName, isIsoDate, isIsoDateTime, isIsoExplicitDate, isIsoExplicitTime, isIsoImplicitDate, isIsoImplicitTime, isIsoTime, isIsoYear, isItalianNewsUrl, isJapaneseNewsUrl, isKrogersUrl, isLeapYear, isLength, isLikeRegExp, isLowesUrl, isLuminosityMetric, isLuminosityUom, isLuxonDateTime, isMacysUrl, isMap, isMapToken, isMassMetric, isMassUom, isMetric, isMexicanNewsUrl, isMoment, isNarrowableObject, isNever, isNewsUrl, isNikeUrl, isNorwegianNewsUrl, isNotNull, isNothing, isNull, isNumber, isNumberLike, isNumericArray, isNumericString, isObject, isObjectToken, isOptionalParamFunction, isPhoneNumber, isPowerMetric, isPowerUom, isPressureMetric, isPressureUom, isProtocol, isProtocolPrefix, isReadonlyArray, isRecordToken, isRef, isRegExp, isRepoSource, isRepoUrl, isResistance, isResistanceUom, isRetailUrl, isSameTypeOf, isScalar, isSemanticVersion, isSet, isSetBasedKind, isSetBasedToken, isSetContainer, isSetToken, isShape, isShapeCallback, isSimpleContainerToken, isSimpleContainerTokenTuple, isSimpleScalarToken, isSimpleScalarTokenTuple, isSimpleToken, isSimpleTokenTuple, isSingletonKind, isSingletonToken, isSocialMediaProfileUrl, isSocialMediaUrl, isSouthKoreanNewsUrl, isSpanishNewsUrl, isSpecificConstant, isSpeedMetric, isSpeedUom, isString, isStringArray, isSwissNewsUrl, isSymbol, isTailwindColor, isTailwindColorClass, isTailwindColorName, isTailwindColorTarget, isTailwindColorWithLuminosity, isTailwindColorWithLuminosityAndOpacity, isTailwindModifier, isTargetUrl, isTemperatureMetric, isTemperatureUom, isThenable, isThisMonth, isThisWeek, isThisYear, isTimeMetric, isTimeUom, isToday, isTomorrow, isTrimable, isTrue, isTruthy, isTuple, isTupleToken, isTurkishNewsUrl, isTypeOf, isTypeSubtype, isTypeToken, isTypeTokenKind, isTypeTuple, isUkNewsUrl, isUndefined, isUnset, isUom, isUri, isUrl, isUrlPath, isUrlSource, isUsNewsUrl, isUsStateAbbreviation, isUsStateName, isVariable, isVoltageMetric, isVoltageUom, isVolumeMetric, isVolumeUom, isWalgreensUrl, isWalmartUrl, isWayfairUrl, isWholeFoodsUrl, isYesterday, isYouTubeCreatorUrl, isYouTubeFeedHistoryUrl, isYouTubeFeedUrl, isYouTubePlaylistUrl, isYouTubePlaylistsUrl, isYouTubeShareUrl, isYouTubeSubscriptionsUrl, isYouTubeTrendingUrl, isYouTubeUrl, isYouTubeVideoUrl, isYouTubeVideosInPlaylist, isZaraUrl, isZipCode, isZipCode5, isZipPlus4, joinWith, jsonValue, jsonValues, keysOf, kindLiteral, last, list, literal, logicalReturns, lookupCountryAlpha2, lookupCountryAlpha3, lookupCountryCode, lookupCountryName, lowercase, mergeObjects, mergeScalars, mergeTuples, nameLiteral, narrow, narrowObjectTo, narrowObjectToType, never, objectToApi, objectValues, omit, optional, optionalOrNull, or, orNull, pathJoin, pluralize, removePhoneCountryCode, removeTailwindModifiers, removeUrlProtocol, result, retain, retainAfter, retainAfterInclusive, retainChars, retainUntil, retainUntilInclusive, retainWhile, reverse, rightWhitespace, shape, sharedKeys, shift, simpleContainerToken, simpleContainerTokenToTypeToken, simpleContainerType, simpleScalarToken, simpleScalarTokenToTypeToken, simpleScalarType, simpleToken, simpleType, simpleUnionTokenToTypeToken, slice, split, startsWith, stripAfter, stripBefore, stripChars, stripLeading, stripParenthesis, stripSurround, stripTrailing, stripUntil, stripWhile, surround, takeNumericCharacters, takeProp, toCamelCase, toKebabCase, toNumber, toNumericArray, toPascalCase, toSnakeCase, toString, toUppercase, trim, trimEnd, trimLeft, trimRight, trimStart, truncate, tuple, twColor, unbox, uncapitalize, union, unionize, unique, uniqueKeys, unset, uppercase, urlMeta, valuesOf, widen, withDefaults, withKeys, withValue, withoutKeys, withoutValue, wrapFn, youtubeEmbed, youtubeMeta };
@@ -3054,6 +3054,9 @@ function intersect(value, _intersectedWith) {
3054
3054
 
3055
3055
  // src/literals/stripTrailing.ts
3056
3056
  function stripTrailing(content, ...strip2) {
3057
+ if (isUndefined(content)) {
3058
+ return void 0;
3059
+ }
3057
3060
  let output = String(content);
3058
3061
  for (const s of strip2) {
3059
3062
  if (output.endsWith(String(s))) {
@@ -3366,6 +3369,11 @@ function isEmail(val) {
3366
3369
  return isString(val) && (LOWER_ALPHA_CHARS.includes(firstChar) && parts.length === 2 && domain.length >= 1 && tld.length >= 2);
3367
3370
  }
3368
3371
 
3372
+ // src/type-guards/isEmpty.ts
3373
+ function isEmpty(val) {
3374
+ return isUndefined(val) || isNull(val) || isString(val) && val.length === 0 || isObject(val) && Object.keys(val).length === 0 || isArray(val) && val.length === 0;
3375
+ }
3376
+
3369
3377
  // src/type-guards/isErrorCondition.ts
3370
3378
  function isErrorCondition(value, kind = null) {
3371
3379
  return isObject(value) && "__kind" in value && value.__kind === "ErrorCondition" && "kind" in value ? kind !== null ? value.kind === kind : true : false;
@@ -4463,6 +4471,9 @@ function stripChars(content, ...strip2) {
4463
4471
 
4464
4472
  // src/literals/stripLeading.ts
4465
4473
  function stripLeading(content, ...strip2) {
4474
+ if (isUndefined(content)) {
4475
+ return void 0;
4476
+ }
4466
4477
  let output = String(content);
4467
4478
  for (const s of strip2) {
4468
4479
  if (output.startsWith(String(s))) {
@@ -5378,6 +5389,7 @@ export {
5378
5389
  isDutchNewsUrl,
5379
5390
  isEbayUrl,
5380
5391
  isEmail,
5392
+ isEmpty,
5381
5393
  isEnergyMetric,
5382
5394
  isEnergyUom,
5383
5395
  isEqual,