inferred-types 0.46.1 → 0.47.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/dist/constants/Marked.d.ts +7 -0
- package/dist/constants/Marked.d.ts.map +1 -1
- package/dist/constants/Never.d.ts.map +1 -1
- package/dist/constants/TypeTokens.d.ts +15 -0
- package/dist/constants/TypeTokens.d.ts.map +1 -1
- package/dist/constants/TypeTokens.js +92 -0
- package/dist/constants/Wide.d.ts +2 -1
- package/dist/constants/Wide.d.ts.map +1 -1
- package/dist/constants/Wide.js +0 -1
- package/dist/constants/createConstant.d.ts.map +1 -1
- package/dist/constants/tsconfig.tsbuildinfo +1 -1
- package/dist/inferred-types/index.cjs +1799 -1076
- package/dist/inferred-types/tsconfig.tsbuildinfo +1 -1
- package/dist/runtime/api/defineApi.d.ts +1 -36
- package/dist/runtime/api/defineApi.d.ts.map +1 -1
- package/dist/runtime/api/defineApi.js +90 -73
- package/dist/runtime/api/handleDoneFn.d.ts.map +1 -1
- package/dist/runtime/api/index.d.ts +1 -1
- package/dist/runtime/boolean-logic/ifArray.d.ts.map +1 -1
- 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/ifBoolean.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifChar.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifFalse.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifHasKey.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifLength.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifNotNull.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifNull.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifNumber.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifScalar.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifString.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifTrue.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifUndefined.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifUndefined.js +1 -1
- package/dist/runtime/combinators/and.d.ts.map +1 -1
- package/dist/runtime/combinators/or.d.ts.map +1 -1
- package/dist/runtime/dictionary/entries.js +1 -1
- package/dist/runtime/dictionary/get.d.ts.map +1 -1
- package/dist/runtime/dictionary/keysOf.d.ts.map +1 -1
- package/dist/runtime/dictionary/omit.d.ts.map +1 -1
- package/dist/runtime/dictionary/retain.d.ts +4 -9
- package/dist/runtime/dictionary/retain.d.ts.map +1 -1
- package/dist/runtime/dictionary/sharedKeys.d.ts +1 -1
- package/dist/runtime/dictionary/sharedKeys.d.ts.map +1 -1
- package/dist/runtime/dictionary/takeProp.d.ts.map +1 -1
- package/dist/runtime/dictionary/valuesOf.d.ts.map +1 -1
- package/dist/runtime/dictionary/withDefaults.d.ts.map +1 -1
- package/dist/runtime/dictionary/withKeys.d.ts +2 -2
- package/dist/runtime/dictionary/withKeys.d.ts.map +1 -1
- package/dist/runtime/dictionary/withoutKeys.d.ts +1 -13
- package/dist/runtime/dictionary/withoutKeys.d.ts.map +1 -1
- package/dist/runtime/dictionary/withoutValue.d.ts.map +1 -1
- package/dist/runtime/errors/KindError.d.ts.map +1 -1
- package/dist/runtime/errors/TypedError.d.ts.map +1 -1
- package/dist/runtime/errors/createErrorCondition.d.ts +5 -0
- package/dist/runtime/errors/createErrorCondition.d.ts.map +1 -1
- package/dist/runtime/errors/createErrorCondition.js +5 -0
- package/dist/runtime/errors/kindedError.d.ts.map +1 -1
- package/dist/runtime/functions/fnMeta.d.ts.map +1 -1
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +2 -0
- package/dist/runtime/initializers/addFnToProps.d.ts +2 -2
- package/dist/runtime/initializers/addFnToProps.d.ts.map +1 -1
- package/dist/runtime/initializers/addPropsToFn.d.ts +2 -2
- package/dist/runtime/initializers/addPropsToFn.d.ts.map +1 -1
- package/dist/runtime/initializers/createFnWithProps.d.ts.map +1 -1
- package/dist/runtime/initializers/defineObj.d.ts +2 -2
- package/dist/runtime/initializers/defineObj.d.ts.map +1 -1
- package/dist/runtime/initializers/defineTuple.d.ts.map +1 -1
- package/dist/runtime/lists/asArray.d.ts.map +1 -1
- package/dist/runtime/lists/createComparison.d.ts +2 -3
- package/dist/runtime/lists/createComparison.d.ts.map +1 -1
- package/dist/runtime/lists/createComparison.js +1 -1
- package/dist/runtime/lists/createConverter.d.ts +1 -1
- package/dist/runtime/lists/createConverter.d.ts.map +1 -1
- package/dist/runtime/lists/filter.d.ts +1 -1
- package/dist/runtime/lists/filter.js +4 -4
- package/dist/runtime/lists/find.d.ts +1 -1
- package/dist/runtime/lists/find.d.ts.map +1 -1
- package/dist/runtime/lists/index.d.ts +0 -1
- package/dist/runtime/lists/index.d.ts.map +1 -1
- package/dist/runtime/lists/index.js +0 -1
- package/dist/runtime/lists/indexOf.d.ts.map +1 -1
- package/dist/runtime/lists/indexOf.js +8 -5
- package/dist/runtime/lists/intersection.d.ts.map +1 -1
- package/dist/runtime/lists/join.d.ts +1 -1
- package/dist/runtime/lists/join.d.ts.map +1 -1
- package/dist/runtime/lists/join.js +6 -2
- package/dist/runtime/lists/last.d.ts +2 -2
- package/dist/runtime/lists/last.d.ts.map +1 -1
- package/dist/runtime/lists/logicalReturns.d.ts.map +1 -1
- package/dist/runtime/lists/reverse.d.ts.map +1 -1
- package/dist/runtime/lists/shift.d.ts +17 -5
- package/dist/runtime/lists/shift.d.ts.map +1 -1
- package/dist/runtime/lists/shift.js +33 -5
- package/dist/runtime/lists/slice.d.ts +2 -2
- package/dist/runtime/lists/slice.d.ts.map +1 -1
- package/dist/runtime/lists/unique.d.ts +2 -2
- package/dist/runtime/lists/unique.d.ts.map +1 -1
- package/dist/runtime/literals/box.d.ts.map +1 -1
- package/dist/runtime/literals/ensureLeading.d.ts +2 -2
- package/dist/runtime/literals/ensureLeading.d.ts.map +1 -1
- package/dist/runtime/literals/ensureLeading.js +6 -2
- package/dist/runtime/literals/ensureSurround.d.ts.map +1 -1
- package/dist/runtime/literals/ensureSurround.js +3 -1
- package/dist/runtime/literals/identity.d.ts.map +1 -1
- package/dist/runtime/literals/index.d.ts +2 -1
- package/dist/runtime/literals/index.d.ts.map +1 -1
- package/dist/runtime/literals/index.js +2 -1
- package/dist/runtime/literals/narrow.d.ts.map +1 -1
- package/dist/runtime/literals/phone/asPhoneNumber.d.ts +2 -0
- package/dist/runtime/literals/phone/asPhoneNumber.d.ts.map +1 -0
- package/dist/runtime/literals/phone/asPhoneNumber.js +62 -0
- package/dist/runtime/literals/phone/getPhoneCountryCode.d.ts +3 -0
- package/dist/runtime/literals/phone/getPhoneCountryCode.d.ts.map +1 -0
- package/dist/runtime/literals/phone/getPhoneCountryCode.js +7 -0
- package/dist/runtime/literals/phone/index.d.ts +4 -0
- package/dist/runtime/literals/phone/index.d.ts.map +1 -0
- package/dist/runtime/literals/phone/index.js +3 -0
- package/dist/runtime/literals/phone/removePhoneCountryCode.d.ts +3 -0
- package/dist/runtime/literals/phone/removePhoneCountryCode.d.ts.map +1 -0
- package/dist/runtime/literals/phone/removePhoneCountryCode.js +7 -0
- package/dist/runtime/literals/pluralize.d.ts.map +1 -1
- package/dist/runtime/literals/pluralize.js +4 -1
- package/dist/runtime/literals/retainAfter.d.ts.map +1 -1
- package/dist/runtime/literals/retainChars.d.ts +1 -1
- package/dist/runtime/literals/retainChars.d.ts.map +1 -1
- package/dist/runtime/literals/retainChars.js +2 -1
- package/dist/runtime/literals/retainWhile.d.ts.map +1 -1
- package/dist/runtime/literals/split.d.ts.map +1 -1
- package/dist/runtime/literals/stripAfter.d.ts.map +1 -1
- package/dist/runtime/literals/stripBefore.d.ts.map +1 -1
- package/dist/runtime/literals/stripChars.d.ts +1 -1
- package/dist/runtime/literals/stripChars.d.ts.map +1 -1
- package/dist/runtime/literals/stripChars.js +2 -1
- package/dist/runtime/literals/stripLeading.d.ts +1 -1
- package/dist/runtime/literals/stripLeading.d.ts.map +1 -1
- package/dist/runtime/literals/stripLeading.js +8 -6
- package/dist/runtime/literals/stripSurround.d.ts +19 -0
- package/dist/runtime/literals/stripSurround.d.ts.map +1 -0
- package/dist/runtime/literals/stripSurround.js +30 -0
- package/dist/runtime/literals/stripTrailing.d.ts +2 -2
- package/dist/runtime/literals/stripTrailing.d.ts.map +1 -1
- package/dist/runtime/literals/stripTrailing.js +9 -10
- package/dist/runtime/literals/stripUntil.d.ts.map +1 -1
- package/dist/runtime/literals/takeNumericCharacters.d.ts +2 -2
- package/dist/runtime/literals/takeNumericCharacters.d.ts.map +1 -1
- package/dist/runtime/literals/toKebabCase.d.ts.map +1 -1
- package/dist/runtime/literals/toNumericArray.d.ts +2 -2
- package/dist/runtime/literals/toNumericArray.d.ts.map +1 -1
- package/dist/runtime/literals/toPascalCase.d.ts.map +1 -1
- package/dist/runtime/literals/truncate.d.ts +1 -1
- package/dist/runtime/literals/truncate.d.ts.map +1 -1
- package/dist/runtime/literals/tuple.d.ts +1 -1
- package/dist/runtime/literals/tuple.d.ts.map +1 -1
- package/dist/runtime/meta/urlMeta.d.ts.map +1 -1
- package/dist/runtime/meta/urlMeta.js +8 -5
- package/dist/runtime/meta/youtube-meta.d.ts.map +1 -1
- package/dist/runtime/queues/fifo.d.ts +3 -0
- package/dist/runtime/queues/fifo.d.ts.map +1 -0
- package/dist/runtime/queues/fifo.js +40 -0
- package/dist/runtime/queues/index.d.ts +3 -0
- package/dist/runtime/queues/index.d.ts.map +1 -0
- package/dist/runtime/queues/index.js +2 -0
- package/dist/runtime/queues/lifo.d.ts +3 -0
- package/dist/runtime/queues/lifo.d.ts.map +1 -0
- package/dist/runtime/queues/lifo.js +34 -0
- package/dist/runtime/runtime-types/asToken.d.ts +35 -0
- package/dist/runtime/runtime-types/asToken.d.ts.map +1 -0
- package/dist/runtime/runtime-types/asToken.js +115 -0
- package/dist/runtime/runtime-types/asType.d.ts +4 -0
- package/dist/runtime/runtime-types/asType.d.ts.map +1 -0
- package/dist/runtime/runtime-types/asType.js +6 -0
- package/dist/runtime/runtime-types/choices.js +8 -8
- package/dist/runtime/runtime-types/index.d.ts +3 -2
- package/dist/runtime/runtime-types/index.d.ts.map +1 -1
- package/dist/runtime/runtime-types/index.js +3 -2
- package/dist/runtime/runtime-types/ip6Prefix.d.ts +2 -2
- package/dist/runtime/runtime-types/ip6Prefix.d.ts.map +1 -1
- package/dist/runtime/runtime-types/list.d.ts.map +1 -1
- package/dist/runtime/runtime-types/rec.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape-helpers/addToken.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape-helpers/atomics.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape-helpers/functions.d.ts +7 -2
- package/dist/runtime/runtime-types/shape-helpers/functions.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape-helpers/functions.js +5 -0
- package/dist/runtime/runtime-types/shape-helpers/getTokenData.d.ts +2 -1
- package/dist/runtime/runtime-types/shape-helpers/getTokenData.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape-helpers/getTokenName.d.ts +2 -1
- package/dist/runtime/runtime-types/shape-helpers/getTokenName.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape-helpers/literal-containers.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape-helpers/regexToken.d.ts +12 -0
- package/dist/runtime/runtime-types/shape-helpers/regexToken.d.ts.map +1 -0
- package/dist/runtime/runtime-types/shape-helpers/regexToken.js +39 -0
- package/dist/runtime/runtime-types/shape-helpers/singletons.d.ts +10 -0
- package/dist/runtime/runtime-types/shape-helpers/singletons.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape-helpers/singletons.js +15 -0
- package/dist/runtime/runtime-types/shape-helpers/union.d.ts +5 -0
- package/dist/runtime/runtime-types/shape-helpers/union.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape-helpers/union.js +5 -0
- package/dist/runtime/runtime-types/shape-helpers/wide-containers.d.ts +1 -1
- package/dist/runtime/runtime-types/shape-helpers/wide-containers.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape.d.ts +2 -2
- package/dist/runtime/runtime-types/shape.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape.js +1 -1
- package/dist/runtime/runtime-types/tokens/createTypeToken.d.ts +30 -0
- package/dist/runtime/runtime-types/tokens/createTypeToken.d.ts.map +1 -0
- package/dist/runtime/runtime-types/tokens/createTypeToken.js +29 -0
- package/dist/runtime/runtime-types/tokens/index.d.ts +3 -0
- package/dist/runtime/runtime-types/tokens/index.d.ts.map +1 -0
- package/dist/runtime/runtime-types/tokens/index.js +2 -0
- package/dist/runtime/runtime-types/tokens/simpleToken.d.ts +51 -0
- package/dist/runtime/runtime-types/tokens/simpleToken.d.ts.map +1 -0
- package/dist/runtime/runtime-types/tokens/simpleToken.js +64 -0
- package/dist/runtime/sets/uniqueKeys.d.ts.map +1 -1
- package/dist/runtime/tsconfig.tsbuildinfo +1 -1
- package/dist/runtime/type-conversion/asChars.d.ts.map +1 -1
- package/dist/runtime/type-conversion/asRecord.d.ts +1 -1
- package/dist/runtime/type-conversion/asRecord.d.ts.map +1 -1
- package/dist/runtime/type-conversion/asString.d.ts +7 -1
- package/dist/runtime/type-conversion/asString.d.ts.map +1 -1
- package/dist/runtime/type-conversion/asString.js +11 -3
- package/dist/runtime/type-conversion/csv.d.ts +17 -0
- package/dist/runtime/type-conversion/csv.d.ts.map +1 -0
- package/dist/runtime/type-conversion/csv.js +31 -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.map +1 -1
- package/dist/runtime/type-conversion/json.d.ts +18 -0
- package/dist/runtime/type-conversion/json.d.ts.map +1 -0
- package/dist/runtime/type-conversion/json.js +27 -0
- package/dist/runtime/type-conversion/mergeObjects.d.ts.map +1 -1
- package/dist/runtime/type-conversion/mergeScalars.d.ts.map +1 -1
- package/dist/runtime/type-conversion/optional.d.ts +20 -4
- package/dist/runtime/type-conversion/optional.d.ts.map +1 -1
- package/dist/runtime/type-conversion/optional.js +24 -6
- package/dist/runtime/type-conversion/union.d.ts.map +1 -1
- package/dist/runtime/type-guards/api-tg.d.ts.map +1 -1
- package/dist/runtime/type-guards/hasErrorConditions.d.ts +2 -4
- package/dist/runtime/type-guards/hasErrorConditions.d.ts.map +1 -1
- package/dist/runtime/type-guards/hasIndexOf.d.ts +2 -2
- package/dist/runtime/type-guards/hasIndexOf.d.ts.map +1 -1
- package/dist/runtime/type-guards/hasKeys.d.ts.map +1 -1
- package/dist/runtime/type-guards/hasWhitespace.d.ts.map +1 -1
- package/dist/runtime/type-guards/hasWhitespace.js +1 -1
- package/dist/runtime/type-guards/higher-order/endsWith.d.ts.map +1 -1
- package/dist/runtime/type-guards/higher-order/isEqual.d.ts.map +1 -1
- package/dist/runtime/type-guards/higher-order/isEqual.js +1 -1
- package/dist/runtime/type-guards/higher-order/isLength.d.ts.map +1 -1
- package/dist/runtime/type-guards/higher-order/isLength.js +1 -5
- package/dist/runtime/type-guards/higher-order/isSameTypeOf.d.ts.map +1 -1
- package/dist/runtime/type-guards/higher-order/isTuple.d.ts +1 -2
- package/dist/runtime/type-guards/higher-order/isTuple.d.ts.map +1 -1
- package/dist/runtime/type-guards/higher-order/isTuple.js +1 -2
- package/dist/runtime/type-guards/higher-order/isTypeOf.d.ts +1 -1
- package/dist/runtime/type-guards/higher-order/isTypeOf.d.ts.map +1 -1
- package/dist/runtime/type-guards/higher-order/startsWith.d.ts.map +1 -1
- package/dist/runtime/type-guards/higher-order/startsWith.js +1 -2
- package/dist/runtime/type-guards/index.d.ts +5 -0
- package/dist/runtime/type-guards/index.d.ts.map +1 -1
- package/dist/runtime/type-guards/index.js +5 -0
- package/dist/runtime/type-guards/isAlpha.d.ts.map +1 -1
- package/dist/runtime/type-guards/isBooleanLike.d.ts +9 -0
- package/dist/runtime/type-guards/isBooleanLike.d.ts.map +1 -0
- package/dist/runtime/type-guards/isBooleanLike.js +11 -0
- package/dist/runtime/type-guards/isCssAspectRatio.d.ts +1 -1
- package/dist/runtime/type-guards/isCssAspectRatio.d.ts.map +1 -1
- package/dist/runtime/type-guards/isDoneFn.d.ts.map +1 -1
- package/dist/runtime/type-guards/isEmail.d.ts +2 -1
- package/dist/runtime/type-guards/isEmail.d.ts.map +1 -1
- package/dist/runtime/type-guards/isEmail.js +10 -4
- package/dist/runtime/type-guards/isFalsy.d.ts.map +1 -1
- package/dist/runtime/type-guards/isHexadecimal.d.ts.map +1 -1
- package/dist/runtime/type-guards/isInlineSvg.d.ts +2 -1
- package/dist/runtime/type-guards/isInlineSvg.d.ts.map +1 -1
- package/dist/runtime/type-guards/isLeftRight.d.ts +2 -2
- package/dist/runtime/type-guards/isLeftRight.d.ts.map +1 -1
- package/dist/runtime/type-guards/isNever.d.ts.map +1 -1
- package/dist/runtime/type-guards/isNumericString.d.ts +8 -0
- package/dist/runtime/type-guards/isNumericString.d.ts.map +1 -1
- package/dist/runtime/type-guards/isNumericString.js +11 -0
- package/dist/runtime/type-guards/isPhoneNumber.d.ts +1 -1
- package/dist/runtime/type-guards/isPhoneNumber.d.ts.map +1 -1
- package/dist/runtime/type-guards/isPhoneNumber.js +16 -10
- package/dist/runtime/type-guards/isRegExp.d.ts +17 -0
- package/dist/runtime/type-guards/isRegExp.d.ts.map +1 -0
- package/dist/runtime/type-guards/isRegExp.js +32 -0
- package/dist/runtime/type-guards/isRuntimeUnion.d.ts.map +1 -1
- package/dist/runtime/type-guards/isSpecificConstant.d.ts.map +1 -1
- package/dist/runtime/type-guards/isTrimmable.d.ts.map +1 -1
- package/dist/runtime/type-guards/isTruthy.d.ts.map +1 -1
- package/dist/runtime/type-guards/isUnset.d.ts.map +1 -1
- package/dist/runtime/type-guards/isUrl.d.ts +3 -3
- package/dist/runtime/type-guards/isUrl.d.ts.map +1 -1
- package/dist/runtime/type-guards/network-tg.d.ts +6 -7
- package/dist/runtime/type-guards/network-tg.d.ts.map +1 -1
- package/dist/runtime/type-guards/network-tg.js +4 -9
- package/dist/runtime/type-guards/repos.d.ts +9 -7
- package/dist/runtime/type-guards/repos.d.ts.map +1 -1
- package/dist/runtime/type-guards/repos.js +1 -3
- package/dist/runtime/type-guards/tokens/index.d.ts +6 -0
- package/dist/runtime/type-guards/tokens/index.d.ts.map +1 -0
- package/dist/runtime/type-guards/tokens/index.js +5 -0
- package/dist/runtime/type-guards/tokens/isAtomicToken.d.ts +9 -0
- package/dist/runtime/type-guards/tokens/isAtomicToken.d.ts.map +1 -0
- package/dist/runtime/type-guards/tokens/isAtomicToken.js +12 -0
- package/dist/runtime/type-guards/tokens/isContainerToken.d.ts +21 -0
- package/dist/runtime/type-guards/tokens/isContainerToken.d.ts.map +1 -0
- package/dist/runtime/type-guards/tokens/isContainerToken.js +48 -0
- package/dist/runtime/type-guards/tokens/isFunctionToken.d.ts +4 -0
- package/dist/runtime/type-guards/tokens/isFunctionToken.d.ts.map +1 -0
- package/dist/runtime/type-guards/tokens/isFunctionToken.js +7 -0
- package/dist/runtime/type-guards/tokens/isShapeToken.d.ts +9 -0
- package/dist/runtime/type-guards/tokens/isShapeToken.d.ts.map +1 -0
- package/dist/runtime/type-guards/tokens/isShapeToken.js +21 -0
- package/dist/runtime/type-guards/tokens/isSimpleToken.d.ts +53 -0
- package/dist/runtime/type-guards/tokens/isSimpleToken.d.ts.map +1 -0
- package/dist/runtime/type-guards/tokens/isSimpleToken.js +74 -0
- package/dist/runtime/type-guards/tokens/isSingletonToken.d.ts +9 -0
- package/dist/runtime/type-guards/tokens/isSingletonToken.d.ts.map +1 -0
- package/dist/runtime/type-guards/tokens/isSingletonToken.js +12 -0
- package/dist/runtime/type-guards/tokens/isTupleToken.d.ts +1 -0
- package/dist/runtime/type-guards/tokens/isTupleToken.d.ts.map +1 -0
- package/dist/runtime/type-guards/tokens/isTupleToken.js +1 -0
- package/dist/runtime/type-guards/tokens/isUnionSetToken.d.ts +1 -0
- package/dist/runtime/type-guards/tokens/isUnionSetToken.d.ts.map +1 -0
- package/dist/runtime/type-guards/tokens/isUnionSetToken.js +1 -0
- package/dist/runtime/type-guards/tokens/isUnionToken.d.ts +9 -0
- package/dist/runtime/type-guards/tokens/isUnionToken.d.ts.map +1 -0
- package/dist/runtime/type-guards/tokens/isUnionToken.js +12 -0
- package/dist/runtime/type-guards/youtube.d.ts +5 -5
- package/dist/runtime/type-guards/youtube.d.ts.map +1 -1
- package/dist/runtime/type-guards/youtube.js +1 -3
- package/dist/runtime/vuejs/asVueRef.d.ts +1 -1
- package/dist/runtime/vuejs/asVueRef.d.ts.map +1 -1
- package/dist/types/base-types/LikeRegExp.d.ts +9 -0
- package/dist/types/base-types/LikeRegExp.d.ts.map +1 -0
- package/dist/types/base-types/Something.d.ts.map +1 -1
- package/dist/types/base-types/Something.js +1 -0
- package/dist/types/base-types/fns/AnyFunction.d.ts.map +1 -1
- package/dist/types/base-types/fns/AnyFunction.js +1 -1
- package/dist/types/base-types/fns/FnAllowingProps.d.ts +11 -0
- package/dist/types/base-types/fns/FnAllowingProps.d.ts.map +1 -0
- package/dist/types/base-types/fns/index.d.ts +1 -2
- package/dist/types/base-types/fns/index.d.ts.map +1 -1
- package/dist/types/base-types/fns/index.js +1 -2
- package/dist/types/base-types/index.d.ts +1 -0
- package/dist/types/base-types/index.d.ts.map +1 -1
- package/dist/types/base-types/index.js +1 -0
- package/dist/types/boolean-logic/branching/OnPass.d.ts.map +1 -1
- package/dist/types/boolean-logic/combinators/Compare.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/AreSameLength.d.ts +2 -2
- package/dist/types/boolean-logic/operators/AreSameLength.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/Contains.d.ts +4 -3
- package/dist/types/boolean-logic/operators/Contains.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/HasArray.d.ts +10 -0
- package/dist/types/boolean-logic/operators/HasArray.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/HasArray.js +1 -0
- package/dist/types/boolean-logic/operators/HasRequiredProps.d.ts +1 -2
- package/dist/types/boolean-logic/operators/HasRequiredProps.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/HaveSameNumericSign.d.ts +9 -0
- package/dist/types/boolean-logic/operators/HaveSameNumericSign.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/HaveSameNumericSign.js +1 -0
- package/dist/types/boolean-logic/operators/IsEmptyString.d.ts +12 -0
- package/dist/types/boolean-logic/operators/IsEmptyString.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/IsEmptyString.js +1 -0
- package/dist/types/boolean-logic/operators/IsFloat.d.ts +2 -2
- package/dist/types/boolean-logic/operators/IsFloat.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsGreaterThan.d.ts +8 -2
- package/dist/types/boolean-logic/operators/IsGreaterThan.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsInteger.d.ts +2 -2
- package/dist/types/boolean-logic/operators/IsInteger.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsLessThan.d.ts +8 -2
- package/dist/types/boolean-logic/operators/IsLessThan.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsNegativeNumber.d.ts +2 -4
- package/dist/types/boolean-logic/operators/IsNegativeNumber.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsNonLiteralUnion.d.ts +1 -1
- package/dist/types/boolean-logic/operators/IsNonLiteralUnion.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsPositiveNumber.d.ts +11 -0
- package/dist/types/boolean-logic/operators/IsPositiveNumber.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/IsPositiveNumber.js +1 -0
- package/dist/types/boolean-logic/operators/IsTuple.d.ts +1 -1
- package/dist/types/boolean-logic/operators/IsUrl.d.ts +7 -8
- package/dist/types/boolean-logic/operators/IsUrl.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/MaybeError.d.ts +20 -0
- package/dist/types/boolean-logic/operators/MaybeError.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/MaybeError.js +2 -0
- package/dist/types/boolean-logic/operators/PhoneOperators.d.ts +2 -3
- package/dist/types/boolean-logic/operators/PhoneOperators.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/StartsWith.d.ts +8 -9
- package/dist/types/boolean-logic/operators/StartsWith.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/UnionHasArray.d.ts +14 -0
- package/dist/types/boolean-logic/operators/UnionHasArray.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/UnionHasArray.js +1 -0
- package/dist/types/boolean-logic/operators/index.d.ts +6 -0
- package/dist/types/boolean-logic/operators/index.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/index.js +6 -0
- package/dist/types/containers/RemoveEmpty.d.ts +30 -0
- package/dist/types/containers/RemoveEmpty.d.ts.map +1 -0
- package/dist/types/containers/RemoveEmpty.js +1 -0
- package/dist/types/containers/RemoveMarked.d.ts +1 -1
- package/dist/types/containers/RemoveMarked.d.ts.map +1 -1
- package/dist/types/containers/RemoveUndefined.d.ts +1 -7
- package/dist/types/containers/RemoveUndefined.d.ts.map +1 -1
- package/dist/types/containers/index.d.ts +1 -0
- package/dist/types/containers/index.d.ts.map +1 -1
- package/dist/types/containers/index.js +1 -0
- package/dist/types/dictionary/EnsureKeys.d.ts +1 -3
- package/dist/types/dictionary/EnsureKeys.d.ts.map +1 -1
- package/dist/types/dictionary/Keys.d.ts +2 -2
- package/dist/types/dictionary/Keys.d.ts.map +1 -1
- package/dist/types/dictionary/OptionalKeys.d.ts +2 -2
- package/dist/types/dictionary/OptionalKeys.d.ts.map +1 -1
- package/dist/types/dictionary/OptionalKeys.js +0 -1
- package/dist/types/dictionary/RequireProps.d.ts +2 -2
- package/dist/types/dictionary/RequireProps.d.ts.map +1 -1
- package/dist/types/dictionary/RequiredKeys.d.ts +2 -2
- package/dist/types/dictionary/RequiredKeys.d.ts.map +1 -1
- package/dist/types/dictionary/WithValue.d.ts +2 -3
- package/dist/types/dictionary/WithValue.d.ts.map +1 -1
- package/dist/types/dictionary/WithoutKeys.d.ts +3 -3
- package/dist/types/dictionary/WithoutKeys.d.ts.map +1 -1
- package/dist/types/functional/Result.d.ts +1 -1
- package/dist/types/functional/Result.d.ts.map +1 -1
- package/dist/types/functions/FnFrom.d.ts +1 -1
- package/dist/types/functions/FnFrom.d.ts.map +1 -1
- package/dist/types/functions/FnWithProps.d.ts +10 -0
- package/dist/types/functions/FnWithProps.d.ts.map +1 -0
- package/dist/types/functions/FnWithProps.js +1 -0
- package/dist/types/functions/IdentityFn.d.ts +1 -2
- package/dist/types/functions/IdentityFn.d.ts.map +1 -1
- package/dist/types/functions/index.d.ts +1 -0
- package/dist/types/functions/index.d.ts.map +1 -1
- package/dist/types/functions/index.js +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/lists/AsArray.d.ts +7 -2
- package/dist/types/lists/AsArray.d.ts.map +1 -1
- package/dist/types/lists/BeforeLast.d.ts +3 -3
- package/dist/types/lists/Filter.d.ts +2 -9
- package/dist/types/lists/Filter.d.ts.map +1 -1
- package/dist/types/lists/FilterByProp.d.ts +37 -0
- package/dist/types/lists/FilterByProp.d.ts.map +1 -0
- package/dist/types/lists/FilterByProp.js +1 -0
- package/dist/types/lists/Flatten.d.ts +31 -14
- package/dist/types/lists/Flatten.d.ts.map +1 -1
- package/dist/types/lists/Last.d.ts +2 -2
- package/dist/types/lists/Last.d.ts.map +1 -1
- package/dist/types/lists/Length.d.ts +3 -4
- package/dist/types/lists/Length.d.ts.map +1 -1
- package/dist/types/lists/RetainByProp.d.ts +38 -0
- package/dist/types/lists/RetainByProp.d.ts.map +1 -0
- package/dist/types/lists/RetainByProp.js +1 -0
- package/dist/types/lists/Shift.d.ts +5 -3
- package/dist/types/lists/Shift.d.ts.map +1 -1
- package/dist/types/lists/Slice.d.ts +17 -9
- package/dist/types/lists/Slice.d.ts.map +1 -1
- package/dist/types/lists/TakeFirst.d.ts +21 -0
- package/dist/types/lists/TakeFirst.d.ts.map +1 -0
- package/dist/types/lists/TakeFirst.js +1 -0
- package/dist/types/lists/TakeLast.d.ts +16 -0
- package/dist/types/lists/TakeLast.d.ts.map +1 -0
- package/dist/types/lists/TakeLast.js +1 -0
- package/dist/types/lists/index.d.ts +4 -0
- package/dist/types/lists/index.d.ts.map +1 -1
- package/dist/types/lists/index.js +4 -0
- package/dist/types/literals/BooleanLike.d.ts +8 -0
- package/dist/types/literals/BooleanLike.d.ts.map +1 -0
- package/dist/types/literals/BooleanLike.js +1 -0
- package/dist/types/literals/NarrowableDefined.d.ts +2 -1
- package/dist/types/literals/NarrowableDefined.d.ts.map +1 -1
- package/dist/types/literals/NarrowableDefined.js +0 -1
- package/dist/types/literals/Shape.d.ts +10 -1
- package/dist/types/literals/Shape.d.ts.map +1 -1
- 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/Abs.d.ts +2 -2
- package/dist/types/numeric-literals/Abs.d.ts.map +1 -1
- package/dist/types/numeric-literals/Add.d.ts +5 -3
- package/dist/types/numeric-literals/Add.d.ts.map +1 -1
- package/dist/types/numeric-literals/AsNegativeNumber.d.ts +12 -0
- package/dist/types/numeric-literals/AsNegativeNumber.d.ts.map +1 -0
- package/dist/types/numeric-literals/AsNegativeNumber.js +1 -0
- package/dist/types/numeric-literals/CSV.d.ts +73 -0
- package/dist/types/numeric-literals/CSV.d.ts.map +1 -0
- package/dist/types/numeric-literals/CSV.js +1 -0
- package/dist/types/numeric-literals/Delta.d.ts +14 -0
- package/dist/types/numeric-literals/Delta.d.ts.map +1 -0
- package/dist/types/numeric-literals/Delta.js +1 -0
- package/dist/types/numeric-literals/Digit.d.ts +2 -3
- package/dist/types/numeric-literals/Digit.d.ts.map +1 -1
- package/dist/types/numeric-literals/Digitize.d.ts +10 -20
- package/dist/types/numeric-literals/Digitize.d.ts.map +1 -1
- package/dist/types/numeric-literals/Increment.d.ts +2 -5
- package/dist/types/numeric-literals/Increment.d.ts.map +1 -1
- package/dist/types/numeric-literals/InvertNumericSign.d.ts +9 -0
- package/dist/types/numeric-literals/InvertNumericSign.d.ts.map +1 -0
- package/dist/types/numeric-literals/InvertNumericSign.js +1 -0
- package/dist/types/numeric-literals/NumberLike.d.ts.map +1 -1
- package/dist/types/numeric-literals/Subtract.d.ts +11 -8
- package/dist/types/numeric-literals/Subtract.d.ts.map +1 -1
- package/dist/types/numeric-literals/Zero.d.ts +8 -0
- package/dist/types/numeric-literals/Zero.d.ts.map +1 -0
- package/dist/types/numeric-literals/Zero.js +1 -0
- package/dist/types/numeric-literals/index.d.ts +5 -0
- package/dist/types/numeric-literals/index.d.ts.map +1 -1
- package/dist/types/numeric-literals/index.js +5 -0
- package/dist/types/queues/FifoQueue.d.ts +31 -0
- package/dist/types/queues/FifoQueue.d.ts.map +1 -0
- package/dist/types/queues/FifoQueue.js +1 -0
- package/dist/types/queues/LifoQueue.d.ts +31 -0
- package/dist/types/queues/LifoQueue.d.ts.map +1 -0
- package/dist/types/queues/LifoQueue.js +1 -0
- package/dist/types/queues/index.d.ts +3 -0
- package/dist/types/queues/index.d.ts.map +1 -0
- package/dist/types/queues/index.js +2 -0
- package/dist/types/runtime-types/AsType.d.ts +16 -0
- package/dist/types/runtime-types/AsType.d.ts.map +1 -0
- package/dist/types/runtime-types/AsType.js +1 -0
- package/dist/types/runtime-types/SimpleType.d.ts +47 -0
- package/dist/types/runtime-types/SimpleType.d.ts.map +1 -0
- package/dist/types/runtime-types/SimpleType.js +1 -0
- package/dist/types/runtime-types/Type.d.ts +1 -1
- package/dist/types/runtime-types/Type.d.ts.map +1 -1
- package/dist/types/runtime-types/TypeOf.d.ts +1 -1
- package/dist/types/runtime-types/TypeOf.d.ts.map +1 -1
- package/dist/types/runtime-types/TypeToken.d.ts +119 -9
- package/dist/types/runtime-types/TypeToken.d.ts.map +1 -1
- package/dist/types/runtime-types/index.d.ts +2 -1
- package/dist/types/runtime-types/index.d.ts.map +1 -1
- package/dist/types/runtime-types/index.js +2 -1
- package/dist/types/sets/Intersection.d.ts +1 -1
- package/dist/types/sets/Intersection.d.ts.map +1 -1
- package/dist/types/string-literals/Date.d.ts +4 -4
- package/dist/types/string-literals/Date.d.ts.map +1 -1
- package/dist/types/string-literals/EnsureLeading.d.ts +10 -6
- package/dist/types/string-literals/EnsureLeading.d.ts.map +1 -1
- package/dist/types/string-literals/EnsureTrailing.d.ts +5 -6
- package/dist/types/string-literals/EnsureTrailing.d.ts.map +1 -1
- package/dist/types/string-literals/Join.d.ts +3 -2
- package/dist/types/string-literals/Join.d.ts.map +1 -1
- package/dist/types/string-literals/Proxmox.d.ts +2 -3
- package/dist/types/string-literals/Proxmox.d.ts.map +1 -1
- package/dist/types/string-literals/Split.d.ts +1 -1
- package/dist/types/string-literals/Split.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/StripSurround.d.ts +16 -0
- package/dist/types/string-literals/StripSurround.d.ts.map +1 -0
- package/dist/types/string-literals/StripSurround.js +1 -0
- package/dist/types/string-literals/StripTrailing.d.ts +2 -2
- package/dist/types/string-literals/StripTrailing.d.ts.map +1 -1
- package/dist/types/string-literals/StripUntil.d.ts +1 -1
- package/dist/types/string-literals/StripUntil.d.ts.map +1 -1
- package/dist/types/string-literals/Suggest.d.ts.map +1 -1
- package/dist/types/string-literals/Surround.d.ts +2 -2
- package/dist/types/string-literals/Surround.d.ts.map +1 -1
- package/dist/types/string-literals/Truncate.d.ts +4 -4
- package/dist/types/string-literals/Truncate.d.ts.map +1 -1
- package/dist/types/string-literals/UnderlyingType.d.ts +18 -0
- package/dist/types/string-literals/UnderlyingType.d.ts.map +1 -0
- package/dist/types/string-literals/UnderlyingType.js +1 -0
- package/dist/types/string-literals/character-sets/CSS.d.ts +13 -0
- package/dist/types/string-literals/character-sets/CSS.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/Consonants.d.ts +3 -4
- package/dist/types/string-literals/character-sets/Consonants.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/DomainName.d.ts +1 -1
- package/dist/types/string-literals/character-sets/DomainName.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/IpAddress.d.ts +1 -1
- package/dist/types/string-literals/character-sets/IpAddress.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/LowerAlphaChar.d.ts +2 -3
- package/dist/types/string-literals/character-sets/LowerAlphaChar.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/NumericChar.d.ts +3 -4
- package/dist/types/string-literals/character-sets/NumericChar.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/Repos.d.ts +2 -1
- package/dist/types/string-literals/character-sets/Repos.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/SingularNoun.d.ts +1 -1
- package/dist/types/string-literals/character-sets/SingularNoun.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/UpperAlphaChar.d.ts +2 -3
- package/dist/types/string-literals/character-sets/UpperAlphaChar.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/Url.d.ts +4 -3
- package/dist/types/string-literals/character-sets/Url.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/Url.js +0 -1
- package/dist/types/string-literals/character-sets/Whitespace.d.ts +1 -1
- package/dist/types/string-literals/character-sets/Whitespace.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/index.d.ts +1 -1
- package/dist/types/string-literals/character-sets/index.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/index.js +1 -1
- package/dist/types/string-literals/character-sets/phone/CountryPhoneNumber.d.ts +12 -0
- package/dist/types/string-literals/character-sets/phone/CountryPhoneNumber.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/CountryPhoneNumber.js +1 -0
- package/dist/types/string-literals/character-sets/phone/DialCountryCode.d.ts +9 -0
- package/dist/types/string-literals/character-sets/phone/DialCountryCode.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/DialCountryCode.js +1 -0
- package/dist/types/string-literals/character-sets/phone/GetPhoneCountryCode.d.ts +14 -0
- package/dist/types/string-literals/character-sets/phone/GetPhoneCountryCode.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/GetPhoneCountryCode.js +1 -0
- package/dist/types/string-literals/character-sets/phone/GetPhoneNumberType.d.ts +10 -0
- package/dist/types/string-literals/character-sets/phone/GetPhoneNumberType.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/GetPhoneNumberType.js +1 -0
- package/dist/types/string-literals/character-sets/phone/InternationalPhoneNumber.d.ts +12 -0
- package/dist/types/string-literals/character-sets/phone/InternationalPhoneNumber.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/InternationalPhoneNumber.js +1 -0
- package/dist/types/string-literals/character-sets/phone/LocalPhoneNumber.d.ts +12 -0
- package/dist/types/string-literals/character-sets/phone/LocalPhoneNumber.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/LocalPhoneNumber.js +1 -0
- package/dist/types/string-literals/character-sets/phone/PhoneAreaCode.d.ts +6 -0
- package/dist/types/string-literals/character-sets/phone/PhoneAreaCode.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/PhoneAreaCode.js +1 -0
- package/dist/types/string-literals/character-sets/phone/PhoneCountryCode.d.ts +13 -0
- package/dist/types/string-literals/character-sets/phone/PhoneCountryCode.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/PhoneCountryCode.js +1 -0
- package/dist/types/string-literals/character-sets/phone/PhoneNumber.d.ts +23 -0
- package/dist/types/string-literals/character-sets/phone/PhoneNumber.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/PhoneNumber.js +1 -0
- package/dist/types/string-literals/character-sets/phone/PhoneNumberDelimiter.d.ts +5 -0
- package/dist/types/string-literals/character-sets/phone/PhoneNumberDelimiter.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/PhoneNumberDelimiter.js +1 -0
- package/dist/types/string-literals/character-sets/phone/PhoneShortCode.d.ts +19 -0
- package/dist/types/string-literals/character-sets/phone/PhoneShortCode.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/PhoneShortCode.js +1 -0
- package/dist/types/string-literals/character-sets/phone/RawPhoneNumber.d.ts +30 -0
- package/dist/types/string-literals/character-sets/phone/RawPhoneNumber.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/RawPhoneNumber.js +1 -0
- package/dist/types/string-literals/character-sets/phone/RemovePhoneCountryCode.d.ts +27 -0
- package/dist/types/string-literals/character-sets/phone/RemovePhoneCountryCode.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/RemovePhoneCountryCode.js +1 -0
- package/dist/types/string-literals/character-sets/phone/ToPhoneFormat.d.ts +17 -0
- package/dist/types/string-literals/character-sets/phone/ToPhoneFormat.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/ToPhoneFormat.js +1 -0
- package/dist/types/string-literals/character-sets/phone/index.d.ts +15 -0
- package/dist/types/string-literals/character-sets/phone/index.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/index.js +14 -0
- package/dist/types/string-literals/character-sets/phone.d.ts +0 -187
- package/dist/types/string-literals/character-sets/phone.d.ts.map +1 -1
- package/dist/types/string-literals/geo/state.d.ts +1 -1
- package/dist/types/string-literals/geo/state.d.ts.map +1 -1
- package/dist/types/string-literals/geo/zip.d.ts +1 -1
- package/dist/types/string-literals/geo/zip.d.ts.map +1 -1
- 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/AsBoolean.d.ts +7 -4
- package/dist/types/type-conversion/AsBoolean.d.ts.map +1 -1
- package/dist/types/type-conversion/AsNumber.d.ts +8 -3
- package/dist/types/type-conversion/AsNumber.d.ts.map +1 -1
- package/dist/types/type-conversion/AsString.d.ts +3 -1
- package/dist/types/type-conversion/AsString.d.ts.map +1 -1
- package/dist/types/type-conversion/AsStringUnion.d.ts +25 -0
- package/dist/types/type-conversion/AsStringUnion.d.ts.map +1 -0
- package/dist/types/type-conversion/AsStringUnion.js +1 -0
- package/dist/types/type-conversion/JSON.d.ts +25 -0
- package/dist/types/type-conversion/JSON.d.ts.map +1 -0
- package/dist/types/type-conversion/JSON.js +1 -0
- package/dist/types/type-conversion/StringLiteralFromTuple.d.ts +18 -0
- package/dist/types/type-conversion/StringLiteralFromTuple.d.ts.map +1 -0
- package/dist/types/type-conversion/StringLiteralFromTuple.js +1 -0
- package/dist/types/type-conversion/StripChars.d.ts +7 -6
- package/dist/types/type-conversion/StripChars.d.ts.map +1 -1
- package/dist/types/type-conversion/ToJsonValue.d.ts +11 -0
- package/dist/types/type-conversion/ToJsonValue.d.ts.map +1 -0
- package/dist/types/type-conversion/ToJsonValue.js +1 -0
- package/dist/types/type-conversion/ToStringArray.d.ts +4 -3
- package/dist/types/type-conversion/ToStringArray.d.ts.map +1 -1
- package/dist/types/type-conversion/TupleToUnion.d.ts +2 -2
- package/dist/types/type-conversion/TupleToUnion.d.ts.map +1 -1
- package/dist/types/type-conversion/Widen.js +1 -0
- package/dist/types/type-conversion/index.d.ts +4 -0
- package/dist/types/type-conversion/index.d.ts.map +1 -1
- package/dist/types/type-conversion/index.js +4 -0
- package/package.json +36 -36
- package/dist/runtime/lists/pop.d.ts +0 -17
- package/dist/runtime/lists/pop.d.ts.map +0 -1
- package/dist/runtime/lists/pop.js +0 -16
- package/dist/runtime/literals/asPhoneNumber.d.ts +0 -10
- package/dist/runtime/literals/asPhoneNumber.d.ts.map +0 -1
- package/dist/runtime/literals/asPhoneNumber.js +0 -62
- package/dist/runtime/runtime-types/dict.d.ts +0 -10
- package/dist/runtime/runtime-types/dict.d.ts.map +0 -1
- package/dist/runtime/runtime-types/dict.js +0 -11
- package/dist/runtime/runtime-types/parse.d.ts +0 -16
- package/dist/runtime/runtime-types/parse.d.ts.map +0 -1
- package/dist/runtime/runtime-types/parse.js +0 -29
- package/dist/types/base-types/fns/AnyFnWithDict.d.ts +0 -9
- package/dist/types/base-types/fns/AnyFnWithDict.d.ts.map +0 -1
- package/dist/types/base-types/fns/FnWithDict.d.ts +0 -10
- package/dist/types/base-types/fns/FnWithDict.d.ts.map +0 -1
- package/dist/types/runtime-types/DescribeType.d.ts +0 -40
- package/dist/types/runtime-types/DescribeType.d.ts.map +0 -1
- package/dist/types/runtime-types/DescribeType.js +0 -2
- /package/dist/types/base-types/{fns/AnyFnWithDict.js → LikeRegExp.js} +0 -0
- /package/dist/types/base-types/fns/{FnWithDict.js → FnAllowingProps.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { LeftRight, Narrowable } from "../../types/index";
|
|
1
|
+
import { LeftRight, Narrowable, Tuple } from "../../types/index";
|
|
2
2
|
/**
|
|
3
3
|
* **isLeftRight**(value)
|
|
4
4
|
*
|
|
5
5
|
* Type guard for detecting a `LeftRight` result.
|
|
6
6
|
*/
|
|
7
|
-
export declare const isLeftRight: <T extends Narrowable |
|
|
7
|
+
export declare const isLeftRight: <T extends Narrowable | Tuple>(value: T) => value is T & LeftRight<unknown, unknown>;
|
|
8
8
|
//# sourceMappingURL=isLeftRight.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isLeftRight.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isLeftRight.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"isLeftRight.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isLeftRight.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,0BAAwB;AAI/D;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,UAAU,GAAG,KAAK,SAC/C,CAAC,KACP,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC,OAAO,EAAE,OAAO,CAGzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isNever.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isNever.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,eAAO,MAAM,OAAO,QAAS,OAAO,
|
|
1
|
+
{"version":3,"file":"isNever.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isNever.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,eAAO,MAAM,OAAO,QAAS,OAAO,KAAG,GAAG,IAAI,KAE7C,CAAA"}
|
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
* **isNumericString**(value)
|
|
3
3
|
*
|
|
4
4
|
* Type guard to validate that a value is string which can be converted to a number.
|
|
5
|
+
*
|
|
6
|
+
* @deprecated use `isNumberLike<T>` instead
|
|
5
7
|
*/
|
|
6
8
|
export declare function isNumericString<T>(value: T): value is T & `${number}`;
|
|
9
|
+
/**
|
|
10
|
+
* **isNumberLike**(value)
|
|
11
|
+
*
|
|
12
|
+
* Type guard to validate that a value is string which can be converted to a number.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isNumberLike<T>(value: T): value is T & `${number}`;
|
|
7
15
|
//# sourceMappingURL=isNumericString.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isNumericString.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isNumericString.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,wBAAgB,
|
|
1
|
+
{"version":3,"file":"isNumericString.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isNumericString.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,GAAG,MAAM,EAAE,CAKrE;AAGD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,GAAG,MAAM,EAAE,CAOlE"}
|
|
@@ -4,8 +4,19 @@ import { split } from "../literals/split.js";
|
|
|
4
4
|
* **isNumericString**(value)
|
|
5
5
|
*
|
|
6
6
|
* Type guard to validate that a value is string which can be converted to a number.
|
|
7
|
+
*
|
|
8
|
+
* @deprecated use `isNumberLike<T>` instead
|
|
7
9
|
*/
|
|
8
10
|
export function isNumericString(value) {
|
|
9
11
|
const validChars = [...NUMERIC_CHAR, "x", "E"];
|
|
10
12
|
return typeof value === "string" && split(value).every(i => validChars.includes(i));
|
|
11
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* **isNumberLike**(value)
|
|
16
|
+
*
|
|
17
|
+
* Type guard to validate that a value is string which can be converted to a number.
|
|
18
|
+
*/
|
|
19
|
+
export function isNumberLike(value) {
|
|
20
|
+
const numericChars = [...NUMERIC_CHAR];
|
|
21
|
+
return typeof value === "string" && (split(value).every(i => numericChars.includes(i)));
|
|
22
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isPhoneNumber.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isPhoneNumber.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isPhoneNumber.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isPhoneNumber.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,QAAS,OAAO,YAmBzC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NUMERIC_CHAR, WHITESPACE_CHARS } from "../../constants/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import { retainChars, stripChars } from "../index.js";
|
|
3
3
|
/**
|
|
4
4
|
* **isPhoneNumber**`(val)`
|
|
5
5
|
*
|
|
@@ -13,13 +13,19 @@ import { isString, asChars, retainChars, stripChars } from "../index.js";
|
|
|
13
13
|
* **Related:** `asPhoneNumber()`, `PhoneNumber`
|
|
14
14
|
*/
|
|
15
15
|
export const isPhoneNumber = (val) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
let svelte = String(val).trim();
|
|
17
|
+
let chars = svelte.split("");
|
|
18
|
+
let numeric = retainChars(svelte, ...NUMERIC_CHAR);
|
|
19
|
+
let valid = ["+", "(", ...NUMERIC_CHAR];
|
|
20
|
+
let nothing = stripChars(svelte, ...[
|
|
21
|
+
...NUMERIC_CHAR,
|
|
22
|
+
...WHITESPACE_CHARS, "(", ")", "+", ".", "-"
|
|
23
|
+
]);
|
|
24
|
+
return (chars.every(i => valid.includes(i)) &&
|
|
25
|
+
svelte.startsWith(`+`)
|
|
26
|
+
? numeric.length >= 8
|
|
27
|
+
: svelte.startsWith(`00`)
|
|
28
|
+
? numeric.length >= 10
|
|
29
|
+
: numeric.length >= 7
|
|
30
|
+
&& nothing === "");
|
|
25
31
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LikeRegExp } from "../../types/index";
|
|
2
|
+
/**
|
|
3
|
+
* Type guard that validates the the value passed in is
|
|
4
|
+
* a regular expression.
|
|
5
|
+
*
|
|
6
|
+
* **Related:** `isLikeRegExp`
|
|
7
|
+
*/
|
|
8
|
+
export declare const isRegExp: (val: unknown) => val is RegExp;
|
|
9
|
+
/**
|
|
10
|
+
* Type guard that validates the the value passed in is
|
|
11
|
+
* a regular expression or a string that _can_ be turned
|
|
12
|
+
* into a regular expression.
|
|
13
|
+
*
|
|
14
|
+
* **Related:** `isRegExp`
|
|
15
|
+
*/
|
|
16
|
+
export declare const isLikeRegExp: (val: unknown) => val is LikeRegExp;
|
|
17
|
+
//# sourceMappingURL=isRegExp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isRegExp.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isRegExp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,0BAAwB;AAG7C;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,QAAS,OAAO,KAAG,GAAG,IAAI,MAE9C,CAAA;AAGD;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,QAAS,OAAO,KAAG,GAAG,IAAI,UAelD,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { isString } from "./isString.js";
|
|
2
|
+
/**
|
|
3
|
+
* Type guard that validates the the value passed in is
|
|
4
|
+
* a regular expression.
|
|
5
|
+
*
|
|
6
|
+
* **Related:** `isLikeRegExp`
|
|
7
|
+
*/
|
|
8
|
+
export const isRegExp = (val) => {
|
|
9
|
+
return val instanceof RegExp;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Type guard that validates the the value passed in is
|
|
13
|
+
* a regular expression or a string that _can_ be turned
|
|
14
|
+
* into a regular expression.
|
|
15
|
+
*
|
|
16
|
+
* **Related:** `isRegExp`
|
|
17
|
+
*/
|
|
18
|
+
export const isLikeRegExp = (val) => {
|
|
19
|
+
if (isRegExp(val)) {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
if (isString(val)) {
|
|
23
|
+
try {
|
|
24
|
+
const _re = new RegExp(val);
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return false;
|
|
32
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRuntimeUnion.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isRuntimeUnion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,0BAAwB;AAG/C;;;;GAIG;AACH,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"isRuntimeUnion.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isRuntimeUnion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,0BAAwB;AAG/C;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,OAAO,EAAE,OAAO,OAAO,KAAG,GAAG,IAAI,YAAY,CAAC,CAAC,CAGvF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isSpecificConstant.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isSpecificConstant.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,8BAA4B;AAI/C;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,SAAS,MAAM,EACpB,IAAI,EAAE,KAAK,WACI,OAAO,
|
|
1
|
+
{"version":3,"file":"isSpecificConstant.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isSpecificConstant.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,8BAA4B;AAI/C;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,SAAS,MAAM,EACpB,IAAI,EAAE,KAAK,WACI,OAAO,KAAG,KAAK,IAAI,QAAQ,CAAC,KAAK,CAAC,CAGlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isTrimmable.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isTrimmable.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"isTrimmable.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isTrimmable.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,OAAO,CAAC,KAAG,GAAG,IAAI,CAE7C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isTruthy.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isTruthy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,0BAAwB;AAI7C;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"isTruthy.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isTruthy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,0BAAwB;AAI7C;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,OAAO,CAAC,KAAG,GAAG,IAAI,OAAO,CAAC,CAAC,EAAE,UAAU,CAEhE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isUnset.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isUnset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,0BAAwB;AAGxC;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,QAAS,OAAO,
|
|
1
|
+
{"version":3,"file":"isUnset.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isUnset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,0BAAwB;AAGxC;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,QAAS,OAAO,KAAG,GAAG,IAAI,KAE7C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,OAAO,CAAC,KAAG,GAAG,IAAI,OAAO,CAAC,CAAC,EAAC,KAAK,CAIvD,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Keys, TupleToUnion, NetworkProtocol } from "../../types/index";
|
|
1
|
+
import { Keys, TupleToUnion, NetworkProtocol, Uri } from "../../types/index";
|
|
2
2
|
/**
|
|
3
3
|
* **isUri**`(val, ...protocols)`
|
|
4
4
|
*
|
|
@@ -10,7 +10,7 @@ import { Keys, TupleToUnion, NetworkProtocol } from "../../types/index";
|
|
|
10
10
|
*
|
|
11
11
|
* **Related:** `isUrl`
|
|
12
12
|
*/
|
|
13
|
-
export declare const isUri: <T, P extends readonly NetworkProtocol[]>(val: T, ...protocols: P) => val is T &
|
|
13
|
+
export declare const isUri: <T, P extends readonly NetworkProtocol[]>(val: T, ...protocols: P) => val is T & Uri<Keys<P>["length"] extends 0 ? NetworkProtocol : TupleToUnion<P>>;
|
|
14
14
|
/**
|
|
15
15
|
* **isUrl**`(val,[...protocols])`
|
|
16
16
|
*
|
|
@@ -21,5 +21,5 @@ export declare const isUri: <T, P extends readonly NetworkProtocol[]>(val: T, ..
|
|
|
21
21
|
*
|
|
22
22
|
* **Related:** `isUri`
|
|
23
23
|
*/
|
|
24
|
-
export declare const isUrl: <T, P extends readonly NetworkProtocol[]>(val: T, ...protocols: P) => val is T &
|
|
24
|
+
export declare const isUrl: <T, P extends readonly NetworkProtocol[]>(val: T, ...protocols: P) => val is T & Uri<Keys<P>["length"] extends 0 ? "http" | "https" : TupleToUnion<P>>;
|
|
25
25
|
//# sourceMappingURL=isUrl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isUrl.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isUrl.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAC,YAAY,EAAG,eAAe,
|
|
1
|
+
{"version":3,"file":"isUrl.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isUrl.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAC,YAAY,EAAG,eAAe,EAAE,GAAG,EAAG,0BAAwB;AAE5E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK,GAChB,CAAC,EACD,CAAC,SAAS,SAAS,eAAe,EAAE,OAC/B,CAAC,gBAAgB,CAAC,KAAG,GAAG,IAAI,CAAC,GAAG,GAAG,CACxC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACzB,eAAe,GACf,YAAY,CAAC,CAAC,CAAC,CAOlB,CAAA;AAGD;;;;;;;;;GASG;AACH,eAAO,MAAM,KAAK,GAClB,CAAC,EACD,CAAC,SAAS,SAAS,eAAe,EAAE,OAC7B,CAAC,gBAAgB,CAAC,KAAG,GAAG,IAAI,CAAC,GAAG,GAAG,CAC1C,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACzB,MAAM,GAAG,OAAO,GAChB,YAAY,CAAC,CAAC,CAAC,CAOhB,CAAA"}
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { DomainName, GetUrlProtocolPrefix, GetUrlSource } from "../../types/index";
|
|
2
|
-
import { AsString } from "../../types/type-conversion/AsString";
|
|
1
|
+
import { DomainName, GetUrlProtocolPrefix, GetUrlSource, Ip4Address, Ip6AddressLoose, UrlPath, AsString } from "../../types/index";
|
|
3
2
|
/**
|
|
4
3
|
* **isIp4Address**`(val)`
|
|
5
4
|
*
|
|
6
5
|
* Type guard which checks whether the value is a valid IPv4 address.
|
|
7
6
|
*/
|
|
8
|
-
export declare const isIp4Address: <T>(val: T) => val is T &
|
|
7
|
+
export declare const isIp4Address: <T>(val: T) => val is T & Ip4Address;
|
|
9
8
|
/**
|
|
10
9
|
* **isIp6Address**`(val)`
|
|
11
10
|
*
|
|
12
11
|
* Type guard which checks whether the value is a valid IPv6 address.
|
|
13
12
|
*/
|
|
14
|
-
export declare const isIp6Address: <T>(val: T) => val is T &
|
|
13
|
+
export declare const isIp6Address: <T>(val: T) => val is T & Ip6AddressLoose;
|
|
15
14
|
/**
|
|
16
15
|
* **isIpAddress**`(val)`
|
|
17
16
|
*
|
|
18
17
|
* Type guard which checks whether the value is a valid IP address (v4 or v6).
|
|
19
18
|
*/
|
|
20
|
-
export declare const isIpAddress: <T>(val: T) => val is T & (
|
|
19
|
+
export declare const isIpAddress: <T>(val: T) => val is T & (Ip4Address | Ip6AddressLoose);
|
|
21
20
|
/**
|
|
22
21
|
* **hasUrlPort**`(val)`
|
|
23
22
|
*
|
|
@@ -31,7 +30,7 @@ export declare const hasUrlPort: <T>(val: T) => val is T & `${GetUrlProtocolPref
|
|
|
31
30
|
*
|
|
32
31
|
* Type guard which checks whether the value is a valid `UrlPath`
|
|
33
32
|
*/
|
|
34
|
-
export declare const isUrlPath: <T>(val: T) => val is T &
|
|
33
|
+
export declare const isUrlPath: <T>(val: T) => val is T & UrlPath;
|
|
35
34
|
/**
|
|
36
35
|
* **isDomainName**`(val)`
|
|
37
36
|
*
|
|
@@ -44,7 +43,7 @@ export declare const isDomainName: <T>(val: T) => val is T & DomainName<AsString
|
|
|
44
43
|
* Type guard which checks whether the value is a valid URL source
|
|
45
44
|
* (aka, an IP address or a Domain Name)
|
|
46
45
|
*/
|
|
47
|
-
export declare const isUrlSource: <T>(val: T) =>
|
|
46
|
+
export declare const isUrlSource: <T>(val: T) => val is (T & DomainName<AsString<T>>) | (T & (`${number}.${number}.${number}.${number}` | `0${string}:${string}` | `1${string}:${string}` | `2${string}:${string}` | `3${string}:${string}` | `4${string}:${string}` | `5${string}:${string}` | `6${string}:${string}` | `7${string}:${string}` | `8${string}:${string}` | `9${string}:${string}` | `E${string}:${string}` | `A${string}:${string}` | `B${string}:${string}` | `C${string}:${string}` | `D${string}:${string}` | `F${string}:${string}` | `a${string}:${string}` | `b${string}:${string}` | `c${string}:${string}` | `d${string}:${string}` | `e${string}:${string}` | `f${string}:${string}`));
|
|
48
47
|
/**
|
|
49
48
|
* **hasUrlQueryParameter**`(val,prop)`
|
|
50
49
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network-tg.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/network-tg.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"network-tg.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/network-tg.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,oBAAoB,EACpB,YAAY,EACZ,UAAU,EACV,eAAe,EACf,OAAO,EACP,QAAQ,EACT,0BAAuB;AAexB;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,OAAO,CAAC,KAAG,GAAG,IAAI,CAAC,GAAG,UAKnD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,OAAO,CAAC,KAAG,GAAG,IAAI,CAAC,GAAG,eAOnD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,OAAO,CAAC,KAAG,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,GAAG,eAAe,CAE/E,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,OAAO,CAAC,KAAG,GAAG,IAAI,CAAC,GAAG,GAAG,oBAAoB,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,GAAG,MAAM,EAE1H,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,OAAO,CAAC,KAAG,GAAG,IAAI,CAAC,GAAG,OAahD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,OAAO,CAAC,KAAG,GAAG,IAAI,CAAC,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAQzE,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,OAAO,CAAC,moBAEpC,CAAA;AAGD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,MAAM,EAAC,CAAC,SAAS,MAAM,OAAO,CAAC,QAAQ,CAAC,YAEtF,CAAA"}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { asChars } from "../type-conversion/asChars.js";
|
|
2
|
-
import { isAlpha } from "./isAlpha.js";
|
|
3
|
-
import { isNumericString } from "./isNumericString.js";
|
|
4
1
|
import { isString } from "./isString.js";
|
|
5
|
-
import { ip6GroupExpansion } from "../
|
|
6
|
-
import { isHexadecimal } from "./isHexadecimal.js";
|
|
7
|
-
import { getUrlQueryParams, removeUrlProtocol } from "../meta/index.js";
|
|
2
|
+
import { getUrlQueryParams, removeUrlProtocol, isHexadecimal, ip6GroupExpansion, isNumberLike, isAlpha, asChars } from "../index.js";
|
|
8
3
|
/**
|
|
9
4
|
* **isIp4Address**`(val)`
|
|
10
5
|
*
|
|
@@ -13,7 +8,7 @@ import { getUrlQueryParams, removeUrlProtocol } from "../meta/index.js";
|
|
|
13
8
|
export const isIp4Address = (val) => {
|
|
14
9
|
return isString(val) &&
|
|
15
10
|
(val.split(".").length === 4) &&
|
|
16
|
-
(val.split(".").every(i =>
|
|
11
|
+
(val.split(".").every(i => isNumberLike(i))) &&
|
|
17
12
|
val.split(".").every(i => Number(i) >= 0 && Number(i) <= 255);
|
|
18
13
|
};
|
|
19
14
|
/**
|
|
@@ -56,7 +51,7 @@ export const isUrlPath = (val) => {
|
|
|
56
51
|
return isString(val) &&
|
|
57
52
|
(val === "" || val.startsWith("/")) &&
|
|
58
53
|
(asChars(val).every(c => isAlpha(c) ||
|
|
59
|
-
|
|
54
|
+
isNumberLike(c) ||
|
|
60
55
|
c === "_" ||
|
|
61
56
|
c === "@" ||
|
|
62
57
|
c === "." ||
|
|
@@ -72,7 +67,7 @@ export const isDomainName = (val) => {
|
|
|
72
67
|
val.split(".").filter(i => i).length > 1 &&
|
|
73
68
|
isString(val.split(".").filter(i => i).pop()) &&
|
|
74
69
|
asChars(val.split(".").filter(i => i).pop()).length > 1 &&
|
|
75
|
-
val.split(".").filter(i => i).every(i => isAlpha(i) ||
|
|
70
|
+
val.split(".").filter(i => i).every(i => isAlpha(i) || isNumberLike(i) || i === "-" || i === "_");
|
|
76
71
|
};
|
|
77
72
|
/**
|
|
78
73
|
* **isUrlSource**`(val)`
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { AlphaNumericChar, RepoSource, RepoUrls, SemanticVersion, UrlsFrom } from "../../types/index";
|
|
2
|
+
import { REPO_SOURCE_LOOKUP } from "../../constants/index";
|
|
1
3
|
/**
|
|
2
4
|
* **isRepoSource**`(val)`
|
|
3
5
|
*
|
|
4
6
|
* Type guard which validates whether the value passed in is a
|
|
5
7
|
* `RepoSource`.
|
|
6
8
|
*/
|
|
7
|
-
export declare const isRepoSource: <T>(v: T) => v is T &
|
|
9
|
+
export declare const isRepoSource: <T>(v: T) => v is T & RepoSource;
|
|
8
10
|
/**
|
|
9
11
|
* **isSemanticVersion**`(val,[allowPrefix]=false)`
|
|
10
12
|
*
|
|
@@ -16,36 +18,36 @@ export declare const isRepoSource: <T>(v: T) => v is T & ("github" | "bitbucket"
|
|
|
16
18
|
* `v 1.0.12` are allowed.
|
|
17
19
|
* - by default the `allowPrefix` option is set to false
|
|
18
20
|
*/
|
|
19
|
-
export declare const isSemanticVersion: <T, P extends boolean>(v: T, allowPrefix?: P) => v is T &
|
|
21
|
+
export declare const isSemanticVersion: <T, P extends boolean>(v: T, allowPrefix?: P) => v is T & SemanticVersion<P>;
|
|
20
22
|
/**
|
|
21
23
|
* **isRepoUrl**`(val)`
|
|
22
24
|
*
|
|
23
25
|
* Type guard which validates that the value passed in is a valid Repo URL
|
|
24
26
|
*/
|
|
25
|
-
export declare const isRepoUrl: <T>(val: T) => val is T &
|
|
27
|
+
export declare const isRepoUrl: <T>(val: T) => val is T & RepoUrls;
|
|
26
28
|
/**
|
|
27
29
|
* **isGithubUrl**`(val)`
|
|
28
30
|
*
|
|
29
31
|
* Type guard which validates that the value passed in is a valid Github URL
|
|
30
32
|
*/
|
|
31
|
-
export declare const isGithubUrl: <T>(val: T) => val is T & (
|
|
33
|
+
export declare const isGithubUrl: <T>(val: T) => val is T & UrlsFrom<(typeof REPO_SOURCE_LOOKUP)["github"]>;
|
|
32
34
|
/**
|
|
33
35
|
* **isGithubRepoUrl**
|
|
34
36
|
*
|
|
35
37
|
* Type guard validating that passed in value is valid URL for
|
|
36
38
|
* a Github repo.
|
|
37
39
|
*/
|
|
38
|
-
export declare const isGithubRepoUrl: <T>(val: T) => val is T &
|
|
40
|
+
export declare const isGithubRepoUrl: <T>(val: T) => val is T & `https://github.com/${string}/${AlphaNumericChar}${string}`;
|
|
39
41
|
/**
|
|
40
42
|
* **isBitbucketUrl**`(val)`
|
|
41
43
|
*
|
|
42
44
|
* Type guard which validates that the value passed in is a valid BitBucket URL
|
|
43
45
|
*/
|
|
44
|
-
export declare const isBitbucketUrl: <T>(val: T) => val is T & (
|
|
46
|
+
export declare const isBitbucketUrl: <T>(val: T) => val is T & UrlsFrom<(typeof REPO_SOURCE_LOOKUP)["bitbucket"]>;
|
|
45
47
|
/**
|
|
46
48
|
* **isCodeCommitUrl**`(val)`
|
|
47
49
|
*
|
|
48
50
|
* Type guard which validates that the value passed in is a valid AWS Code Commit URL
|
|
49
51
|
*/
|
|
50
|
-
export declare const isCodeCommitUrl: <T>(val: T) => val is T & (
|
|
52
|
+
export declare const isCodeCommitUrl: <T>(val: T) => val is T & UrlsFrom<(typeof REPO_SOURCE_LOOKUP)["codecommit"]>;
|
|
51
53
|
//# sourceMappingURL=repos.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repos.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/repos.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"repos.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/repos.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,eAAe,EACf,QAAQ,EACT,0BAAwB;AACzB,OAAO,EAAgB,kBAAkB,EAAE,8BAA4B;AAGvE;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,KAAK,CAAC,KAAG,CAAC,IAAI,CAAC,GAAG,UAE/C,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,GAAI,CAAC,EAAC,CAAC,SAAS,OAAO,KACjD,CAAC,gBACU,CAAC,KACb,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,CAAC,CAa5B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,OAAO,CAAC,KAAG,GAAG,IAAI,CAAC,GAAG,QAMhD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,OAAO,CAAC,KAAG,GAAG,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAA,OAAO,kBAAkB,EAAC,QAAQ,CAAC,CAM9F,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,OAAO,CAAC,KAAG,GAAG,IAAI,CAAC,GAAG,sBAAsB,MAAM,IAAI,gBAAgB,GAAG,MAAM,EAM/G,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,OAAO,CAAC,KAAG,GAAG,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAA,OAAO,kBAAkB,EAAC,WAAW,CAAC,CAMpG,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,OAAO,CAAC,KAAG,GAAG,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAA,OAAO,kBAAkB,EAAC,YAAY,CAAC,CAMtG,CAAA"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { isString } from "./isString.js";
|
|
2
1
|
import { REPO_SOURCES, REPO_SOURCE_LOOKUP } from "../../constants/index.js";
|
|
3
|
-
import { stripLeading } from "../
|
|
4
|
-
import { valuesOf } from "../dictionary/index.js";
|
|
2
|
+
import { valuesOf, stripLeading, isString } from "../index.js";
|
|
5
3
|
/**
|
|
6
4
|
* **isRepoSource**`(val)`
|
|
7
5
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/runtime/type-guards/tokens/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AtomicToken } from "../../../types/index";
|
|
2
|
+
/**
|
|
3
|
+
* **isAtomicToken**`(val)`
|
|
4
|
+
*
|
|
5
|
+
* Type guard which validates whether the value passed in is a
|
|
6
|
+
* valid `AtomicToken`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const isAtomicToken: (val: unknown) => val is AtomicToken;
|
|
9
|
+
//# sourceMappingURL=isAtomicToken.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isAtomicToken.d.ts","sourceRoot":"","sources":["../../../../src/runtime/type-guards/tokens/isAtomicToken.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,6BAAwB;AAK9C;;;;;GAKG;AACH,eAAO,MAAM,aAAa,QAAS,OAAO,KAAG,GAAG,IAAI,WAGnD,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TT_Atomics } from "../../../constants/index.js";
|
|
2
|
+
import { isString } from "../../index.js";
|
|
3
|
+
/**
|
|
4
|
+
* **isAtomicToken**`(val)`
|
|
5
|
+
*
|
|
6
|
+
* Type guard which validates whether the value passed in is a
|
|
7
|
+
* valid `AtomicToken`.
|
|
8
|
+
*/
|
|
9
|
+
export const isAtomicToken = (val) => {
|
|
10
|
+
return isString(val) &&
|
|
11
|
+
TT_Atomics.some(v => val === `<<${v}>>`);
|
|
12
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ArrayToken, ContainerToken, MapToken, ObjectToken, RecordToken, SetToken, TupleToken, UnionSetToken, UnionToken, WeakMapToken } from "../../../types/index";
|
|
2
|
+
export declare const isObjectToken: (val: unknown) => val is ObjectToken;
|
|
3
|
+
export declare const isRecordToken: (val: unknown) => val is RecordToken;
|
|
4
|
+
export declare const isTupleToken: (val: unknown) => val is TupleToken;
|
|
5
|
+
export declare const isArrayToken: (val: unknown) => val is ArrayToken;
|
|
6
|
+
export declare const isMapToken: (val: unknown) => val is MapToken;
|
|
7
|
+
export declare const isSetToken: (val: unknown) => val is SetToken;
|
|
8
|
+
export declare const isWeakMapToken: (val: unknown) => val is WeakMapToken;
|
|
9
|
+
/**
|
|
10
|
+
* **isUnionToken**`(val)`: **val** is `UnionToken`
|
|
11
|
+
*/
|
|
12
|
+
export declare const isUnionToken: (val: unknown) => val is UnionToken;
|
|
13
|
+
/**
|
|
14
|
+
* **isUnionSetToken**`(val)`: **val** is `UnionSetToken`
|
|
15
|
+
*/
|
|
16
|
+
export declare const isUnionSetToken: (val: unknown) => val is UnionSetToken;
|
|
17
|
+
/**
|
|
18
|
+
* **isContainerToken**`(val)`: **val** is `ContainerToken`
|
|
19
|
+
*/
|
|
20
|
+
export declare const isContainerToken: (val: unknown) => val is ContainerToken;
|
|
21
|
+
//# sourceMappingURL=isContainerToken.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isContainerToken.d.ts","sourceRoot":"","sources":["../../../../src/runtime/type-guards/tokens/isContainerToken.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,cAAc,EACd,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,6BAAwB;AAG7H,eAAO,MAAM,aAAa,QAAS,OAAO,KAAG,GAAG,IAAI,WAEnD,CAAA;AAED,eAAO,MAAM,aAAa,QAAS,OAAO,KAAG,GAAG,IAAI,WAEnD,CAAA;AAED,eAAO,MAAM,YAAY,QAAS,OAAO,KAAG,GAAG,IAAI,UAElD,CAAA;AAED,eAAO,MAAM,YAAY,QAAS,OAAO,KAAG,GAAG,IAAI,UAElD,CAAA;AAED,eAAO,MAAM,UAAU,QAAS,OAAO,KAAG,GAAG,IAAI,QAEhD,CAAA;AAED,eAAO,MAAM,UAAU,QAAS,OAAO,KAAG,GAAG,IAAI,QAEhD,CAAA;AAED,eAAO,MAAM,cAAc,QAAS,OAAO,KAAG,GAAG,IAAI,YAEpD,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,QAAS,OAAO,KAAG,GAAG,IAAI,UAElD,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,QAAS,OAAO,KAAG,GAAG,IAAI,aAErD,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAS,OAAO,KAAG,GAAG,IAAI,cAYtD,CAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { isString } from "../../index.js";
|
|
2
|
+
export const isObjectToken = (val) => {
|
|
3
|
+
return isString(val) && val.startsWith("<<obj::");
|
|
4
|
+
};
|
|
5
|
+
export const isRecordToken = (val) => {
|
|
6
|
+
return isString(val) && val.startsWith("<<rec::") && val.endsWith(">>");
|
|
7
|
+
};
|
|
8
|
+
export const isTupleToken = (val) => {
|
|
9
|
+
return isString(val) && val.startsWith("<<tuple::");
|
|
10
|
+
};
|
|
11
|
+
export const isArrayToken = (val) => {
|
|
12
|
+
return isString(val) && val.startsWith("<<arr::");
|
|
13
|
+
};
|
|
14
|
+
export const isMapToken = (val) => {
|
|
15
|
+
return isString(val) && val.startsWith("<<map::");
|
|
16
|
+
};
|
|
17
|
+
export const isSetToken = (val) => {
|
|
18
|
+
return isString(val) && val.startsWith("<<set::");
|
|
19
|
+
};
|
|
20
|
+
export const isWeakMapToken = (val) => {
|
|
21
|
+
return isString(val) && val.startsWith("<<weak::");
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* **isUnionToken**`(val)`: **val** is `UnionToken`
|
|
25
|
+
*/
|
|
26
|
+
export const isUnionToken = (val) => {
|
|
27
|
+
return isString(val) && val.startsWith("<<union::[ ");
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* **isUnionSetToken**`(val)`: **val** is `UnionSetToken`
|
|
31
|
+
*/
|
|
32
|
+
export const isUnionSetToken = (val) => {
|
|
33
|
+
return isString(val) && val.startsWith("<<union-set::");
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* **isContainerToken**`(val)`: **val** is `ContainerToken`
|
|
37
|
+
*/
|
|
38
|
+
export const isContainerToken = (val) => {
|
|
39
|
+
return isString(val) && (isObjectToken(val) ||
|
|
40
|
+
isRecordToken(val) ||
|
|
41
|
+
isTupleToken(val) ||
|
|
42
|
+
isArrayToken(val) ||
|
|
43
|
+
isMapToken(val) ||
|
|
44
|
+
isSetToken(val) ||
|
|
45
|
+
isWeakMapToken(val) ||
|
|
46
|
+
isUnionSetToken(val) ||
|
|
47
|
+
isUnionToken(val));
|
|
48
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isFunctionToken.d.ts","sourceRoot":"","sources":["../../../../src/runtime/type-guards/tokens/isFunctionToken.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,6BAAuB;AAIzD,eAAO,MAAM,SAAS,QAAS,OAAO,KAAG,GAAG,IAAI,OAE/C,CAAA;AAED,eAAO,MAAM,gBAAgB,QAAS,OAAO,KAAG,GAAG,IAAI,cAEtD,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TypeToken } from "../../../types/index";
|
|
2
|
+
/**
|
|
3
|
+
* **isShapeToken**`(val)`
|
|
4
|
+
*
|
|
5
|
+
* Type guard which validates whether the value passed in is a
|
|
6
|
+
* valid "shape token" of some sort.
|
|
7
|
+
*/
|
|
8
|
+
export declare const isShapeToken: (val: unknown) => val is TypeToken;
|
|
9
|
+
//# sourceMappingURL=isShapeToken.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isShapeToken.d.ts","sourceRoot":"","sources":["../../../../src/runtime/type-guards/tokens/isShapeToken.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,6BAAwB;AAoB5C;;;;;GAKG;AACH,eAAO,MAAM,YAAY,QAAS,OAAO,KAAG,GAAG,IAAI,SAMlD,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { isString } from "../../index.js";
|
|
2
|
+
import { TT_Atomics, TT_Containers, TT_Functions, TT_Singletons, TT_Sets } from "../../../constants/index.js";
|
|
3
|
+
const token_types = [
|
|
4
|
+
...TT_Atomics,
|
|
5
|
+
...TT_Containers,
|
|
6
|
+
...TT_Functions,
|
|
7
|
+
...TT_Sets,
|
|
8
|
+
...TT_Singletons
|
|
9
|
+
];
|
|
10
|
+
/**
|
|
11
|
+
* **isShapeToken**`(val)`
|
|
12
|
+
*
|
|
13
|
+
* Type guard which validates whether the value passed in is a
|
|
14
|
+
* valid "shape token" of some sort.
|
|
15
|
+
*/
|
|
16
|
+
export const isShapeToken = (val) => {
|
|
17
|
+
return isString(val) &&
|
|
18
|
+
val.startsWith("<<") &&
|
|
19
|
+
val.endsWith(">>") &&
|
|
20
|
+
token_types.some(t => val.startsWith(`<<${t}`));
|
|
21
|
+
};
|