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
|
@@ -11,7 +11,9 @@ import { ensureLeading, ensureTrailing } from "../index.js";
|
|
|
11
11
|
*/
|
|
12
12
|
export function ensureSurround(prefix, postfix) {
|
|
13
13
|
const fn = (input) => {
|
|
14
|
-
|
|
14
|
+
let result = input;
|
|
15
|
+
result = ensureLeading(result, prefix);
|
|
16
|
+
result = ensureTrailing(result, postfix);
|
|
15
17
|
return result;
|
|
16
18
|
};
|
|
17
19
|
return fn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/identity.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/identity.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,QAAQ,GACnB,CAAC,KAEE,CAAC,MACA,CAAC"}
|
|
@@ -26,6 +26,7 @@ export * from "./retainAfter";
|
|
|
26
26
|
export * from "./surround";
|
|
27
27
|
export * from "./stripAfter";
|
|
28
28
|
export * from "./stripBefore";
|
|
29
|
+
export * from "./stripSurround";
|
|
29
30
|
export * from "./stripUntil";
|
|
30
31
|
export * from "./trim";
|
|
31
32
|
export * from "./toPascalCase";
|
|
@@ -36,5 +37,5 @@ export * from "./takeNumericCharacters";
|
|
|
36
37
|
export * from "./retainChars";
|
|
37
38
|
export * from "./stripChars";
|
|
38
39
|
export * from "./retainWhile";
|
|
39
|
-
export * from "./
|
|
40
|
+
export * from "./phone/index";
|
|
40
41
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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,cAAc,CAAC;AAC7B,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;
|
|
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,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,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;AAG9B,cAAc,eAAe,CAAC"}
|
|
@@ -31,6 +31,7 @@ export * from "./retainAfter.js";
|
|
|
31
31
|
export * from "./surround.js";
|
|
32
32
|
export * from "./stripAfter.js";
|
|
33
33
|
export * from "./stripBefore.js";
|
|
34
|
+
export * from "./stripSurround.js";
|
|
34
35
|
export * from "./stripUntil.js";
|
|
35
36
|
export * from "./trim.js";
|
|
36
37
|
export * from "./toPascalCase.js";
|
|
@@ -41,7 +42,7 @@ export * from "./takeNumericCharacters.js";
|
|
|
41
42
|
export * from "./retainChars.js";
|
|
42
43
|
export * from "./stripChars.js";
|
|
43
44
|
export * from "./retainWhile.js";
|
|
44
|
-
export * from "./
|
|
45
|
+
export * from "./phone/index.js";
|
|
45
46
|
// #endregion auto-indexed files
|
|
46
47
|
// see https://github.com/inocan-group/do-devops/docs/autoindex.md
|
|
47
48
|
// for more info
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"narrow.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/narrow.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,OAAO,EACP,MAAM,EACN,UAAU,EACV,YAAY,EACb,0BAAwB;AAEzB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CACpB,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,WAAW,EACrB,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EACtC,GAAG,MAAM,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"narrow.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/narrow.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,OAAO,EACP,MAAM,EACN,UAAU,EACV,YAAY,EACb,0BAAwB;AAEzB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CACpB,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,WAAW,EACrB,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EACtC,GAAG,MAAM,EAAE,CAAC,GAKI,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,GAC/B,CAAC,CAAC,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,GAC7B,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,GACpB,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,GAAG,SAAS,OAAO,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,GACrD,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACnC,CAAC,CAAC,CAAC,CAAC,GAER,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAChB,CAAC,CAAC,CAAC,CAAC,GACN,QAAQ,CAAC,CAAC,CAAC,CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/runtime/literals/phone/asPhoneNumber.ts"],"names":[],"mappings":"AAuEA,eAAO,MAAM,aAAa,cAA0B,CAAA"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// const convert = (
|
|
2
|
+
// countryCode: string,
|
|
3
|
+
// phone: string,
|
|
4
|
+
// delimiter: string,
|
|
5
|
+
// para: boolean
|
|
6
|
+
// ) => {
|
|
7
|
+
// const chars: string = stripChars(phone, "(", ")") as string;
|
|
8
|
+
// const parts: string[] = chars.trim().split(/[-. ]/);
|
|
9
|
+
// const isRegional = parts.length === 2 ? true : false;
|
|
10
|
+
// const isCountry = parts.length === 3 ? true : false;
|
|
11
|
+
// const isShortCode = parts.length === 1 && phone.split("").length < 7 ? true : false;
|
|
12
|
+
// const replacement = isShortCode
|
|
13
|
+
// ? phone
|
|
14
|
+
// : isRegional
|
|
15
|
+
// ? parts.join(delimiter)
|
|
16
|
+
// : isCountry && para
|
|
17
|
+
// ? `(${parts[0]}) ${parts.slice(1).join(delimiter)}`
|
|
18
|
+
// : isCountry
|
|
19
|
+
// ? parts.join(delimiter)
|
|
20
|
+
// : undefined;
|
|
21
|
+
// if (!replacement) {
|
|
22
|
+
// throw new Error(`invalid phone number: ${phone}. Unable to parse!`)
|
|
23
|
+
// }
|
|
24
|
+
// return countryCode === ""
|
|
25
|
+
// ? replacement
|
|
26
|
+
// : `+${countryCode} ${replacement}`;
|
|
27
|
+
// }
|
|
28
|
+
// /**
|
|
29
|
+
// * **asPhoneNumber**`(phone, format)`
|
|
30
|
+
// *
|
|
31
|
+
// * Receives a phone number and returns it as a well formatted version.
|
|
32
|
+
// */
|
|
33
|
+
// export const asPhoneNumber = <
|
|
34
|
+
// T extends string,
|
|
35
|
+
// F extends PhoneFormat,
|
|
36
|
+
// >(
|
|
37
|
+
// phone: T & PhoneNumber<T>,
|
|
38
|
+
// format: F = "Dotted (e.g., 456.555.1212)" as F
|
|
39
|
+
// ) => {
|
|
40
|
+
// if (!isPhoneNumber(phone)) {
|
|
41
|
+
// throw new Error(`Invalid phone number presented to asPhoneNumber(phone,format)!`);
|
|
42
|
+
// }
|
|
43
|
+
// const countryCode = getPhoneCountryCode(phone) as unknown as string;
|
|
44
|
+
// const remaining = removePhoneCountryCode(phone) as unknown as string;
|
|
45
|
+
// let result: unknown;
|
|
46
|
+
// switch (format) {
|
|
47
|
+
// case "Dashed (e.g., 456-555-1212)":
|
|
48
|
+
// result = convert(countryCode, remaining, "-", false) as unknown;
|
|
49
|
+
// break;
|
|
50
|
+
// case "Dotted (e.g., 456.555.1212)":
|
|
51
|
+
// result = convert(countryCode, remaining, ".", false) as unknown;
|
|
52
|
+
// break;
|
|
53
|
+
// case "ParaDashed (e.g., (456) 555-1212)":
|
|
54
|
+
// result = convert(countryCode, remaining, "-", true) as unknown;
|
|
55
|
+
// break;
|
|
56
|
+
// case "ParaSpaced (e.g., (456) 555 1212)":
|
|
57
|
+
// result = convert(countryCode, remaining, " ", true) as unknown;
|
|
58
|
+
// break;
|
|
59
|
+
// }
|
|
60
|
+
// return result ;
|
|
61
|
+
// }
|
|
62
|
+
export const asPhoneFormat = () => `NOT IMPLEMENTED`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPhoneCountryCode.d.ts","sourceRoot":"","sources":["../../../../src/runtime/literals/phone/getPhoneCountryCode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,6BAAwB;AAGtD,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,MAAM,SAC3C,CAAC,KASQ,mBAAmB,CAAC,CAAC,CACtC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NUMERIC_CHAR } from "../../../constants/NumericChar.js";
|
|
2
|
+
import { retainWhile, stripLeading } from "../../index.js";
|
|
3
|
+
export const getPhoneCountryCode = (phone) => {
|
|
4
|
+
return (phone.trim().startsWith("+") || phone.trim().startsWith("00")
|
|
5
|
+
? retainWhile(stripLeading(stripLeading(phone.trim(), "+"), "00"), ...NUMERIC_CHAR)
|
|
6
|
+
: "");
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/runtime/literals/phone/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removePhoneCountryCode.d.ts","sourceRoot":"","sources":["../../../../src/runtime/literals/phone/removePhoneCountryCode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,6BAAwB;AAEzD,eAAO,MAAM,sBAAsB,GACjC,CAAC,SAAS,MAAM,SACT,CAAC,KASQ,sBAAsB,CAAC,CAAC,CACzC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { getPhoneCountryCode, stripLeading } from "../../index.js";
|
|
2
|
+
export const removePhoneCountryCode = (phone) => {
|
|
3
|
+
const countryCode = getPhoneCountryCode(phone);
|
|
4
|
+
return (countryCode !== ""
|
|
5
|
+
? stripLeading(stripLeading(phone.trim(), "+", "00"), countryCode).trim()
|
|
6
|
+
: phone.trim());
|
|
7
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pluralize.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/pluralize.ts"],"names":[],"mappings":"AAMA,OAAO,
|
|
1
|
+
{"version":3,"file":"pluralize.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/pluralize.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,0BAAwB;AA+C5C;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,QAAQ,CAAC,KAAG,SAAS,CAAC,CAAC,CAUhE,CAAC"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { ALPHA_CHARS, CONSONANTS, PLURAL_EXCEPTIONS, SINGULAR_NOUN_ENDINGS } from "../../constants/index.js";
|
|
2
2
|
import { stripTrailing, split } from "../index.js";
|
|
3
3
|
const isException = (word) => Object.keys(PLURAL_EXCEPTIONS).includes(word);
|
|
4
|
-
const
|
|
4
|
+
const _END_IN = [
|
|
5
5
|
"is",
|
|
6
6
|
"y",
|
|
7
7
|
"f",
|
|
8
8
|
"singular-noun"
|
|
9
9
|
];
|
|
10
|
+
/**
|
|
11
|
+
* pluralize based on how word ends
|
|
12
|
+
*/
|
|
10
13
|
const endingIn = (word, postfix) => {
|
|
11
14
|
switch (postfix) {
|
|
12
15
|
case "is":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retainAfter.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/retainAfter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0BAAwB;AAE9C;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,QAAQ,SAAS,MAAM,EACvB,MAAM,SAAS,MAAM,EACrB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"retainAfter.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/retainAfter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0BAAwB;AAE9C;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,QAAQ,SAAS,MAAM,EACvB,MAAM,SAAS,MAAM,EACrB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAGO,WAAW,CAAC,QAAQ,EAAC,MAAM,CAAC,CACnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retainChars.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/retainChars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"retainChars.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/retainChars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,0BAAwB;AAG5D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,GACtB,QAAQ,SAAS,MAAM,EACvB,OAAO,SAAS,SAAS,MAAM,EAAE,WAExB,QAAQ,aACN,OAAO,KACjB,WAAW,CAAC,QAAQ,EAAE,YAAY,CAAC,OAAO,CAAC,CAK7C,CAAA"}
|
|
@@ -13,5 +13,6 @@ import { asChars } from "../type-conversion/asChars.js";
|
|
|
13
13
|
* **Related:** `stripChars()`, `retainWhile()`, `retainUntil()`
|
|
14
14
|
*/
|
|
15
15
|
export const retainChars = (content, ...retain) => {
|
|
16
|
-
|
|
16
|
+
let chars = asChars(content);
|
|
17
|
+
return chars.filter(c => retain.includes(c)).join("");
|
|
17
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retainWhile.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/retainWhile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,WAAW,EAAE,YAAY,EAAE,0BAAwB;AAI7D;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"retainWhile.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/retainWhile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,WAAW,EAAE,YAAY,EAAE,0BAAwB;AAI7D;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GACtB,QAAQ,SAAS,MAAM,EACvB,OAAO,SAAS,SAAS,MAAM,EAAE,WAExB,QAAQ,aACN,OAAO,KAK4B,WAAW,CAAC,QAAQ,EAAE,YAAY,CAAC,OAAO,CAAC,CAC1F,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/split.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,KAAK,EAAE,OAAO,EAAE,0BAAwB;AAElD;;;;;;;;;GASG;AACH,wBAAgB,KAAK,CACnB,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,EAChB,GAAG,EAAE,CAAC,EAAE,GAAG,GAAE,CAAW,
|
|
1
|
+
{"version":3,"file":"split.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/split.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,KAAK,EAAE,OAAO,EAAE,0BAAwB;AAElD;;;;;;;;;GASG;AACH,wBAAgB,KAAK,CACnB,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,EAChB,GAAG,EAAE,CAAC,EAAE,GAAG,GAAE,CAAW,GACY,OAAO,CAAC,CAAC,EAAC,EAAE,CAAC,SAAS,IAAI,GAAI,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS,MAAM,EAAE,CAC/F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripAfter.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripAfter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,0BAAwB;AAE7C;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CACxB,QAAQ,SAAS,MAAM,EACvB,MAAM,SAAS,MAAM,EACrB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"stripAfter.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripAfter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,0BAAwB;AAE7C;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CACxB,QAAQ,SAAS,MAAM,EACvB,MAAM,SAAS,MAAM,EACrB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GACkB,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,CAC9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripBefore.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripBefore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0BAAwB;AAE9C;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,QAAQ,SAAS,MAAM,EACvB,MAAM,SAAS,MAAM,EACrB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"stripBefore.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripBefore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0BAAwB;AAE9C;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,QAAQ,SAAS,MAAM,EACvB,MAAM,SAAS,MAAM,EACrB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAIb,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,CAChD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripChars.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripChars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,UAAU,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"stripChars.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripChars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,UAAU,EAAE,YAAY,EAAE,0BAAwB;AAG5D;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GACrB,QAAQ,SAAS,MAAM,EACvB,OAAO,SAAS,SAAS,MAAM,EAAE,WAExB,QAAQ,YACP,OAAO,KAChB,UAAU,CAAC,QAAQ,EAAE,YAAY,CAAC,OAAO,CAAC,CAM5C,CAAA"}
|
|
@@ -7,5 +7,6 @@ import { asChars } from "../type-conversion/asChars.js";
|
|
|
7
7
|
* **Related:** `retainChars()`
|
|
8
8
|
*/
|
|
9
9
|
export const stripChars = (content, ...strip) => {
|
|
10
|
-
|
|
10
|
+
let chars = asChars(content);
|
|
11
|
+
return (chars.filter(c => !strip.includes(c)).join(""));
|
|
11
12
|
};
|
|
@@ -5,5 +5,5 @@ import { StripLeading, TupleToUnion } from "../../types/index";
|
|
|
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, TupleToUnion<U>>;
|
|
8
|
+
export declare function stripLeading<T extends string | number, U extends readonly (string | number)[]>(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,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;AAG7D;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,CAAC,SAAS,MAAM,GAAG,MAAM,EACzB,CAAC,SAAS,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAEtC,OAAO,EAAE,CAAC,EACV,GAAG,KAAK,EAAE,CAAC,GAYK,YAAY,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CACjD"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isNumber } from "../type-guards/isNumber.js";
|
|
1
2
|
/**
|
|
2
3
|
* **stripLeading**(content, ...strip)
|
|
3
4
|
*
|
|
@@ -5,10 +6,11 @@
|
|
|
5
6
|
* primary content if it exists and leaves content unchanged otherwise.
|
|
6
7
|
*/
|
|
7
8
|
export function stripLeading(content, ...strip) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
let output = String(content);
|
|
10
|
+
for (const s of strip) {
|
|
11
|
+
if (output.startsWith(String(s))) {
|
|
12
|
+
output = output.slice(String(s).length);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return (isNumber(content) ? Number(output) : output);
|
|
14
16
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { StripSurround, TupleToUnion } from "../../types/index";
|
|
2
|
+
export type StripSurroundConfigured<TStrip extends readonly (string | number)[]> = <TInput extends string | number>(input: TInput) => StripSurround<TInput, TupleToUnion<TStrip>>;
|
|
3
|
+
/**
|
|
4
|
+
* **stripSurround**`(chars) => (input) => _stripped_`
|
|
5
|
+
*
|
|
6
|
+
* A higher order function which allows you to define a string literal
|
|
7
|
+
* stripping function for both the beginning and end of a string literal.
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* // utility which will strip all starting and ending brackets
|
|
11
|
+
* const stripBrackets = stripSurround("(", ")", "[", "]", "{", "}");
|
|
12
|
+
* // " hello, world "
|
|
13
|
+
* const without = stripBrackets("[ hello, world ]")
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* **Related**: `stripSurroundAndTrim`
|
|
17
|
+
*/
|
|
18
|
+
export declare const stripSurround: <TChars extends readonly (number | string)[]>(...chars: TChars) => StripSurroundConfigured<TChars>;
|
|
19
|
+
//# sourceMappingURL=stripSurround.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stripSurround.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripSurround.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EACb,YAAY,EACb,0BAAwB;AAEzB,MAAM,MAAM,uBAAuB,CACjC,MAAM,SAAS,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,IACzC,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,aAAa,CAAC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;AAGnG;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,GACxB,MAAM,SAAS,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,YAEjC,MAAM,KACf,uBAAuB,CAAC,MAAM,CAmBhC,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { isNumber, } from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* **stripSurround**`(chars) => (input) => _stripped_`
|
|
4
|
+
*
|
|
5
|
+
* A higher order function which allows you to define a string literal
|
|
6
|
+
* stripping function for both the beginning and end of a string literal.
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* // utility which will strip all starting and ending brackets
|
|
10
|
+
* const stripBrackets = stripSurround("(", ")", "[", "]", "{", "}");
|
|
11
|
+
* // " hello, world "
|
|
12
|
+
* const without = stripBrackets("[ hello, world ]")
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* **Related**: `stripSurroundAndTrim`
|
|
16
|
+
*/
|
|
17
|
+
export const stripSurround = (...chars) => {
|
|
18
|
+
return (input) => {
|
|
19
|
+
let output = String(input);
|
|
20
|
+
for (const s of chars) {
|
|
21
|
+
if (output.startsWith(String(s))) {
|
|
22
|
+
output = output.slice(String(s).length);
|
|
23
|
+
}
|
|
24
|
+
if (output.endsWith(String(s))) {
|
|
25
|
+
output = output.slice(0, -1 * String(s).length);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return (isNumber(input) ? Number(output) : output);
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { StripTrailing } from "../../types/index";
|
|
1
|
+
import { StripTrailing, TupleToUnion } from "../../types/index";
|
|
2
2
|
/**
|
|
3
3
|
* **stripTrailing**(content, strip)
|
|
4
4
|
*
|
|
5
5
|
* Runtime utility which ensures that last part of a string has substring
|
|
6
6
|
* removed if it exists and that strong typing is preserved.
|
|
7
7
|
*/
|
|
8
|
-
export declare function stripTrailing<T extends string | number, U extends string | number>(content: T, strip: U): StripTrailing<T, U
|
|
8
|
+
export declare function stripTrailing<T extends string | number, U extends readonly (string | number)[]>(content: T, ...strip: U): StripTrailing<T, TupleToUnion<U>>;
|
|
9
9
|
//# sourceMappingURL=stripTrailing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripTrailing.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripTrailing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,0BAAwB;
|
|
1
|
+
{"version":3,"file":"stripTrailing.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripTrailing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,0BAAwB;AAG9D;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,CAAC,SAAS,MAAM,GAAG,MAAM,EACzB,CAAC,SAAS,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAEtC,OAAO,EAAE,CAAC,EACV,GAAG,KAAK,EAAE,CAAC,GACV,aAAa,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CAYnC"}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
return typeof content === "number"
|
|
3
|
-
? Number(val)
|
|
4
|
-
: val;
|
|
5
|
-
};
|
|
1
|
+
import { isNumber } from "../type-guards/index.js";
|
|
6
2
|
/**
|
|
7
3
|
* **stripTrailing**(content, strip)
|
|
8
4
|
*
|
|
9
5
|
* Runtime utility which ensures that last part of a string has substring
|
|
10
6
|
* removed if it exists and that strong typing is preserved.
|
|
11
7
|
*/
|
|
12
|
-
export function stripTrailing(content, strip) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
export function stripTrailing(content, ...strip) {
|
|
9
|
+
let output = String(content);
|
|
10
|
+
for (const s of strip) {
|
|
11
|
+
if (output.endsWith(String(s))) {
|
|
12
|
+
output = output.slice(0, -1 * String(s).length);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return (isNumber(content) ? Number(output) : output);
|
|
17
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripUntil.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripUntil.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAC,UAAU,EAAE,0BAAwB;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"stripUntil.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripUntil.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAC,UAAU,EAAE,0BAAwB;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GACrB,QAAQ,SAAS,MAAM,EACvB,MAAM,SAAS,SAAS,MAAM,EAAE,WACvB,QAAQ,YAAY,MAAM,KAIS,UAAU,CAAC,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC,CACtF,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { RetainWhile } from "../../types/string-literals";
|
|
1
|
+
import { NumericChar, RetainWhile } from "../../types/string-literals";
|
|
2
2
|
/**
|
|
3
3
|
* **takeNumericCharacters**`(content)`
|
|
4
4
|
*
|
|
5
5
|
* Starts at the passed in content and extracts all numeric characters
|
|
6
6
|
* in the string until a non-numeric value arrives.
|
|
7
7
|
*/
|
|
8
|
-
export declare const takeNumericCharacters: <T extends string>(content: T) => RetainWhile<T,
|
|
8
|
+
export declare const takeNumericCharacters: <T extends string>(content: T) => RetainWhile<T, NumericChar>;
|
|
9
9
|
//# sourceMappingURL=takeNumericCharacters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"takeNumericCharacters.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/takeNumericCharacters.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"takeNumericCharacters.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/takeNumericCharacters.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,oCAAkC;AAGrE;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,MAAM,WAAW,CAAC,KAGZ,WAAW,CAAC,CAAC,EAAE,WAAW,CAC/E,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toKebabCase.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/toKebabCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,0BAAwB;AAE5C;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CACzB,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,OAAO,GAAG,KAAK,EACzB,KAAK,EAAE,CAAC,EAAE,mBAAmB,CAAC,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"toKebabCase.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/toKebabCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,0BAAwB;AAE5C;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CACzB,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,OAAO,GAAG,KAAK,EACzB,KAAK,EAAE,CAAC,EAAE,mBAAmB,CAAC,EAAE,CAAC,GAcF,SAAS,CAAC,CAAC,EAAC,CAAC,CAAC,CAC9C"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ToNumericArray } from "../../types/index";
|
|
2
|
-
export declare const toNumericArray: <T extends
|
|
1
|
+
import { ToNumericArray, Tuple } from "../../types/index";
|
|
2
|
+
export declare const toNumericArray: <T extends Tuple>(arr: T) => ToNumericArray<T>;
|
|
3
3
|
//# sourceMappingURL=toNumericArray.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toNumericArray.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/toNumericArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"toNumericArray.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/toNumericArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,0BAAwB;AAExD,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,KAAK,OAAO,CAAC,KACP,cAAc,CAAC,CAAC,CAC9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toPascalCase.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/toPascalCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,0BAAwB;AAI9E;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EACzC,KAAK,EAAE,CAAC,EAAE,kBAAkB,GAAE,CAAkB,
|
|
1
|
+
{"version":3,"file":"toPascalCase.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/toPascalCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,0BAAwB;AAI9E;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EACzC,KAAK,EAAE,CAAC,EAAE,kBAAkB,GAAE,CAAkB,GAiB/B,IAAI,SAAS,CAAC,GAC3B,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,GAC3D,UAAU,CAAC,CAAC,CAAC,CAClB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Truncate } from "../../types/index";
|
|
2
|
-
export declare const truncate: <TStr extends string, TMax extends number, TEllipsis extends
|
|
2
|
+
export declare const truncate: <TStr extends string, TMax extends number, TEllipsis extends boolean | string = false>(content: TStr, maxLength: TMax, ellipsis?: TEllipsis) => Truncate<TStr, TMax, TEllipsis>;
|
|
3
3
|
//# sourceMappingURL=truncate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"truncate.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/truncate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,0BAAwB;AAI3C,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"truncate.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/truncate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,0BAAwB;AAI3C,eAAO,MAAM,QAAQ,GACnB,IAAI,SAAS,MAAM,EACnB,IAAI,SAAS,MAAM,EACnB,SAAS,SAAS,OAAO,GAAG,MAAM,mBACzB,IAAI,aAAa,IAAI,aAAY,SAAS,KAS9C,QAAQ,CAAC,IAAI,EAAC,IAAI,EAAC,SAAS,CAElC,CAAA"}
|
|
@@ -9,5 +9,5 @@ import { First, If, IsUnion, Length, Narrowable, UnionToTuple } from "../../type
|
|
|
9
9
|
* const t2 = tuple([1,2,3]);
|
|
10
10
|
* ```
|
|
11
11
|
*/
|
|
12
|
-
export declare const tuple: <N extends Narrowable, K extends PropertyKey, T extends readonly (
|
|
12
|
+
export declare const tuple: <N extends Narrowable, K extends PropertyKey, T extends readonly (Record<K, N> | Narrowable)[]>(...values: T) => import("../../types/index").AsArray<Length<T> extends 1 ? T[0] extends readonly unknown[] ? T[0] extends infer Arr ? If<IsUnion<First<Arr & readonly unknown[]>>, UnionToTuple<First<T[0]>>, T[0]> : T[0] : T[0] : T>;
|
|
13
13
|
//# sourceMappingURL=tuple.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tuple.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/tuple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,0BAAwB;AAGvF;;;;;;;;;GASG;AACH,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"tuple.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/tuple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,0BAAwB;AAGvF;;;;;;;;;GASG;AACH,eAAO,MAAM,KAAK,GAChB,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,WAAW,EACrB,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,UAAU,CAAC,EAAE,aACrC,CAAC,oHAOW,GAAG,mGAY3B,CAAC"}
|
|
@@ -1 +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,
|
|
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,GACzB,CAAC,SAAS,MAAM,OAEX,CAAC,KAIU,cAAc,CAAC,CAAC,CACjC,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,MAAM,OAAO,CAAC,sDAEzD,CAAA;AAUD,eAAO,MAAM,UAAU,GACrB,CAAC,SAAS,MAAM,OAEX,CAAC,kBAOP,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,GAC5B,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,GAAG,SAAS,OAEvB,CAAC,aACI,CAAC,iDAqBZ,CAAA;AAED,eAAO,MAAM,UAAU,GACrB,CAAC,SAAS,MAAM,OAEX,CAAC,uBAUP,CAAA;AAED,eAAO,MAAM,YAAY,GACvB,CAAC,SAAS,MAAM,OAEX,CAAC,KAQU,YAAY,CAAC,CAAC,CAC/B,CAAA;AAGD;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAClB,CAAC,SAAS,MAAM,OACX,CAAC;;WAGiB,KAAK,CAAC,CAAC,CAAC;cACI,cAAc,CAAC,CAAC,CAAC;UACzB,UAAU,CAAC,CAAC,CAAC;;UAEb,UAAU,CAAC,CAAC,CAAC;YACT,YAAY,CAAC,CAAC,CAAC;iBACG,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;kBAC1B,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;kBAC7B,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;CAGjF,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isUrl, isIp4Address, isIp6Address, isIpAddress, stripAfter, stripBefore, ensureLeading, stripTrailing, isDomainName, takeNumericCharacters, } from "../index.js";
|
|
2
2
|
import { NETWORK_PROTOCOL_LOOKUP } from "../../constants/NetworkConstants.js";
|
|
3
|
-
import { Never } from "../../constants/
|
|
3
|
+
import { Never } from "../../constants/index.js";
|
|
4
4
|
const PROTOCOLS = Object.values(NETWORK_PROTOCOL_LOOKUP).flat().filter(i => i !== "");
|
|
5
5
|
export const getUrlProtocol = (url) => {
|
|
6
6
|
const proto = PROTOCOLS.find(p => url.startsWith(`${p}://`));
|
|
@@ -9,9 +9,12 @@ export const getUrlProtocol = (url) => {
|
|
|
9
9
|
export const removeUrlProtocol = (url) => {
|
|
10
10
|
return stripBefore(url, "://");
|
|
11
11
|
};
|
|
12
|
-
const ensurePath = (val) =>
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
const ensurePath = (val) => {
|
|
13
|
+
const val2 = ensureLeading(val, "/");
|
|
14
|
+
return val === ""
|
|
15
|
+
? ""
|
|
16
|
+
: stripTrailing(val2, "/");
|
|
17
|
+
};
|
|
15
18
|
export const getUrlPath = (url) => {
|
|
16
19
|
return isUrl(url)
|
|
17
20
|
? ensurePath(stripAfter(stripBefore(removeUrlProtocol(url), "/"), "?"))
|
|
@@ -30,7 +33,7 @@ export const getUrlQueryParams = (url, specific = undefined) => {
|
|
|
30
33
|
const qp = stripBefore(url, "?");
|
|
31
34
|
if (specific) {
|
|
32
35
|
return (qp.includes(`${specific}=`)
|
|
33
|
-
? decodeURIComponent(stripAfter(stripBefore(qp, (`${specific}=`)), "&").replace(/\+/g,
|
|
36
|
+
? decodeURIComponent(stripAfter(stripBefore(qp, (`${specific}=`)), "&").replace(/\+/g, "%20"))
|
|
34
37
|
: undefined);
|
|
35
38
|
}
|
|
36
39
|
return (qp === ""
|
|
@@ -1 +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,eAAe,EACf,UAAU,EACV,eAAe,EAChB,0BAAwB;AAgBzB;;;;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,
|
|
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,eAAe,EACf,UAAU,EACV,eAAe,EAChB,0BAAwB;AAgBzB;;;;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,GAAI,CAAC,SAAS,MAAM,OAAO,CAAC,KAwCzC,kBAAkB,CAAC,CAAC,CACrC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,QAAS,eAAe,oBAchD,CAAA;AAGD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,MAAM,OAAO,CAAC,KAAG,WAAW,CAAC,CAAC,CAcnE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fifo.d.ts","sourceRoot":"","sources":["../../../src/runtime/queues/fifo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,UAAU,EAAE,0BAAwB;AA4C1E,eAAO,MAAM,eAAe,GAC1B,CAAC,SAAS,SAAS,CAAC,EAAE,EACtB,CAAC,SAAS,UAAU,WACX,CAAC,yBAGX,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const queue = (state) => ({
|
|
2
|
+
queue: state,
|
|
3
|
+
size: state.length,
|
|
4
|
+
isEmpty() {
|
|
5
|
+
return state.length === 0;
|
|
6
|
+
},
|
|
7
|
+
clear() {
|
|
8
|
+
state.slice(0, 0);
|
|
9
|
+
},
|
|
10
|
+
drain() {
|
|
11
|
+
const old_state = [...state];
|
|
12
|
+
state.slice(0, 0);
|
|
13
|
+
return old_state;
|
|
14
|
+
},
|
|
15
|
+
push(...add) {
|
|
16
|
+
state.push(...add);
|
|
17
|
+
},
|
|
18
|
+
drop(quantity) {
|
|
19
|
+
if (quantity && quantity > state.length) {
|
|
20
|
+
throw new Error('Cannot drop more elements than present in the queue');
|
|
21
|
+
}
|
|
22
|
+
state.splice(0, quantity || 1);
|
|
23
|
+
},
|
|
24
|
+
take(quantity) {
|
|
25
|
+
if (quantity && quantity > state.length) {
|
|
26
|
+
throw new Error('Cannot take more elements than present in the queue');
|
|
27
|
+
}
|
|
28
|
+
const result = state.slice(0, quantity || 1);
|
|
29
|
+
state.splice(0, quantity || 1);
|
|
30
|
+
return result;
|
|
31
|
+
},
|
|
32
|
+
[Symbol.iterator]: function* () {
|
|
33
|
+
for (let i = 0; i < state.length; i++) {
|
|
34
|
+
yield state[i];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
export const createFifoQueue = (...list) => {
|
|
39
|
+
return queue([...list]);
|
|
40
|
+
};
|