inferred-types 0.44.0 → 0.45.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.
- package/dist/constants/Characters.d.ts +2 -0
- package/dist/constants/Characters.d.ts.map +1 -0
- package/dist/constants/Characters.js +5 -0
- package/dist/constants/NetworkConstants.d.ts +29 -0
- package/dist/constants/NetworkConstants.d.ts.map +1 -0
- package/dist/constants/NetworkConstants.js +83 -0
- package/dist/constants/Phone.d.ts +8 -0
- package/dist/constants/Phone.d.ts.map +1 -0
- package/dist/constants/Phone.js +262 -0
- package/dist/constants/ProxmoxConstants.d.ts +2 -0
- package/dist/constants/ProxmoxConstants.d.ts.map +1 -0
- package/dist/constants/ProxmoxConstants.js +3 -0
- package/dist/constants/index.d.ts +4 -1
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +4 -1
- package/dist/constants/tsconfig.tsbuildinfo +1 -1
- package/dist/inferred-types/index.cjs +1657 -1029
- package/dist/inferred-types/tsconfig.tsbuildinfo +1 -1
- package/dist/runtime/api/defineApi.d.ts +56 -0
- package/dist/runtime/api/defineApi.d.ts.map +1 -0
- package/dist/runtime/api/defineApi.js +97 -0
- package/dist/runtime/api/handleDoneFn.d.ts.map +1 -0
- package/dist/runtime/api/index.d.ts +3 -0
- package/dist/runtime/api/index.d.ts.map +1 -0
- package/dist/runtime/api/index.js +2 -0
- package/dist/runtime/boolean-logic/ifArrayPartial.d.ts +1 -1
- package/dist/runtime/boolean-logic/ifArrayPartial.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifArrayPartial.js +1 -1
- package/dist/runtime/boolean-logic/ifLength.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifScalar.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifScalar.js +1 -1
- package/dist/runtime/boolean-logic/index.d.ts +0 -1
- package/dist/runtime/boolean-logic/index.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/index.js +0 -1
- package/dist/runtime/dictionary/defineOptions.d.ts +26 -0
- package/dist/runtime/dictionary/defineOptions.d.ts.map +1 -0
- package/dist/runtime/dictionary/defineOptions.js +30 -0
- package/dist/runtime/dictionary/keysOf.d.ts +1 -1
- package/dist/runtime/dictionary/keysOf.d.ts.map +1 -1
- package/dist/runtime/dictionary/withKeys.d.ts +1 -1
- package/dist/runtime/errors/KindError.d.ts +2 -2
- package/dist/runtime/errors/KindError.d.ts.map +1 -1
- package/dist/runtime/functions/index.d.ts +1 -0
- package/dist/runtime/functions/index.d.ts.map +1 -1
- package/dist/runtime/functions/index.js +1 -0
- package/dist/runtime/functions/wrapFn.d.ts +2 -0
- package/dist/runtime/functions/wrapFn.d.ts.map +1 -0
- package/dist/runtime/functions/wrapFn.js +24 -0
- package/dist/runtime/index.d.ts +2 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +2 -10
- package/dist/runtime/lists/find.d.ts +1 -1
- package/dist/runtime/lists/find.d.ts.map +1 -1
- package/dist/runtime/lists/intersection.d.ts.map +1 -1
- package/dist/runtime/lists/intersection.js +2 -1
- package/dist/runtime/literals/asPhoneNumber.d.ts +10 -0
- package/dist/runtime/literals/asPhoneNumber.d.ts.map +1 -0
- package/dist/runtime/literals/asPhoneNumber.js +62 -0
- package/dist/runtime/literals/index.d.ts +5 -0
- package/dist/runtime/literals/index.d.ts.map +1 -1
- package/dist/runtime/literals/index.js +5 -0
- package/dist/runtime/literals/retainChars.d.ts +16 -0
- package/dist/runtime/literals/retainChars.d.ts.map +1 -0
- package/dist/runtime/literals/retainChars.js +17 -0
- package/dist/runtime/literals/retainWhile.d.ts +11 -0
- package/dist/runtime/literals/retainWhile.d.ts.map +1 -0
- package/dist/runtime/literals/retainWhile.js +12 -0
- package/dist/runtime/literals/stripChars.d.ts +10 -0
- package/dist/runtime/literals/stripChars.d.ts.map +1 -0
- package/dist/runtime/literals/stripChars.js +11 -0
- package/dist/runtime/literals/stripLeading.d.ts +3 -3
- package/dist/runtime/literals/stripLeading.d.ts.map +1 -1
- package/dist/runtime/literals/stripLeading.js +5 -5
- package/dist/runtime/literals/takeNumericCharacters.d.ts +9 -0
- package/dist/runtime/literals/takeNumericCharacters.d.ts.map +1 -0
- package/dist/runtime/literals/takeNumericCharacters.js +12 -0
- package/dist/runtime/literals/unset.d.ts +8 -0
- package/dist/runtime/literals/unset.d.ts.map +1 -0
- package/dist/runtime/literals/unset.js +14 -0
- package/dist/runtime/meta/index.d.ts +3 -0
- package/dist/runtime/meta/index.d.ts.map +1 -0
- package/dist/runtime/meta/index.js +2 -0
- package/dist/runtime/meta/urlMeta.d.ts +52 -0
- package/dist/runtime/meta/urlMeta.d.ts.map +1 -0
- package/dist/runtime/meta/urlMeta.js +57 -0
- package/dist/runtime/meta/youtube-meta.d.ts +38 -0
- package/dist/runtime/meta/youtube-meta.d.ts.map +1 -0
- package/dist/runtime/meta/youtube-meta.js +67 -0
- package/dist/runtime/runtime-types/dict.d.ts +2 -2
- package/dist/runtime/runtime-types/dict.d.ts.map +1 -1
- package/dist/runtime/runtime-types/ip6Prefix.d.ts +1 -1
- package/dist/runtime/runtime-types/parse.d.ts +1 -1
- package/dist/runtime/runtime-types/shape-helpers/getTokenData.d.ts +1 -1
- package/dist/runtime/runtime-types/shape-helpers/getTokenName.d.ts +1 -1
- package/dist/runtime/runtime-types/shape-helpers/singletons.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape-helpers/singletons.js +1 -1
- package/dist/runtime/runtime-types/shape.d.ts +1 -1
- package/dist/runtime/runtime-types/shape.js +1 -1
- package/dist/runtime/tsconfig.tsbuildinfo +1 -1
- package/dist/runtime/type-conversion/asChars.d.ts +8 -0
- package/dist/runtime/type-conversion/asChars.d.ts.map +1 -0
- package/dist/runtime/type-conversion/asChars.js +8 -0
- package/dist/runtime/type-conversion/index.d.ts +2 -0
- package/dist/runtime/type-conversion/index.d.ts.map +1 -1
- package/dist/runtime/type-conversion/index.js +2 -0
- package/dist/runtime/type-conversion/ip6GroupExpansion.d.ts +14 -0
- package/dist/runtime/type-conversion/ip6GroupExpansion.d.ts.map +1 -0
- package/dist/runtime/type-conversion/ip6GroupExpansion.js +15 -0
- package/dist/runtime/type-guards/api-tg.d.ts +33 -0
- package/dist/runtime/type-guards/api-tg.d.ts.map +1 -0
- package/dist/runtime/type-guards/api-tg.js +38 -0
- package/dist/runtime/type-guards/hasWhitespace.d.ts +7 -0
- package/dist/runtime/type-guards/hasWhitespace.d.ts.map +1 -0
- package/dist/runtime/type-guards/hasWhitespace.js +11 -0
- package/dist/runtime/type-guards/index.d.ts +11 -0
- package/dist/runtime/type-guards/index.d.ts.map +1 -1
- package/dist/runtime/type-guards/index.js +11 -0
- package/dist/runtime/type-guards/isConstant.d.ts +6 -0
- package/dist/runtime/type-guards/isConstant.d.ts.map +1 -1
- package/dist/runtime/type-guards/isConstant.js +12 -2
- package/dist/runtime/type-guards/isEmail.d.ts +7 -0
- package/dist/runtime/type-guards/isEmail.d.ts.map +1 -0
- package/dist/runtime/type-guards/isEmail.js +11 -0
- package/dist/runtime/type-guards/isHexadecimal.d.ts +8 -0
- package/dist/runtime/type-guards/isHexadecimal.d.ts.map +1 -0
- package/dist/runtime/type-guards/isHexadecimal.js +13 -0
- package/dist/runtime/type-guards/isPhoneNumber.d.ts +14 -0
- package/dist/runtime/type-guards/isPhoneNumber.d.ts.map +1 -0
- package/dist/runtime/type-guards/isPhoneNumber.js +26 -0
- package/dist/runtime/type-guards/isSpecificConstant.js +2 -3
- package/dist/runtime/type-guards/isTrimmable.d.ts +7 -0
- package/dist/runtime/type-guards/isTrimmable.d.ts.map +1 -0
- package/dist/runtime/type-guards/isTrimmable.js +9 -0
- package/dist/runtime/type-guards/isUnset.d.ts +18 -0
- package/dist/runtime/type-guards/isUnset.d.ts.map +1 -0
- package/dist/runtime/type-guards/isUnset.js +23 -0
- package/dist/runtime/type-guards/isUrl.d.ts +2 -4
- package/dist/runtime/type-guards/isUrl.d.ts.map +1 -1
- package/dist/runtime/type-guards/isUrl.js +2 -3
- package/dist/runtime/type-guards/network-tg.d.ts +54 -0
- package/dist/runtime/type-guards/network-tg.d.ts.map +1 -0
- package/dist/runtime/type-guards/network-tg.js +94 -0
- package/dist/runtime/type-guards/repos.d.ts +6 -6
- package/dist/runtime/type-guards/repos.d.ts.map +1 -1
- package/dist/runtime/type-guards/youtube.d.ts +44 -0
- package/dist/runtime/type-guards/youtube.d.ts.map +1 -0
- package/dist/runtime/type-guards/youtube.js +84 -0
- package/dist/types/api/api.d.ts +96 -37
- package/dist/types/api/api.d.ts.map +1 -1
- package/dist/types/base-types/fns/EscapeFunction.d.ts +22 -0
- package/dist/types/base-types/fns/EscapeFunction.d.ts.map +1 -0
- package/dist/types/base-types/fns/OptionalParamFn.d.ts +30 -0
- package/dist/types/base-types/fns/OptionalParamFn.d.ts.map +1 -0
- package/dist/types/base-types/fns/index.d.ts +2 -0
- package/dist/types/base-types/fns/index.d.ts.map +1 -1
- package/dist/types/base-types/fns/index.js +2 -0
- package/dist/types/boolean-logic/branching/If.d.ts +2 -3
- package/dist/types/boolean-logic/branching/If.d.ts.map +1 -1
- package/dist/types/boolean-logic/branching/IfUnset.d.ts +12 -0
- package/dist/types/boolean-logic/branching/IfUnset.d.ts.map +1 -0
- package/dist/types/boolean-logic/branching/OnPass.d.ts +4 -3
- package/dist/types/boolean-logic/branching/OnPass.d.ts.map +1 -1
- package/dist/types/boolean-logic/branching/WhenNever.d.ts +11 -0
- package/dist/types/boolean-logic/branching/WhenNever.d.ts.map +1 -0
- package/dist/types/boolean-logic/branching/index.d.ts +2 -0
- package/dist/types/boolean-logic/branching/index.d.ts.map +1 -1
- package/dist/types/boolean-logic/branching/index.js +2 -0
- package/dist/types/boolean-logic/combinators/And.d.ts +1 -1
- package/dist/types/boolean-logic/combinators/And.d.ts.map +1 -1
- package/dist/types/boolean-logic/combinators/Compare.d.ts +3 -3
- package/dist/types/boolean-logic/combinators/Compare.d.ts.map +1 -1
- package/dist/types/boolean-logic/combinators/Not.d.ts +5 -6
- package/dist/types/boolean-logic/combinators/Not.d.ts.map +1 -1
- package/dist/types/boolean-logic/combinators/Some.d.ts +8 -0
- package/dist/types/boolean-logic/combinators/Some.d.ts.map +1 -0
- package/dist/types/boolean-logic/combinators/Some.js +1 -0
- package/dist/types/boolean-logic/combinators/index.d.ts +1 -0
- package/dist/types/boolean-logic/combinators/index.d.ts.map +1 -1
- package/dist/types/boolean-logic/combinators/index.js +1 -0
- package/dist/types/boolean-logic/narrowing/AsDoneFn.d.ts +2 -2
- package/dist/types/boolean-logic/narrowing/AsDoneFn.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/ApiOperators.d.ts +11 -0
- package/dist/types/boolean-logic/operators/ApiOperators.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/ApiOperators.js +1 -0
- package/dist/types/boolean-logic/operators/Extends.d.ts +2 -1
- package/dist/types/boolean-logic/operators/Extends.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/HasSameValues.d.ts +4 -3
- package/dist/types/boolean-logic/operators/HasSameValues.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsBoolean.d.ts +2 -1
- package/dist/types/boolean-logic/operators/IsBoolean.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsCssHexadecimal.d.ts +9 -0
- package/dist/types/boolean-logic/operators/IsCssHexadecimal.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/IsCssHexadecimal.js +1 -0
- package/dist/types/boolean-logic/operators/IsEqual.d.ts +7 -1
- package/dist/types/boolean-logic/operators/IsEqual.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsGreaterThan.d.ts +2 -2
- package/dist/types/boolean-logic/operators/IsGreaterThan.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsLessThan.d.ts +13 -0
- package/dist/types/boolean-logic/operators/IsLessThan.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/IsLessThan.js +1 -0
- package/dist/types/boolean-logic/operators/IsNever.d.ts +2 -1
- package/dist/types/boolean-logic/operators/IsNever.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsNumber.d.ts +2 -2
- package/dist/types/boolean-logic/operators/IsNumber.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsString.d.ts +2 -2
- package/dist/types/boolean-logic/operators/IsString.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsUnset.d.ts +9 -0
- package/dist/types/boolean-logic/operators/IsUnset.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/IsUnset.js +1 -0
- package/dist/types/boolean-logic/operators/IsUrl.d.ts +35 -0
- package/dist/types/boolean-logic/operators/IsUrl.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/IsUrl.js +1 -0
- package/dist/types/boolean-logic/operators/Network-operators.d.ts +71 -0
- package/dist/types/boolean-logic/operators/Network-operators.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/Network-operators.js +1 -0
- package/dist/types/boolean-logic/operators/PhoneOperators.d.ts +33 -0
- package/dist/types/boolean-logic/operators/PhoneOperators.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/PhoneOperators.js +1 -0
- package/dist/types/boolean-logic/operators/YouTube-operators.d.ts +32 -0
- package/dist/types/boolean-logic/operators/YouTube-operators.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/YouTube-operators.js +1 -0
- package/dist/types/boolean-logic/operators/index.d.ts +7 -1
- package/dist/types/boolean-logic/operators/index.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/index.js +7 -1
- package/dist/types/dictionary/Keys.d.ts +58 -4
- package/dist/types/dictionary/Keys.d.ts.map +1 -1
- package/dist/types/dictionary/KvFn.d.ts +2 -2
- package/dist/types/dictionary/KvFn.d.ts.map +1 -1
- package/dist/types/dictionary/MakeKeysOptional.d.ts +12 -3
- package/dist/types/dictionary/MakeKeysOptional.d.ts.map +1 -1
- package/dist/types/dictionary/MakeKeysRequired.d.ts +14 -0
- package/dist/types/dictionary/MakeKeysRequired.d.ts.map +1 -0
- package/dist/types/dictionary/MakeKeysRequired.js +1 -0
- package/dist/types/dictionary/OptionalKeys.d.ts +19 -4
- package/dist/types/dictionary/OptionalKeys.d.ts.map +1 -1
- package/dist/types/dictionary/OptionalKeys.js +1 -0
- package/dist/types/dictionary/RequiredKeys.d.ts +14 -6
- package/dist/types/dictionary/RequiredKeys.d.ts.map +1 -1
- package/dist/types/dictionary/Values.d.ts +2 -2
- package/dist/types/dictionary/Values.d.ts.map +1 -1
- package/dist/types/dictionary/index.d.ts +1 -2
- package/dist/types/dictionary/index.d.ts.map +1 -1
- package/dist/types/dictionary/index.js +1 -2
- package/dist/types/errors/KindError.d.ts +1 -1
- package/dist/types/errors/KindError.d.ts.map +1 -1
- package/dist/types/functions/FnFrom.d.ts +5 -0
- package/dist/types/functions/FnFrom.d.ts.map +1 -1
- package/dist/types/functions/{Fn.d.ts → FnWithDescription.d.ts} +2 -2
- package/dist/types/functions/FnWithDescription.d.ts.map +1 -0
- package/dist/types/functions/FnWithDescription.js +1 -0
- package/dist/types/functions/WrapperFn.d.ts +23 -0
- package/dist/types/functions/WrapperFn.d.ts.map +1 -0
- package/dist/types/functions/WrapperFn.js +1 -0
- package/dist/types/functions/index.d.ts +2 -1
- package/dist/types/functions/index.d.ts.map +1 -1
- package/dist/types/functions/index.js +2 -1
- package/dist/types/lists/ConvertSet.d.ts +2 -2
- package/dist/types/lists/ConvertSet.d.ts.map +1 -1
- package/dist/types/lists/Find.d.ts +7 -18
- package/dist/types/lists/Find.d.ts.map +1 -1
- package/dist/types/literals/DoneFnTuple.d.ts +3 -3
- package/dist/types/literals/DoneFnTuple.d.ts.map +1 -1
- package/dist/types/literals/Unset.d.ts +13 -0
- package/dist/types/literals/Unset.d.ts.map +1 -0
- package/dist/types/literals/Unset.js +1 -0
- package/dist/types/literals/index.d.ts +1 -0
- package/dist/types/literals/index.d.ts.map +1 -1
- package/dist/types/literals/index.js +1 -0
- package/dist/types/numeric-literals/NumberLike.d.ts +1 -1
- package/dist/types/numeric-literals/NumberLike.d.ts.map +1 -1
- package/dist/types/string-literals/Proxmox.d.ts +7 -0
- package/dist/types/string-literals/Proxmox.d.ts.map +1 -0
- package/dist/types/string-literals/Proxmox.js +1 -0
- package/dist/types/string-literals/RetainUntil.d.ts +33 -0
- package/dist/types/string-literals/RetainUntil.d.ts.map +1 -0
- package/dist/types/string-literals/RetainUntil.js +1 -0
- package/dist/types/string-literals/Split.d.ts +3 -3
- package/dist/types/string-literals/Split.d.ts.map +1 -1
- package/dist/types/string-literals/StripAfter.d.ts +2 -2
- package/dist/types/string-literals/StripAfter.d.ts.map +1 -1
- package/dist/types/string-literals/StripBefore.d.ts +2 -2
- package/dist/types/string-literals/StripBefore.d.ts.map +1 -1
- package/dist/types/string-literals/StripLeading.d.ts +2 -2
- package/dist/types/string-literals/StripLeading.d.ts.map +1 -1
- package/dist/types/string-literals/StripUntil.d.ts +18 -0
- package/dist/types/string-literals/StripUntil.d.ts.map +1 -0
- package/dist/types/string-literals/StripUntil.js +1 -0
- package/dist/types/string-literals/character-sets/DomainName.d.ts +17 -18
- package/dist/types/string-literals/character-sets/DomainName.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/IpAddress.d.ts +28 -4
- package/dist/types/string-literals/character-sets/IpAddress.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/Optional.d.ts +14 -0
- package/dist/types/string-literals/character-sets/Optional.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/Optional.js +1 -0
- package/dist/types/string-literals/character-sets/Repos.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/Url.d.ts +85 -37
- package/dist/types/string-literals/character-sets/Url.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/Url.js +1 -0
- package/dist/types/string-literals/character-sets/Whitespace.d.ts +3 -1
- package/dist/types/string-literals/character-sets/Whitespace.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/YouTube.d.ts +127 -0
- package/dist/types/string-literals/character-sets/YouTube.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/YouTube.js +1 -0
- package/dist/types/string-literals/character-sets/index.d.ts +3 -0
- package/dist/types/string-literals/character-sets/index.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/index.js +3 -0
- package/dist/types/string-literals/character-sets/phone.d.ts +192 -0
- package/dist/types/string-literals/character-sets/phone.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone.js +1 -0
- package/dist/types/string-literals/index.d.ts +2 -0
- package/dist/types/string-literals/index.d.ts.map +1 -1
- package/dist/types/string-literals/index.js +2 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/type-conversion/ReduceValues.d.ts +19 -0
- package/dist/types/type-conversion/ReduceValues.d.ts.map +1 -0
- package/dist/types/type-conversion/ReduceValues.js +1 -0
- package/dist/types/type-conversion/ReturnValues.d.ts +10 -6
- package/dist/types/type-conversion/ReturnValues.d.ts.map +1 -1
- package/dist/types/type-conversion/Trim.d.ts +3 -1
- package/dist/types/type-conversion/Trim.d.ts.map +1 -1
- package/dist/types/type-conversion/UnionFilter.d.ts +2 -2
- package/dist/types/type-conversion/UnionFilter.d.ts.map +1 -1
- package/dist/types/type-conversion/form-fields.d.ts +5 -1
- package/dist/types/type-conversion/form-fields.d.ts.map +1 -1
- package/dist/types/type-conversion/index.d.ts +1 -0
- package/dist/types/type-conversion/index.d.ts.map +1 -1
- package/dist/types/type-conversion/index.js +1 -0
- package/package.json +17 -11
- package/dist/constants/Network.d.ts +0 -22
- package/dist/constants/Network.d.ts.map +0 -1
- package/dist/constants/Network.js +0 -21
- package/dist/runtime/boolean-logic/handleDoneFn.d.ts.map +0 -1
- package/dist/types/boolean-logic/operators/IsHexadecimal.d.ts +0 -9
- package/dist/types/boolean-logic/operators/IsHexadecimal.d.ts.map +0 -1
- package/dist/types/dictionary/PrivateKeys.d.ts +0 -17
- package/dist/types/dictionary/PrivateKeys.d.ts.map +0 -1
- package/dist/types/dictionary/PublicKeys.d.ts +0 -10
- package/dist/types/dictionary/PublicKeys.d.ts.map +0 -1
- package/dist/types/functions/Fn.d.ts.map +0 -1
- /package/dist/runtime/{boolean-logic → api}/handleDoneFn.d.ts +0 -0
- /package/dist/runtime/{boolean-logic → api}/handleDoneFn.js +0 -0
- /package/dist/types/{boolean-logic/operators/IsHexadecimal.js → base-types/fns/EscapeFunction.js} +0 -0
- /package/dist/types/{dictionary/PrivateKeys.js → base-types/fns/OptionalParamFn.js} +0 -0
- /package/dist/types/{dictionary/PublicKeys.js → boolean-logic/branching/IfUnset.js} +0 -0
- /package/dist/types/{functions/Fn.js → boolean-logic/branching/WhenNever.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/index.ts"],"names":[],"mappings":"AAMA,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/index.ts"],"names":[],"mappings":"AAMA,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
|
|
@@ -36,6 +36,11 @@ export * from "./toPascalCase.js";
|
|
|
36
36
|
export * from "./toUppercase.js";
|
|
37
37
|
export * from "./toNumericArray.js";
|
|
38
38
|
export * from "./truncate.js";
|
|
39
|
+
export * from "./takeNumericCharacters.js";
|
|
40
|
+
export * from "./retainChars.js";
|
|
41
|
+
export * from "./stripChars.js";
|
|
42
|
+
export * from "./retainWhile.js";
|
|
43
|
+
export * from "./asPhoneNumber.js";
|
|
39
44
|
// #endregion auto-indexed files
|
|
40
45
|
// see https://github.com/inocan-group/do-devops/docs/autoindex.md
|
|
41
46
|
// for more info
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RetainChars, TupleToUnion } from "../../types/type-conversion";
|
|
2
|
+
/**
|
|
3
|
+
* **retainChars**`(content, ...retain)`
|
|
4
|
+
*
|
|
5
|
+
* Retains the characters from `retain[]` which are
|
|
6
|
+
* found in `content` while discarding the rest.
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* // "42"
|
|
10
|
+
* const num = retainChars("4foobar2", ...NUMERIC_CHAR);
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* **Related:** `stripChars()`, `retainWhile()`, `retainUntil()`
|
|
14
|
+
*/
|
|
15
|
+
export declare const retainChars: <TContent extends string, TRetain extends readonly string[]>(content: TContent, ...retain: TRetain) => RetainChars<TContent, TupleToUnion<TRetain>>;
|
|
16
|
+
//# sourceMappingURL=retainChars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retainChars.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/retainChars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,oCAAkC;AAGtE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,wEAIb,QAAQ,aACN,OAAO,KACjB,YAAY,QAAQ,EAAE,aAAa,OAAO,CAAC,CAE7C,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { asChars } from "../type-conversion/asChars.js";
|
|
2
|
+
/**
|
|
3
|
+
* **retainChars**`(content, ...retain)`
|
|
4
|
+
*
|
|
5
|
+
* Retains the characters from `retain[]` which are
|
|
6
|
+
* found in `content` while discarding the rest.
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* // "42"
|
|
10
|
+
* const num = retainChars("4foobar2", ...NUMERIC_CHAR);
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* **Related:** `stripChars()`, `retainWhile()`, `retainUntil()`
|
|
14
|
+
*/
|
|
15
|
+
export const retainChars = (content, ...retain) => {
|
|
16
|
+
return asChars(content).filter(c => retain.includes(c)).join("");
|
|
17
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RetainWhile } from "../../types/string-literals";
|
|
2
|
+
import { TupleToUnion } from "../../types/type-conversion";
|
|
3
|
+
/**
|
|
4
|
+
* **retainWhile**`(content, ...retain)`
|
|
5
|
+
*
|
|
6
|
+
* Retains the characters at the start of the string
|
|
7
|
+
* so long as they are part of the character values
|
|
8
|
+
* passed in for `retain[]`
|
|
9
|
+
*/
|
|
10
|
+
export declare const retainWhile: <TContent extends string, TRetain extends readonly string[]>(content: TContent, ...retain: TRetain) => RetainWhile<TContent, TupleToUnion<TRetain>>;
|
|
11
|
+
//# sourceMappingURL=retainWhile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retainWhile.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/retainWhile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,WAAW,EAAE,oCAAkC;AAEzD,OAAO,EAAE,YAAY,EAAE,oCAAkC;AAGzD;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,wEAIb,QAAQ,aACN,OAAO,iDAInB,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { asChars } from "../type-conversion/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* **retainWhile**`(content, ...retain)`
|
|
4
|
+
*
|
|
5
|
+
* Retains the characters at the start of the string
|
|
6
|
+
* so long as they are part of the character values
|
|
7
|
+
* passed in for `retain[]`
|
|
8
|
+
*/
|
|
9
|
+
export const retainWhile = (content, ...retain) => {
|
|
10
|
+
const stopIdx = asChars(content).findIndex(c => !retain.includes(c));
|
|
11
|
+
return content.slice(0, stopIdx);
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StripChars, TupleToUnion } from "../../types/type-conversion";
|
|
2
|
+
/**
|
|
3
|
+
* **stripChars**`(content, ...strip)`
|
|
4
|
+
*
|
|
5
|
+
* Strips out characters found in `content`.
|
|
6
|
+
*
|
|
7
|
+
* **Related:** `retainChars()`
|
|
8
|
+
*/
|
|
9
|
+
export declare const stripChars: <TContent extends string, TRetain extends readonly string[]>(content: TContent, ...strip: TRetain) => StripChars<TContent, TupleToUnion<TRetain>>;
|
|
10
|
+
//# sourceMappingURL=stripChars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stripChars.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripChars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,UAAU,EAAE,YAAY,EAAE,oCAAkC;AAGtE;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,wEAIZ,QAAQ,YACP,OAAO,KAChB,WAAW,QAAQ,EAAE,aAAa,OAAO,CAAC,CAE5C,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { asChars } from "../type-conversion/asChars.js";
|
|
2
|
+
/**
|
|
3
|
+
* **stripChars**`(content, ...strip)`
|
|
4
|
+
*
|
|
5
|
+
* Strips out characters found in `content`.
|
|
6
|
+
*
|
|
7
|
+
* **Related:** `retainChars()`
|
|
8
|
+
*/
|
|
9
|
+
export const stripChars = (content, ...strip) => {
|
|
10
|
+
return asChars(content).filter(c => !strip.includes(c)).join("");
|
|
11
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { StripLeading } from "../../types/index";
|
|
1
|
+
import { StripLeading, TupleToUnion } from "../../types/index";
|
|
2
2
|
/**
|
|
3
|
-
* **stripLeading**(content, strip)
|
|
3
|
+
* **stripLeading**(content, ...strip)
|
|
4
4
|
*
|
|
5
5
|
* Runtime utility which strips of a leading substring from the
|
|
6
6
|
* primary content if it exists and leaves content unchanged otherwise.
|
|
7
7
|
*/
|
|
8
|
-
export declare function stripLeading<T extends string, U extends string>(content: T, strip: U): StripLeading<T, U
|
|
8
|
+
export declare function stripLeading<T extends string, U extends string[]>(content: T, ...strip: U): StripLeading<T, TupleToUnion<U>>;
|
|
9
9
|
//# sourceMappingURL=stripLeading.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripLeading.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripLeading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,0BAAwB;
|
|
1
|
+
{"version":3,"file":"stripLeading.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripLeading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,0BAAwB;AAE7D;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,EAAE,EAElB,OAAO,EAAE,CAAC,EACV,GAAG,KAAK,EAAE,CAAC,GACV,YAAY,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CASlC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* **stripLeading**(content, strip)
|
|
2
|
+
* **stripLeading**(content, ...strip)
|
|
3
3
|
*
|
|
4
4
|
* Runtime utility which strips of a leading substring from the
|
|
5
5
|
* primary content if it exists and leaves content unchanged otherwise.
|
|
6
6
|
*/
|
|
7
|
-
export function stripLeading(content, strip) {
|
|
8
|
-
const
|
|
9
|
-
return (
|
|
7
|
+
export function stripLeading(content, ...strip) {
|
|
8
|
+
const stripper = strip.find(i => content.startsWith(i));
|
|
9
|
+
return (stripper
|
|
10
10
|
? // starts with
|
|
11
|
-
content.
|
|
11
|
+
content.slice(stripper.length)
|
|
12
12
|
: // does not
|
|
13
13
|
content);
|
|
14
14
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RetainWhile } from "../../types/string-literals";
|
|
2
|
+
/**
|
|
3
|
+
* **takeNumericCharacters**`(content)`
|
|
4
|
+
*
|
|
5
|
+
* Starts at the passed in content and extracts all numeric characters
|
|
6
|
+
* in the string until a non-numeric value arrives.
|
|
7
|
+
*/
|
|
8
|
+
export declare const takeNumericCharacters: <T extends string>(content: T) => RetainWhile<T, "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9">;
|
|
9
|
+
//# sourceMappingURL=takeNumericCharacters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"takeNumericCharacters.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/takeNumericCharacters.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,WAAW,EAAE,oCAAkC;AAGrE;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,8BAA+B,CAAC,8EAIjE,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { NUMERIC_CHAR } from "../../constants/NumericChar.js";
|
|
2
|
+
import { asChars } from "../index.js";
|
|
3
|
+
/**
|
|
4
|
+
* **takeNumericCharacters**`(content)`
|
|
5
|
+
*
|
|
6
|
+
* Starts at the passed in content and extracts all numeric characters
|
|
7
|
+
* in the string until a non-numeric value arrives.
|
|
8
|
+
*/
|
|
9
|
+
export const takeNumericCharacters = (content) => {
|
|
10
|
+
let nonNumericIdx = asChars(content).findIndex(i => !NUMERIC_CHAR.includes(i));
|
|
11
|
+
return content.slice(0, nonNumericIdx);
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unset.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/unset.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,mBAA6B,CAAC;AAEhD;;;;;GAKG"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// import { Unset, ShapeCallback } from "src/types/index";
|
|
2
|
+
// import { ShapeApiImplementation, handleEscapeApi, isFunction } from "src/runtime/index";
|
|
3
|
+
export const unset = "NOT IMPLEMENTED";
|
|
4
|
+
/**
|
|
5
|
+
* **unset**`([type])`
|
|
6
|
+
*
|
|
7
|
+
* Allows you to easily create the `Unset` type while providing a tokenized runtime
|
|
8
|
+
* value for the `type` property.
|
|
9
|
+
*/
|
|
10
|
+
// export const unset = <T extends ShapeCallback | Unset = Unset>(type?: T) => {
|
|
11
|
+
// if(isFunction(type)) {
|
|
12
|
+
// const _userResponse = handleEscapeApi(ShapeApiImplementation);
|
|
13
|
+
// }
|
|
14
|
+
// }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/meta/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { IsUrl, GetUrlProtocol, GetUrlSource, GetUrlPath, GetUrlQueryParams, GetUrlPort, IsIpAddress, IsIp4Address, IsIp6Address } from "../../types/index";
|
|
2
|
+
export type UrlMeta<T> = {
|
|
3
|
+
/** the URL passed in */
|
|
4
|
+
url: T;
|
|
5
|
+
/** boolean flag indicating whether the value passed in is considered a valid URL */
|
|
6
|
+
isUrl: IsUrl<T>;
|
|
7
|
+
/** the `NetworkProtocol` used in the URL */
|
|
8
|
+
protocol: GetUrlProtocol<T>;
|
|
9
|
+
path: T extends string ? GetUrlPath<T> : never;
|
|
10
|
+
queryParams: T extends string ? GetUrlQueryParams<T> : never;
|
|
11
|
+
/** the port number -- when stated explicitly -- or "default" */
|
|
12
|
+
port: GetUrlPort<T>;
|
|
13
|
+
/** either the domain name or the IP address */
|
|
14
|
+
source: T extends string ? GetUrlSource<T> : never;
|
|
15
|
+
/**
|
|
16
|
+
* Boolean flag which indicates that the _source_ is an IP address (vs. Domain Name)
|
|
17
|
+
*/
|
|
18
|
+
isIpAddress: IsIpAddress<T>;
|
|
19
|
+
/**
|
|
20
|
+
* Boolean flag indicating the _source_ is a IPv4 IP address
|
|
21
|
+
*/
|
|
22
|
+
isIpV4Address: IsIp4Address<T>;
|
|
23
|
+
/**
|
|
24
|
+
* Boolean flag indicating the _source_ is a IPv6 IP address
|
|
25
|
+
*/
|
|
26
|
+
isIpV6Address: IsIp6Address<T>;
|
|
27
|
+
};
|
|
28
|
+
export declare const getUrlProtocol: <T extends string>(url: T) => GetUrlProtocol<T>;
|
|
29
|
+
export declare const removeUrlProtocol: <T extends string>(url: T) => import("../../types/index").StripBefore<T, "://">;
|
|
30
|
+
export declare const getUrlPath: <T extends string>(url: T) => GetUrlPath<T>;
|
|
31
|
+
export declare const getUrlQueryParams: <T extends string>(url: T) => GetUrlQueryParams<T>;
|
|
32
|
+
export declare const getUrlPort: <T extends string>(url: T) => number | "default";
|
|
33
|
+
export declare const getUrlSource: <T extends string>(url: T) => GetUrlSource<T>;
|
|
34
|
+
/**
|
|
35
|
+
* **urlMeta**`(url)`
|
|
36
|
+
*
|
|
37
|
+
* Analyzes the string passed in and provides a small dictionary of
|
|
38
|
+
* metadata properties about the URL.
|
|
39
|
+
*/
|
|
40
|
+
export declare const urlMeta: <T extends string>(url: T) => {
|
|
41
|
+
url: T;
|
|
42
|
+
isUrl: IsUrl<T>;
|
|
43
|
+
protocol: GetUrlProtocol<T>;
|
|
44
|
+
path: GetUrlPath<T>;
|
|
45
|
+
queryParameters: GetUrlQueryParams<T>;
|
|
46
|
+
port: GetUrlPort<T>;
|
|
47
|
+
source: GetUrlSource<T>;
|
|
48
|
+
isIpAddress: IsIpAddress<GetUrlSource<T>>;
|
|
49
|
+
isIp4Address: IsIp4Address<GetUrlSource<T>>;
|
|
50
|
+
isIp6Address: IsIp6Address<GetUrlSource<T>>;
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=urlMeta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urlMeta.d.ts","sourceRoot":"","sources":["../../../src/runtime/meta/urlMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,cAAc,EACd,YAAY,EACZ,UAAU,EACV,iBAAiB,EAEjB,UAAU,EACV,WAAW,EACX,YAAY,EACZ,YAAY,EACb,0BAAwB;AAiBzB,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI;IACvB,wBAAwB;IACxB,GAAG,EAAE,CAAC,CAAC;IACP,oFAAoF;IACpF,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAChB,4CAA4C;IAC5C,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC5B,IAAI,EAAE,CAAC,SAAS,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IAC/C,WAAW,EAAE,CAAC,SAAS,MAAM,GAAG,iBAAiB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IAC7D,gEAAgE;IAChE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAGpB,+CAA+C;IAC/C,MAAM,EAAE,CAAC,SAAS,MAAM,GACpB,YAAY,CAAC,CAAC,CAAC,GACf,KAAK,CAAC;IACV;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAC5B;;OAEG;IACH,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAE/B;;OAEG;IACH,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;CAChC,CAAA;AAKD,eAAO,MAAM,cAAc,0BAGpB,CAAC,sBAKP,CAAA;AAED,eAAO,MAAM,iBAAiB,0BAA2B,CAAC,sDAEzD,CAAA;AAMD,eAAO,MAAM,UAAU,0BAGhB,CAAC,kBAQP,CAAA;AAED,eAAO,MAAM,iBAAiB,0BAGvB,CAAC,yBASP,CAAA;AAED,eAAO,MAAM,UAAU,0BAGhB,CAAC,uBAUP,CAAA;AAED,eAAO,MAAM,YAAY,0BAGlB,CAAC,oBASP,CAAA;AAGD;;;;;GAKG;AACH,eAAO,MAAM,OAAO,0BAEb,CAAC;;;;;;;;;;;CAcP,CAAA"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { isUrl, isIp4Address, isIp6Address, isIpAddress, stripAfter, stripBefore, ensureLeading, stripTrailing, isDomainName, takeNumericCharacters, } from "../index.js";
|
|
2
|
+
import { NETWORK_PROTOCOL_LOOKUP } from "../../constants/NetworkConstants.js";
|
|
3
|
+
import { Never } from "../../constants/Never.js";
|
|
4
|
+
const PROTOCOLS = Object.values(NETWORK_PROTOCOL_LOOKUP).flat().filter(i => i !== "");
|
|
5
|
+
export const getUrlProtocol = (url) => {
|
|
6
|
+
const proto = PROTOCOLS.find(p => url.startsWith(`${p}://`));
|
|
7
|
+
return proto;
|
|
8
|
+
};
|
|
9
|
+
export const removeUrlProtocol = (url) => {
|
|
10
|
+
return stripBefore(url, "://");
|
|
11
|
+
};
|
|
12
|
+
const ensurePath = (val) => val === ""
|
|
13
|
+
? ""
|
|
14
|
+
: stripTrailing(ensureLeading(val, "/"), "/");
|
|
15
|
+
export const getUrlPath = (url) => {
|
|
16
|
+
return isUrl(url)
|
|
17
|
+
? ensurePath(stripAfter(stripBefore(removeUrlProtocol(url), "/"), "?"))
|
|
18
|
+
: Never;
|
|
19
|
+
};
|
|
20
|
+
export const getUrlQueryParams = (url) => {
|
|
21
|
+
const qp = stripBefore(url, "?");
|
|
22
|
+
return (qp === ""
|
|
23
|
+
? qp
|
|
24
|
+
: `?${qp}`);
|
|
25
|
+
};
|
|
26
|
+
export const getUrlPort = (url) => {
|
|
27
|
+
const candidate = takeNumericCharacters(stripBefore(removeUrlProtocol(url), ":"));
|
|
28
|
+
return (candidate === ""
|
|
29
|
+
? "default"
|
|
30
|
+
: Number(candidate));
|
|
31
|
+
};
|
|
32
|
+
export const getUrlSource = (url) => {
|
|
33
|
+
const candidate = stripAfter(stripAfter(stripAfter(removeUrlProtocol(url), "/"), "?"), ":");
|
|
34
|
+
return (isIpAddress(candidate) || isDomainName(candidate)
|
|
35
|
+
? candidate
|
|
36
|
+
: Never);
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* **urlMeta**`(url)`
|
|
40
|
+
*
|
|
41
|
+
* Analyzes the string passed in and provides a small dictionary of
|
|
42
|
+
* metadata properties about the URL.
|
|
43
|
+
*/
|
|
44
|
+
export const urlMeta = (url) => {
|
|
45
|
+
return {
|
|
46
|
+
url,
|
|
47
|
+
isUrl: isUrl(url),
|
|
48
|
+
protocol: getUrlProtocol(url),
|
|
49
|
+
path: getUrlPath(url),
|
|
50
|
+
queryParameters: getUrlQueryParams(url),
|
|
51
|
+
port: getUrlPort(url),
|
|
52
|
+
source: getUrlSource(url),
|
|
53
|
+
isIpAddress: isIpAddress(getUrlSource(url)),
|
|
54
|
+
isIp4Address: isIp4Address(getUrlSource(url)),
|
|
55
|
+
isIp6Address: isIp6Address(getUrlSource(url)),
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { As, GetYouTubePageType, YouTubePageType, YouTubeShareUrl, YouTubeUrl } from "../../types/index";
|
|
2
|
+
/**
|
|
3
|
+
* **YouTubeMeta**`<T>`
|
|
4
|
+
*
|
|
5
|
+
* Provides metadata about YouTube related URLs.
|
|
6
|
+
*/
|
|
7
|
+
export type YouTubeMeta<T extends string> = {
|
|
8
|
+
/**
|
|
9
|
+
* The URL passed in
|
|
10
|
+
*/
|
|
11
|
+
url: T;
|
|
12
|
+
/**
|
|
13
|
+
* boolean flag indicating whether the URL is a valid
|
|
14
|
+
* YouTube URL.
|
|
15
|
+
*/
|
|
16
|
+
isYouTubeUrl: T extends YouTubeUrl ? true : false;
|
|
17
|
+
/**
|
|
18
|
+
* boolean flag indicating whether URL is part of YouTube's `https://youtu.be`
|
|
19
|
+
* URL shortener used when _sharing_ videos.
|
|
20
|
+
*/
|
|
21
|
+
isShareUrl: T extends YouTubeShareUrl ? true : false;
|
|
22
|
+
pageType: As<GetYouTubePageType<T>, YouTubePageType>;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* **getYouTubePageType**`(url)`
|
|
26
|
+
*
|
|
27
|
+
* Returns a `YouTubePageType` description based on the url passed in (assuming
|
|
28
|
+
* that URL is for YouTube). Returns _never_ if not a YouTube URL.
|
|
29
|
+
*/
|
|
30
|
+
export declare const getYouTubePageType: <T extends string>(url: T) => GetYouTubePageType<T>;
|
|
31
|
+
/**
|
|
32
|
+
* **youtube**`(url)`
|
|
33
|
+
*
|
|
34
|
+
* Takes a YouTube URL and converts it to a meta-data object
|
|
35
|
+
* that helps describe the intent of the URL.
|
|
36
|
+
*/
|
|
37
|
+
export declare const youtubeMeta: <T extends string>(url: T) => YouTubeMeta<T>;
|
|
38
|
+
//# sourceMappingURL=youtube-meta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"youtube-meta.d.ts","sourceRoot":"","sources":["../../../src/runtime/meta/youtube-meta.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,EAAE,EACF,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,UAAU,EACX,0BAAwB;AAezB;;;;GAIG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,IAAI;IAC1C;;OAEG;IACH,GAAG,EAAE,CAAC,CAAC;IACP;;;OAGG;IACH,YAAY,EAAE,CAAC,SAAS,UAAU,GAAG,IAAI,GAAG,KAAK,CAAC;IAElD;;;SAGK;IACL,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,IAAI,GAAG,KAAK,CAAC;IAErD,QAAQ,EAAE,EAAE,CACV,kBAAkB,CAAC,CAAC,CAAC,EACrB,eAAe,CAChB,CAAA;CACF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,0BAA2B,CAAC,0BAyC1D,CAAA;AAGD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,0BAA2B,CAAC,KAAG,YAAY,CAAC,CAcnE,CAAA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { getUrlPath, hasUrlQueryParameter, isYouTubeCreatorUrl, isYouTubeFeedUrl, isYouTubeShareUrl, isYouTubeUrl, isYouTubeVideoUrl, isYouTubeVideosInPlaylist, last } from "../index.js";
|
|
2
|
+
import { Never } from "../../constants/Never.js";
|
|
3
|
+
/**
|
|
4
|
+
* **getYouTubePageType**`(url)`
|
|
5
|
+
*
|
|
6
|
+
* Returns a `YouTubePageType` description based on the url passed in (assuming
|
|
7
|
+
* that URL is for YouTube). Returns _never_ if not a YouTube URL.
|
|
8
|
+
*/
|
|
9
|
+
export const getYouTubePageType = (url) => {
|
|
10
|
+
return (isYouTubeUrl(url)
|
|
11
|
+
? isYouTubeVideoUrl(url) && (hasUrlQueryParameter(url, "v") || isYouTubeShareUrl(url))
|
|
12
|
+
? hasUrlQueryParameter(url, "list")
|
|
13
|
+
? isYouTubeShareUrl(url)
|
|
14
|
+
? hasUrlQueryParameter(url, "t")
|
|
15
|
+
? `play::video::in-list::share-link::with-timestamp`
|
|
16
|
+
: `play::video::in-list::share-link`
|
|
17
|
+
: `play::video::in-list`
|
|
18
|
+
: isYouTubeShareUrl(url)
|
|
19
|
+
? hasUrlQueryParameter(url, "t")
|
|
20
|
+
? `play::video::solo::share-link::with-timestamp`
|
|
21
|
+
: `play::video::solo::share-link`
|
|
22
|
+
: `play::video::solo`
|
|
23
|
+
: isYouTubeCreatorUrl(url)
|
|
24
|
+
? getUrlPath(url).includes("/videos")
|
|
25
|
+
? "creator::videos"
|
|
26
|
+
: getUrlPath(url).includes("/playlists")
|
|
27
|
+
? "creator::playlists"
|
|
28
|
+
: last(getUrlPath(url).split("/")).startsWith("@") ||
|
|
29
|
+
getUrlPath(url).includes("/featured")
|
|
30
|
+
? "creator::featured"
|
|
31
|
+
: "creator::other"
|
|
32
|
+
: isYouTubeFeedUrl(url)
|
|
33
|
+
? isYouTubeFeedUrl(url, "history")
|
|
34
|
+
? "feed::history"
|
|
35
|
+
: isYouTubeFeedUrl(url, "playlists")
|
|
36
|
+
? "feed::playlists"
|
|
37
|
+
: isYouTubeFeedUrl(url, "liked")
|
|
38
|
+
? "feed::liked"
|
|
39
|
+
: isYouTubeFeedUrl(url, "subscriptions")
|
|
40
|
+
? "feed::subscriptions"
|
|
41
|
+
: isYouTubeFeedUrl(url, "trending")
|
|
42
|
+
? "feed::trending"
|
|
43
|
+
: "feed::other"
|
|
44
|
+
: isYouTubeVideosInPlaylist(url)
|
|
45
|
+
? "playlist::show"
|
|
46
|
+
: "other"
|
|
47
|
+
: Never);
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* **youtube**`(url)`
|
|
51
|
+
*
|
|
52
|
+
* Takes a YouTube URL and converts it to a meta-data object
|
|
53
|
+
* that helps describe the intent of the URL.
|
|
54
|
+
*/
|
|
55
|
+
export const youtubeMeta = (url) => {
|
|
56
|
+
return (isYouTubeUrl(url)
|
|
57
|
+
? {
|
|
58
|
+
url,
|
|
59
|
+
isYouTubeUrl: true,
|
|
60
|
+
isShareUrl: isYouTubeShareUrl(url),
|
|
61
|
+
pageType: getYouTubePageType(url),
|
|
62
|
+
}
|
|
63
|
+
: {
|
|
64
|
+
url,
|
|
65
|
+
isYouTubeUrl: false
|
|
66
|
+
});
|
|
67
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AsString, CreateDictShape, Dict, NarrowDictProps, Narrowable, OptDictProps, Values } from "../../types/index";
|
|
1
|
+
import { AsString, CreateDictShape, Dict, Keys, NarrowDictProps, Narrowable, OptDictProps, Values } from "../../types/index";
|
|
2
2
|
/**
|
|
3
3
|
* **dict**`(obj, ...props)`
|
|
4
4
|
*
|
|
@@ -6,5 +6,5 @@ import { AsString, CreateDictShape, Dict, NarrowDictProps, Narrowable, OptDictPr
|
|
|
6
6
|
* object but plays nicer with `let` declarations by not allowing
|
|
7
7
|
* re-declarations.
|
|
8
8
|
*/
|
|
9
|
-
export declare const dict: <N extends Narrowable, TObj extends Record<string, N>, TProps extends readonly ((string & keyof TObj) | `opt:${AsString<keyof TObj>}`)[] = []>(obj: TObj, ...props: TProps) => Dict<CreateDictShape<TObj, (TObj extends readonly unknown[] ? import("../../types/index").IsTuple<TObj> extends true ? import("../../types/index").NumericKeys<TObj> extends readonly number[] ? import("../../types/index").NumericKeys<TObj> : never : number[] : TObj extends object ? [import("../../types/index").IsObjectLiteral<import("../../types/index").RemoveIndexKeys<TObj>>] extends [true] ? (import("../../types/index").IsVueRef<import("../../types/index").RemoveIndexKeys<TObj>> extends true ? ["value"] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [symbol] ? import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [] ? import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<TObj>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<TObj>>> extends [import("../../types/index").ObjectKey] ? (keyof import("../../types/index").RemoveIndexKeys<TObj>)[] : import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>>) extends readonly (keyof TObj)[] ? readonly (keyof TObj)[] & (import("../../types/index").IsVueRef<import("../../types/index").RemoveIndexKeys<TObj>> extends true ? ["value"] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [symbol] ? import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [] ? import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<TObj>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<TObj>>> extends [import("../../types/index").ObjectKey] ? (keyof import("../../types/index").RemoveIndexKeys<TObj>)[] : import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>>) : import("../../types/index").IsVueRef<import("../../types/index").RemoveIndexKeys<TObj>> extends true ? ["value"] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [symbol] ? import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [] ? import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<TObj>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<TObj>>> extends [import("../../types/index").ObjectKey] ? (keyof import("../../types/index").RemoveIndexKeys<TObj>)[] : import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> : import("../../types/index").ObjectKey[] : never[]) extends readonly (string & keyof TObj)[] ? readonly (string & keyof TObj)[] & (TObj extends readonly unknown[] ? import("../../types/index").IsTuple<TObj> extends true ? import("../../types/index").NumericKeys<TObj> extends readonly number[] ? import("../../types/index").NumericKeys<TObj> : never : number[] : TObj extends object ? [import("../../types/index").IsObjectLiteral<import("../../types/index").RemoveIndexKeys<TObj>>] extends [true] ? (import("../../types/index").IsVueRef<import("../../types/index").RemoveIndexKeys<TObj>> extends true ? ["value"] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [symbol] ? import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [] ? import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<TObj>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<TObj>>> extends [import("../../types/index").ObjectKey] ? (keyof import("../../types/index").RemoveIndexKeys<TObj>)[] : import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>>) extends readonly (keyof TObj)[] ? readonly (keyof TObj)[] & (import("../../types/index").IsVueRef<import("../../types/index").RemoveIndexKeys<TObj>> extends true ? ["value"] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [symbol] ? import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [] ? import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<TObj>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<TObj>>> extends [import("../../types/index").ObjectKey] ? (keyof import("../../types/index").RemoveIndexKeys<TObj>)[] : import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>>) : import("../../types/index").IsVueRef<import("../../types/index").RemoveIndexKeys<TObj>> extends true ? ["value"] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [symbol] ? import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [] ? import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<TObj>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<TObj>>> extends [import("../../types/index").ObjectKey] ? (keyof import("../../types/index").RemoveIndexKeys<TObj>)[] : import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> : import("../../types/index").ObjectKey[] : never[]) : never, NarrowDictProps<TProps> extends infer T ? T extends NarrowDictProps<TProps> ? T extends readonly string[] ? T : [] : never : never, OptDictProps<TProps> extends infer T_1 ? T_1 extends OptDictProps<TProps> ? T_1 extends readonly string[] ? T_1 : [] : never : never, {}>, `${Values<TObj>["length"]}${(NarrowDictProps<TProps> extends infer T_2 ? T_2 extends NarrowDictProps<TProps> ? T_2 extends readonly string[] ? T_2 : [] : never : never)["length"]}${(OptDictProps<TProps> extends infer T_3 ? T_3 extends OptDictProps<TProps> ? T_3 extends readonly string[] ? T_3 : [] : never : never)["length"]}`>;
|
|
9
|
+
export declare const dict: <N extends Narrowable, TObj extends Record<string, N>, TProps extends readonly ((string & keyof TObj) | `opt:${AsString<keyof TObj>}`)[] = []>(obj: TObj, ...props: TProps) => Dict<CreateDictShape<TObj, Keys<TObj> extends readonly (string & keyof TObj)[] ? readonly (string & keyof TObj)[] & Keys<TObj> : never, NarrowDictProps<TProps> extends infer T ? T extends NarrowDictProps<TProps> ? T extends readonly string[] ? T : [] : never : never, OptDictProps<TProps> extends infer T_1 ? T_1 extends OptDictProps<TProps> ? T_1 extends readonly string[] ? T_1 : [] : never : never, {}>, `${Values<TObj>["length"]}${(NarrowDictProps<TProps> extends infer T ? T extends NarrowDictProps<TProps> ? T extends readonly string[] ? T : [] : never : never)["length"]}${(OptDictProps<TProps> extends infer T_1 ? T_1 extends OptDictProps<TProps> ? T_1 extends readonly string[] ? T_1 : [] : never : never)["length"]}`>;
|
|
10
10
|
//# sourceMappingURL=dict.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dict.d.ts","sourceRoot":"","sources":["../../../src/runtime/runtime-types/dict.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,eAAe,EACf,IAAI,
|
|
1
|
+
{"version":3,"file":"dict.d.ts","sourceRoot":"","sources":["../../../src/runtime/runtime-types/dict.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,eAAe,EACf,IAAI,EACJ,IAAI,EACJ,eAAe,EACf,UAAU,EACV,YAAY,EAEZ,MAAM,EACP,0BAAwB;AA6BzB;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,sJAIV,IAAI,YAAY,MAAM,4tBAY5B,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AsIp6Prefix } from "../../types/string-literals";
|
|
2
|
-
export declare const ip6Prefix: <T extends readonly (`9${string}` | `0${string}` | `1${string}` | `2${string}` | `3${string}` | `4${string}` | `5${string}` | `6${string}` | `7${string}` | `8${string}` | `
|
|
2
|
+
export declare const ip6Prefix: <T extends readonly (`9${string}` | `0${string}` | `1${string}` | `2${string}` | `3${string}` | `4${string}` | `5${string}` | `6${string}` | `7${string}` | `8${string}` | `A${string}` | `B${string}` | `C${string}` | `D${string}` | `E${string}` | `F${string}` | `a${string}` | `b${string}` | `c${string}` | `d${string}` | `e${string}` | `f${string}`)[]>(...groups: T) => AsIp6Prefix<T>;
|
|
3
3
|
//# sourceMappingURL=ip6Prefix.d.ts.map
|
|
@@ -15,7 +15,7 @@ export type ParsedToken<TType> = {
|
|
|
15
15
|
export declare const parse: <T>(value: T) => {
|
|
16
16
|
isToken: boolean;
|
|
17
17
|
type: T;
|
|
18
|
-
token: (T & `<<string${string}>>`) | (T & `<<number${string}>>`) | (T & `<<boolean${string}>>`) | (T & `<<undefined${string}>>`) | (T & `<<
|
|
18
|
+
token: (T & `<<string${string}>>`) | (T & `<<number${string}>>`) | (T & `<<boolean${string}>>`) | (T & `<<undefined${string}>>`) | (T & `<<false${string}>>`) | (T & `<<map${string}>>`) | (T & `<<set${string}>>`) | (T & `<<true${string}>>`) | (T & `<<null${string}>>`) | (T & `<<fn${string}>>`) | (T & `<<tuple${string}>>`) | (T & `<<rec${string}>>`) | (T & `<<arr${string}>>`) | (T & `<<union${string}>>`) | (T & `<<obj${string}>>`) | (T & `<<gen${string}>>`) | (T & `<<string-set${string}>>`) | (T & `<<numeric-set${string}>>`) | (T & `<<union-set${string}>>`);
|
|
19
19
|
tokenName: string;
|
|
20
20
|
tokenData: string[];
|
|
21
21
|
} | {
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* Given a `Shape` token, this function will extract the
|
|
5
5
|
* data parameters from the token.
|
|
6
6
|
*/
|
|
7
|
-
export declare const getTokenData: <T extends `<<string${string}>>` | `<<number${string}>>` | `<<boolean${string}>>` | `<<undefined${string}>>` | `<<
|
|
7
|
+
export declare const getTokenData: <T extends `<<string${string}>>` | `<<number${string}>>` | `<<boolean${string}>>` | `<<undefined${string}>>` | `<<false${string}>>` | `<<map${string}>>` | `<<set${string}>>` | `<<true${string}>>` | `<<null${string}>>` | `<<fn${string}>>` | `<<tuple${string}>>` | `<<rec${string}>>` | `<<arr${string}>>` | `<<union${string}>>` | `<<obj${string}>>` | `<<gen${string}>>` | `<<string-set${string}>>` | `<<numeric-set${string}>>` | `<<union-set${string}>>`>(token: T) => string[];
|
|
8
8
|
//# sourceMappingURL=getTokenData.d.ts.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Given a `Shape` token, this function will extract the
|
|
5
5
|
*/
|
|
6
|
-
export declare const getTokenName: <T extends `<<string${string}>>` | `<<number${string}>>` | `<<boolean${string}>>` | `<<undefined${string}>>` | `<<
|
|
6
|
+
export declare const getTokenName: <T extends `<<string${string}>>` | `<<number${string}>>` | `<<boolean${string}>>` | `<<undefined${string}>>` | `<<false${string}>>` | `<<map${string}>>` | `<<set${string}>>` | `<<true${string}>>` | `<<null${string}>>` | `<<fn${string}>>` | `<<tuple${string}>>` | `<<rec${string}>>` | `<<arr${string}>>` | `<<union${string}>>` | `<<obj${string}>>` | `<<gen${string}>>` | `<<string-set${string}>>` | `<<numeric-set${string}>>` | `<<union-set${string}>>`>(token: T) => string;
|
|
7
7
|
//# sourceMappingURL=getTokenName.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"singletons.d.ts","sourceRoot":"","sources":["../../../../src/runtime/runtime-types/shape-helpers/singletons.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"singletons.d.ts","sourceRoot":"","sources":["../../../../src/runtime/runtime-types/shape-helpers/singletons.ts"],"names":[],"mappings":"AAAC,OAAO,EAMN,oBAAoB,EAGpB,YAAY,EAKb,6BAAwB;AAmEzB,eAAO,MAAM,MAAM,wJAAoC,CAAC;AACxD,eAAO,MAAM,MAAM,kIAAyB,CAAC"}
|
|
@@ -10,7 +10,7 @@ const addSingleton = (token, api) => (...literals) => {
|
|
|
10
10
|
: literals.length === 1
|
|
11
11
|
? addToken(token, literals[0])
|
|
12
12
|
: addToken("union", literals
|
|
13
|
-
.map(l => addToken(token, `${l}`))
|
|
13
|
+
.map((l) => addToken(token, `${l}`))
|
|
14
14
|
.join(",")));
|
|
15
15
|
};
|
|
16
16
|
const stringApi = ({
|
|
@@ -14,5 +14,5 @@ export declare const shape: <T extends ShapeCallback>(cb: T) => HandleDoneFn<Ret
|
|
|
14
14
|
*
|
|
15
15
|
* Type guard which tests whether a value is a _type_ defined by a `Shape`.
|
|
16
16
|
*/
|
|
17
|
-
export declare const isShape: (v: unknown) => v is `<<string${string}>>` | `<<number${string}>>` | `<<boolean${string}>>` | `<<undefined${string}>>` | `<<
|
|
17
|
+
export declare const isShape: (v: unknown) => v is `<<string${string}>>` | `<<number${string}>>` | `<<boolean${string}>>` | `<<undefined${string}>>` | `<<false${string}>>` | `<<map${string}>>` | `<<set${string}>>` | `<<true${string}>>` | `<<null${string}>>` | `<<fn${string}>>` | `<<tuple${string}>>` | `<<rec${string}>>` | `<<arr${string}>>` | `<<union${string}>>` | `<<obj${string}>>` | `<<gen${string}>>` | `<<string-set${string}>>` | `<<numeric-set${string}>>` | `<<union-set${string}>>`;
|
|
18
18
|
//# sourceMappingURL=shape.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SHAPE_PREFIXES } from "../../constants/Shape.js";
|
|
2
|
-
import { isString, hasKeys, isObject, handleDoneFn } from "../index.js";
|
|
2
|
+
import { isString, hasKeys, isObject, handleDoneFn, } from "../index.js";
|
|
3
3
|
import { boolean, nullType, undefinedType, unknown } from "./shape-helpers/atomics.js";
|
|
4
4
|
import { number, string } from "./shape-helpers/singletons.js";
|
|
5
5
|
import { fn } from "./shape-helpers/functions.js";
|