@zeruxjs/validator 0.0.0-stage → 0.0.1
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/LICENSE-APACHE +201 -0
- package/LICENSE-MIT +9 -0
- package/README.md +13 -2
- package/dist/actions/_isIsbn10.d.ts +10 -0
- package/dist/actions/_isIsbn10.js +18 -0
- package/dist/actions/_isIsbn10.js.map +1 -0
- package/dist/actions/_isIsbn13.d.ts +10 -0
- package/dist/actions/_isIsbn13.js +18 -0
- package/dist/actions/_isIsbn13.js.map +1 -0
- package/dist/actions/_isPartiallyTyped.d.ts +13 -0
- package/dist/actions/_isPartiallyTyped.js +45 -0
- package/dist/actions/_isPartiallyTyped.js.map +1 -0
- package/dist/actions/args.d.ts +32 -0
- package/dist/actions/args.js +23 -0
- package/dist/actions/args.js.map +1 -0
- package/dist/actions/argsAsync.d.ts +32 -0
- package/dist/actions/argsAsync.js +23 -0
- package/dist/actions/argsAsync.js.map +1 -0
- package/dist/actions/awaitAsync.d.ts +20 -0
- package/dist/actions/awaitAsync.js +19 -0
- package/dist/actions/awaitAsync.js.map +1 -0
- package/dist/actions/base64.d.ts +65 -0
- package/dist/actions/base64.js +21 -0
- package/dist/actions/base64.js.map +1 -0
- package/dist/actions/bic.d.ts +65 -0
- package/dist/actions/bic.js +21 -0
- package/dist/actions/bic.js.map +1 -0
- package/dist/actions/brand.d.ts +42 -0
- package/dist/actions/brand.js +21 -0
- package/dist/actions/brand.js.map +1 -0
- package/dist/actions/bytes.d.ts +68 -0
- package/dist/actions/bytes.js +25 -0
- package/dist/actions/bytes.js.map +1 -0
- package/dist/actions/check.d.ts +44 -0
- package/dist/actions/check.js +20 -0
- package/dist/actions/check.js.map +1 -0
- package/dist/actions/checkAsync.d.ts +44 -0
- package/dist/actions/checkAsync.js +20 -0
- package/dist/actions/checkAsync.js.map +1 -0
- package/dist/actions/checkItems.d.ts +45 -0
- package/dist/actions/checkItems.js +36 -0
- package/dist/actions/checkItems.js.map +1 -0
- package/dist/actions/checkItemsAsync.d.ts +45 -0
- package/dist/actions/checkItemsAsync.js +37 -0
- package/dist/actions/checkItemsAsync.js.map +1 -0
- package/dist/actions/creditCard.d.ts +65 -0
- package/dist/actions/creditCard.js +57 -0
- package/dist/actions/creditCard.js.map +1 -0
- package/dist/actions/cuid2.d.ts +65 -0
- package/dist/actions/cuid2.js +21 -0
- package/dist/actions/cuid2.js.map +1 -0
- package/dist/actions/decimal.d.ts +73 -0
- package/dist/actions/decimal.js +21 -0
- package/dist/actions/decimal.js.map +1 -0
- package/dist/actions/description.d.ts +26 -0
- package/dist/actions/description.js +17 -0
- package/dist/actions/description.js.map +1 -0
- package/dist/actions/digits.d.ts +73 -0
- package/dist/actions/digits.js +21 -0
- package/dist/actions/digits.js.map +1 -0
- package/dist/actions/domain.d.ts +81 -0
- package/dist/actions/domain.js +21 -0
- package/dist/actions/domain.js.map +1 -0
- package/dist/actions/email.d.ts +75 -0
- package/dist/actions/email.js +21 -0
- package/dist/actions/email.js.map +1 -0
- package/dist/actions/emoji.d.ts +65 -0
- package/dist/actions/emoji.js +21 -0
- package/dist/actions/emoji.js.map +1 -0
- package/dist/actions/empty.d.ts +58 -0
- package/dist/actions/empty.js +21 -0
- package/dist/actions/empty.js.map +1 -0
- package/dist/actions/endsWith.d.ts +68 -0
- package/dist/actions/endsWith.js +22 -0
- package/dist/actions/endsWith.js.map +1 -0
- package/dist/actions/entries.d.ts +77 -0
- package/dist/actions/entries.js +25 -0
- package/dist/actions/entries.js.map +1 -0
- package/dist/actions/everyItem.d.ts +65 -0
- package/dist/actions/everyItem.js +20 -0
- package/dist/actions/everyItem.js.map +1 -0
- package/dist/actions/examples.d.ts +28 -0
- package/dist/actions/examples.js +19 -0
- package/dist/actions/examples.js.map +1 -0
- package/dist/actions/excludes.d.ts +65 -0
- package/dist/actions/excludes.js +22 -0
- package/dist/actions/excludes.js.map +1 -0
- package/dist/actions/filterItems.d.ts +27 -0
- package/dist/actions/filterItems.js +15 -0
- package/dist/actions/filterItems.js.map +1 -0
- package/dist/actions/findItem.d.ts +32 -0
- package/dist/actions/findItem.js +16 -0
- package/dist/actions/findItem.js.map +1 -0
- package/dist/actions/finite.d.ts +65 -0
- package/dist/actions/finite.js +20 -0
- package/dist/actions/finite.js.map +1 -0
- package/dist/actions/flavor.d.ts +52 -0
- package/dist/actions/flavor.js +23 -0
- package/dist/actions/flavor.js.map +1 -0
- package/dist/actions/graphemes.d.ts +68 -0
- package/dist/actions/graphemes.js +25 -0
- package/dist/actions/graphemes.js.map +1 -0
- package/dist/actions/gtValue.d.ts +65 -0
- package/dist/actions/gtValue.js +26 -0
- package/dist/actions/gtValue.js.map +1 -0
- package/dist/actions/guard.d.ts +97 -0
- package/dist/actions/guard.js +21 -0
- package/dist/actions/guard.js.map +1 -0
- package/dist/actions/hash.d.ts +92 -0
- package/dist/actions/hash.js +39 -0
- package/dist/actions/hash.js.map +1 -0
- package/dist/actions/hexColor.d.ts +65 -0
- package/dist/actions/hexColor.js +21 -0
- package/dist/actions/hexColor.js.map +1 -0
- package/dist/actions/hexadecimal.d.ts +65 -0
- package/dist/actions/hexadecimal.js +21 -0
- package/dist/actions/hexadecimal.js.map +1 -0
- package/dist/actions/imei.d.ts +73 -0
- package/dist/actions/imei.js +23 -0
- package/dist/actions/imei.js.map +1 -0
- package/dist/actions/includes.d.ts +65 -0
- package/dist/actions/includes.js +24 -0
- package/dist/actions/includes.js.map +1 -0
- package/dist/actions/index.d.ts +129 -0
- package/dist/actions/index.js +130 -0
- package/dist/actions/index.js.map +1 -0
- package/dist/actions/integer.d.ts +65 -0
- package/dist/actions/integer.js +20 -0
- package/dist/actions/integer.js.map +1 -0
- package/dist/actions/ip.d.ts +65 -0
- package/dist/actions/ip.js +21 -0
- package/dist/actions/ip.js.map +1 -0
- package/dist/actions/ipv4.d.ts +65 -0
- package/dist/actions/ipv4.js +21 -0
- package/dist/actions/ipv4.js.map +1 -0
- package/dist/actions/ipv6.d.ts +65 -0
- package/dist/actions/ipv6.js +21 -0
- package/dist/actions/ipv6.js.map +1 -0
- package/dist/actions/isbn.d.ts +69 -0
- package/dist/actions/isbn.js +43 -0
- package/dist/actions/isbn.js.map +1 -0
- package/dist/actions/isoDate.d.ts +77 -0
- package/dist/actions/isoDate.js +21 -0
- package/dist/actions/isoDate.js.map +1 -0
- package/dist/actions/isoDateTime.d.ts +83 -0
- package/dist/actions/isoDateTime.js +21 -0
- package/dist/actions/isoDateTime.js.map +1 -0
- package/dist/actions/isoTime.d.ts +69 -0
- package/dist/actions/isoTime.js +21 -0
- package/dist/actions/isoTime.js.map +1 -0
- package/dist/actions/isoTimeSecond.d.ts +69 -0
- package/dist/actions/isoTimeSecond.js +21 -0
- package/dist/actions/isoTimeSecond.js.map +1 -0
- package/dist/actions/isoTimestamp.d.ts +104 -0
- package/dist/actions/isoTimestamp.js +21 -0
- package/dist/actions/isoTimestamp.js.map +1 -0
- package/dist/actions/isoWeek.d.ts +75 -0
- package/dist/actions/isoWeek.js +21 -0
- package/dist/actions/isoWeek.js.map +1 -0
- package/dist/actions/isrc.d.ts +73 -0
- package/dist/actions/isrc.js +21 -0
- package/dist/actions/isrc.js.map +1 -0
- package/dist/actions/jwsCompact.d.ts +83 -0
- package/dist/actions/jwsCompact.js +21 -0
- package/dist/actions/jwsCompact.js.map +1 -0
- package/dist/actions/length.d.ts +69 -0
- package/dist/actions/length.js +22 -0
- package/dist/actions/length.js.map +1 -0
- package/dist/actions/ltValue.d.ts +65 -0
- package/dist/actions/ltValue.js +26 -0
- package/dist/actions/ltValue.js.map +1 -0
- package/dist/actions/mac.d.ts +65 -0
- package/dist/actions/mac.js +21 -0
- package/dist/actions/mac.js.map +1 -0
- package/dist/actions/mac48.d.ts +65 -0
- package/dist/actions/mac48.js +21 -0
- package/dist/actions/mac48.js.map +1 -0
- package/dist/actions/mac64.d.ts +65 -0
- package/dist/actions/mac64.js +21 -0
- package/dist/actions/mac64.js.map +1 -0
- package/dist/actions/mapItems.d.ts +32 -0
- package/dist/actions/mapItems.js +15 -0
- package/dist/actions/mapItems.js.map +1 -0
- package/dist/actions/maxBytes.d.ts +68 -0
- package/dist/actions/maxBytes.js +25 -0
- package/dist/actions/maxBytes.js.map +1 -0
- package/dist/actions/maxEntries.d.ts +77 -0
- package/dist/actions/maxEntries.js +25 -0
- package/dist/actions/maxEntries.js.map +1 -0
- package/dist/actions/maxGraphemes.d.ts +68 -0
- package/dist/actions/maxGraphemes.js +25 -0
- package/dist/actions/maxGraphemes.js.map +1 -0
- package/dist/actions/maxLength.d.ts +69 -0
- package/dist/actions/maxLength.js +22 -0
- package/dist/actions/maxLength.js.map +1 -0
- package/dist/actions/maxSize.d.ts +69 -0
- package/dist/actions/maxSize.js +22 -0
- package/dist/actions/maxSize.js.map +1 -0
- package/dist/actions/maxValue.d.ts +65 -0
- package/dist/actions/maxValue.js +26 -0
- package/dist/actions/maxValue.js.map +1 -0
- package/dist/actions/maxWords.d.ts +74 -0
- package/dist/actions/maxWords.js +26 -0
- package/dist/actions/maxWords.js.map +1 -0
- package/dist/actions/metadata.d.ts +26 -0
- package/dist/actions/metadata.js +17 -0
- package/dist/actions/metadata.js.map +1 -0
- package/dist/actions/mimeType.d.ts +73 -0
- package/dist/actions/mimeType.js +23 -0
- package/dist/actions/mimeType.js.map +1 -0
- package/dist/actions/minBytes.d.ts +68 -0
- package/dist/actions/minBytes.js +25 -0
- package/dist/actions/minBytes.js.map +1 -0
- package/dist/actions/minEntries.d.ts +77 -0
- package/dist/actions/minEntries.js +25 -0
- package/dist/actions/minEntries.js.map +1 -0
- package/dist/actions/minGraphemes.d.ts +68 -0
- package/dist/actions/minGraphemes.js +25 -0
- package/dist/actions/minGraphemes.js.map +1 -0
- package/dist/actions/minLength.d.ts +69 -0
- package/dist/actions/minLength.js +22 -0
- package/dist/actions/minLength.js.map +1 -0
- package/dist/actions/minSize.d.ts +69 -0
- package/dist/actions/minSize.js +22 -0
- package/dist/actions/minSize.js.map +1 -0
- package/dist/actions/minValue.d.ts +65 -0
- package/dist/actions/minValue.js +26 -0
- package/dist/actions/minValue.js.map +1 -0
- package/dist/actions/minWords.d.ts +74 -0
- package/dist/actions/minWords.js +26 -0
- package/dist/actions/minWords.js.map +1 -0
- package/dist/actions/multipleOf.d.ts +90 -0
- package/dist/actions/multipleOf.js +21 -0
- package/dist/actions/multipleOf.js.map +1 -0
- package/dist/actions/nanoid.d.ts +77 -0
- package/dist/actions/nanoid.js +21 -0
- package/dist/actions/nanoid.js.map +1 -0
- package/dist/actions/nonEmpty.d.ts +58 -0
- package/dist/actions/nonEmpty.js +21 -0
- package/dist/actions/nonEmpty.js.map +1 -0
- package/dist/actions/normalize.d.ts +36 -0
- package/dist/actions/normalize.js +15 -0
- package/dist/actions/normalize.js.map +1 -0
- package/dist/actions/notBytes.d.ts +68 -0
- package/dist/actions/notBytes.js +25 -0
- package/dist/actions/notBytes.js.map +1 -0
- package/dist/actions/notEntries.d.ts +77 -0
- package/dist/actions/notEntries.js +25 -0
- package/dist/actions/notEntries.js.map +1 -0
- package/dist/actions/notGraphemes.d.ts +68 -0
- package/dist/actions/notGraphemes.js +25 -0
- package/dist/actions/notGraphemes.js.map +1 -0
- package/dist/actions/notLength.d.ts +69 -0
- package/dist/actions/notLength.js +22 -0
- package/dist/actions/notLength.js.map +1 -0
- package/dist/actions/notSize.d.ts +69 -0
- package/dist/actions/notSize.js +22 -0
- package/dist/actions/notSize.js.map +1 -0
- package/dist/actions/notValue.d.ts +65 -0
- package/dist/actions/notValue.js +28 -0
- package/dist/actions/notValue.js.map +1 -0
- package/dist/actions/notValues.d.ts +65 -0
- package/dist/actions/notValues.js +25 -0
- package/dist/actions/notValues.js.map +1 -0
- package/dist/actions/notWords.d.ts +74 -0
- package/dist/actions/notWords.js +26 -0
- package/dist/actions/notWords.js.map +1 -0
- package/dist/actions/octal.d.ts +65 -0
- package/dist/actions/octal.js +21 -0
- package/dist/actions/octal.js.map +1 -0
- package/dist/actions/parseBoolean.d.ts +91 -0
- package/dist/actions/parseBoolean.js +36 -0
- package/dist/actions/parseBoolean.js.map +1 -0
- package/dist/actions/parseJson.d.ts +87 -0
- package/dist/actions/parseJson.js +31 -0
- package/dist/actions/parseJson.js.map +1 -0
- package/dist/actions/partialCheck.d.ts +50 -0
- package/dist/actions/partialCheck.js +24 -0
- package/dist/actions/partialCheck.js.map +1 -0
- package/dist/actions/partialCheckAsync.d.ts +50 -0
- package/dist/actions/partialCheckAsync.js +24 -0
- package/dist/actions/partialCheckAsync.js.map +1 -0
- package/dist/actions/rawCheck.d.ts +27 -0
- package/dist/actions/rawCheck.js +27 -0
- package/dist/actions/rawCheck.js.map +1 -0
- package/dist/actions/rawCheckAsync.d.ts +27 -0
- package/dist/actions/rawCheckAsync.js +27 -0
- package/dist/actions/rawCheckAsync.js.map +1 -0
- package/dist/actions/rawTransform.d.ts +23 -0
- package/dist/actions/rawTransform.js +39 -0
- package/dist/actions/rawTransform.js.map +1 -0
- package/dist/actions/rawTransformAsync.d.ts +23 -0
- package/dist/actions/rawTransformAsync.js +39 -0
- package/dist/actions/rawTransformAsync.js.map +1 -0
- package/dist/actions/readonly.d.ts +25 -0
- package/dist/actions/readonly.js +13 -0
- package/dist/actions/readonly.js.map +1 -0
- package/dist/actions/reduceItems.d.ts +37 -0
- package/dist/actions/reduceItems.js +17 -0
- package/dist/actions/reduceItems.js.map +1 -0
- package/dist/actions/regex.d.ts +72 -0
- package/dist/actions/regex.js +20 -0
- package/dist/actions/regex.js.map +1 -0
- package/dist/actions/returns.d.ts +26 -0
- package/dist/actions/returns.js +23 -0
- package/dist/actions/returns.js.map +1 -0
- package/dist/actions/returnsAsync.d.ts +26 -0
- package/dist/actions/returnsAsync.js +23 -0
- package/dist/actions/returnsAsync.js.map +1 -0
- package/dist/actions/rfcEmail.d.ts +75 -0
- package/dist/actions/rfcEmail.js +21 -0
- package/dist/actions/rfcEmail.js.map +1 -0
- package/dist/actions/safeInteger.d.ts +65 -0
- package/dist/actions/safeInteger.js +20 -0
- package/dist/actions/safeInteger.js.map +1 -0
- package/dist/actions/size.d.ts +69 -0
- package/dist/actions/size.js +22 -0
- package/dist/actions/size.js.map +1 -0
- package/dist/actions/slug.d.ts +65 -0
- package/dist/actions/slug.js +21 -0
- package/dist/actions/slug.js.map +1 -0
- package/dist/actions/someItem.d.ts +65 -0
- package/dist/actions/someItem.js +20 -0
- package/dist/actions/someItem.js.map +1 -0
- package/dist/actions/sortItems.d.ts +32 -0
- package/dist/actions/sortItems.js +15 -0
- package/dist/actions/sortItems.js.map +1 -0
- package/dist/actions/startsWith.d.ts +68 -0
- package/dist/actions/startsWith.js +22 -0
- package/dist/actions/startsWith.js.map +1 -0
- package/dist/actions/stringifyJson.d.ts +92 -0
- package/dist/actions/stringifyJson.js +39 -0
- package/dist/actions/stringifyJson.js.map +1 -0
- package/dist/actions/title.d.ts +26 -0
- package/dist/actions/title.js +17 -0
- package/dist/actions/title.js.map +1 -0
- package/dist/actions/toBigint.d.ts +53 -0
- package/dist/actions/toBigint.js +24 -0
- package/dist/actions/toBigint.js.map +1 -0
- package/dist/actions/toBoolean.d.ts +22 -0
- package/dist/actions/toBoolean.js +22 -0
- package/dist/actions/toBoolean.js.map +1 -0
- package/dist/actions/toDate.d.ts +53 -0
- package/dist/actions/toDate.js +32 -0
- package/dist/actions/toDate.js.map +1 -0
- package/dist/actions/toLowerCase.d.ts +20 -0
- package/dist/actions/toLowerCase.js +19 -0
- package/dist/actions/toLowerCase.js.map +1 -0
- package/dist/actions/toMaxValue.d.ts +27 -0
- package/dist/actions/toMaxValue.js +23 -0
- package/dist/actions/toMaxValue.js.map +1 -0
- package/dist/actions/toMinValue.d.ts +27 -0
- package/dist/actions/toMinValue.js +23 -0
- package/dist/actions/toMinValue.js.map +1 -0
- package/dist/actions/toNumber.d.ts +53 -0
- package/dist/actions/toNumber.js +29 -0
- package/dist/actions/toNumber.js.map +1 -0
- package/dist/actions/toString.d.ts +53 -0
- package/dist/actions/toString.js +23 -0
- package/dist/actions/toString.js.map +1 -0
- package/dist/actions/toUpperCase.d.ts +20 -0
- package/dist/actions/toUpperCase.js +19 -0
- package/dist/actions/toUpperCase.js.map +1 -0
- package/dist/actions/transform.d.ts +26 -0
- package/dist/actions/transform.js +24 -0
- package/dist/actions/transform.js.map +1 -0
- package/dist/actions/transformAsync.d.ts +26 -0
- package/dist/actions/transformAsync.js +24 -0
- package/dist/actions/transformAsync.js.map +1 -0
- package/dist/actions/trim.d.ts +20 -0
- package/dist/actions/trim.js +19 -0
- package/dist/actions/trim.js.map +1 -0
- package/dist/actions/trimEnd.d.ts +20 -0
- package/dist/actions/trimEnd.js +19 -0
- package/dist/actions/trimEnd.js.map +1 -0
- package/dist/actions/trimStart.d.ts +20 -0
- package/dist/actions/trimStart.js +19 -0
- package/dist/actions/trimStart.js.map +1 -0
- package/dist/actions/types/check.d.ts +22 -0
- package/dist/actions/types/check.js +2 -0
- package/dist/actions/types/check.js.map +1 -0
- package/dist/actions/types/checkItems.d.ts +23 -0
- package/dist/actions/types/checkItems.js +2 -0
- package/dist/actions/types/checkItems.js.map +1 -0
- package/dist/actions/types/index.d.ts +5 -0
- package/dist/actions/types/index.js +6 -0
- package/dist/actions/types/index.js.map +1 -0
- package/dist/actions/types/partialCheck.d.ts +96 -0
- package/dist/actions/types/partialCheck.js +2 -0
- package/dist/actions/types/partialCheck.js.map +1 -0
- package/dist/actions/types/rawCheck.d.ts +37 -0
- package/dist/actions/types/rawCheck.js +2 -0
- package/dist/actions/types/rawCheck.js.map +1 -0
- package/dist/actions/types/rawTransform.d.ts +38 -0
- package/dist/actions/types/rawTransform.js +2 -0
- package/dist/actions/types/rawTransform.js.map +1 -0
- package/dist/actions/types.d.ts +37 -0
- package/dist/actions/types.js +2 -0
- package/dist/actions/types.js.map +1 -0
- package/dist/actions/ulid.d.ts +65 -0
- package/dist/actions/ulid.js +21 -0
- package/dist/actions/ulid.js.map +1 -0
- package/dist/actions/url.d.ts +71 -0
- package/dist/actions/url.js +28 -0
- package/dist/actions/url.js.map +1 -0
- package/dist/actions/uuid.d.ts +65 -0
- package/dist/actions/uuid.js +21 -0
- package/dist/actions/uuid.js.map +1 -0
- package/dist/actions/value.d.ts +65 -0
- package/dist/actions/value.js +27 -0
- package/dist/actions/value.js.map +1 -0
- package/dist/actions/values.d.ts +65 -0
- package/dist/actions/values.js +25 -0
- package/dist/actions/values.js.map +1 -0
- package/dist/actions/words.d.ts +74 -0
- package/dist/actions/words.js +26 -0
- package/dist/actions/words.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +4 -0
- package/dist/index.min.js.map +1 -0
- package/dist/integrations/http.d.ts +27 -0
- package/dist/integrations/http.js +124 -0
- package/dist/integrations/http.js.map +1 -0
- package/dist/methods/_LruCache.d.ts +44 -0
- package/dist/methods/_LruCache.js +115 -0
- package/dist/methods/_LruCache.js.map +1 -0
- package/dist/methods/assert.d.ts +9 -0
- package/dist/methods/assert.js +15 -0
- package/dist/methods/assert.js.map +1 -0
- package/dist/methods/cache.d.ts +49 -0
- package/dist/methods/cache.js +24 -0
- package/dist/methods/cache.js.map +1 -0
- package/dist/methods/cacheAsync.d.ts +69 -0
- package/dist/methods/cacheAsync.js +46 -0
- package/dist/methods/cacheAsync.js.map +1 -0
- package/dist/methods/config.d.ts +10 -0
- package/dist/methods/config.js +22 -0
- package/dist/methods/config.js.map +1 -0
- package/dist/methods/fallback.d.ts +23 -0
- package/dist/methods/fallback.js +27 -0
- package/dist/methods/fallback.js.map +1 -0
- package/dist/methods/fallbackAsync.d.ts +44 -0
- package/dist/methods/fallbackAsync.js +31 -0
- package/dist/methods/fallbackAsync.js.map +1 -0
- package/dist/methods/flatten.d.ts +48 -0
- package/dist/methods/flatten.js +51 -0
- package/dist/methods/flatten.js.map +1 -0
- package/dist/methods/forward.d.ts +11 -0
- package/dist/methods/forward.js +66 -0
- package/dist/methods/forward.js.map +1 -0
- package/dist/methods/forwardAsync.d.ts +11 -0
- package/dist/methods/forwardAsync.js +67 -0
- package/dist/methods/forwardAsync.js.map +1 -0
- package/dist/methods/getDefault.d.ts +25 -0
- package/dist/methods/getDefault.js +19 -0
- package/dist/methods/getDefault.js.map +1 -0
- package/dist/methods/getDefaults.d.ts +15 -0
- package/dist/methods/getDefaults.js +31 -0
- package/dist/methods/getDefaults.js.map +1 -0
- package/dist/methods/getDefaultsAsync.d.ts +15 -0
- package/dist/methods/getDefaultsAsync.js +30 -0
- package/dist/methods/getDefaultsAsync.js.map +1 -0
- package/dist/methods/getDescription.d.ts +27 -0
- package/dist/methods/getDescription.js +19 -0
- package/dist/methods/getDescription.js.map +1 -0
- package/dist/methods/getExamples.d.ts +38 -0
- package/dist/methods/getExamples.js +33 -0
- package/dist/methods/getExamples.js.map +1 -0
- package/dist/methods/getFallback.d.ts +17 -0
- package/dist/methods/getFallback.js +19 -0
- package/dist/methods/getFallback.js.map +1 -0
- package/dist/methods/getFallbacks.d.ts +15 -0
- package/dist/methods/getFallbacks.js +31 -0
- package/dist/methods/getFallbacks.js.map +1 -0
- package/dist/methods/getFallbacksAsync.d.ts +15 -0
- package/dist/methods/getFallbacksAsync.js +30 -0
- package/dist/methods/getFallbacksAsync.js.map +1 -0
- package/dist/methods/getMetadata.d.ts +45 -0
- package/dist/methods/getMetadata.js +33 -0
- package/dist/methods/getMetadata.js.map +1 -0
- package/dist/methods/getTitle.d.ts +27 -0
- package/dist/methods/getTitle.js +19 -0
- package/dist/methods/getTitle.js.map +1 -0
- package/dist/methods/index.d.ts +41 -0
- package/dist/methods/index.js +42 -0
- package/dist/methods/index.js.map +1 -0
- package/dist/methods/is.d.ts +11 -0
- package/dist/methods/is.js +14 -0
- package/dist/methods/is.js.map +1 -0
- package/dist/methods/keyof.d.ts +32 -0
- package/dist/methods/keyof.js +6 -0
- package/dist/methods/keyof.js.map +1 -0
- package/dist/methods/message.d.ts +10 -0
- package/dist/methods/message.js +22 -0
- package/dist/methods/message.js.map +1 -0
- package/dist/methods/omit.d.ts +277 -0
- package/dist/methods/omit.js +33 -0
- package/dist/methods/omit.js.map +1 -0
- package/dist/methods/parse.d.ts +11 -0
- package/dist/methods/parse.js +19 -0
- package/dist/methods/parse.js.map +1 -0
- package/dist/methods/parseAsync.d.ts +11 -0
- package/dist/methods/parseAsync.js +19 -0
- package/dist/methods/parseAsync.js.map +1 -0
- package/dist/methods/parser.d.ts +35 -0
- package/dist/methods/parser.js +11 -0
- package/dist/methods/parser.js.map +1 -0
- package/dist/methods/parserAsync.d.ts +35 -0
- package/dist/methods/parserAsync.js +11 -0
- package/dist/methods/parserAsync.js.map +1 -0
- package/dist/methods/partial.d.ts +151 -0
- package/dist/methods/partial.js +23 -0
- package/dist/methods/partial.js.map +1 -0
- package/dist/methods/partialAsync.d.ts +151 -0
- package/dist/methods/partialAsync.js +23 -0
- package/dist/methods/partialAsync.js.map +1 -0
- package/dist/methods/pick.d.ts +277 -0
- package/dist/methods/pick.js +30 -0
- package/dist/methods/pick.js.map +1 -0
- package/dist/methods/pipe.d.ts +619 -0
- package/dist/methods/pipe.js +36 -0
- package/dist/methods/pipe.js.map +1 -0
- package/dist/methods/pipeAsync.d.ts +581 -0
- package/dist/methods/pipeAsync.js +37 -0
- package/dist/methods/pipeAsync.js.map +1 -0
- package/dist/methods/required.d.ts +171 -0
- package/dist/methods/required.js +26 -0
- package/dist/methods/required.js.map +1 -0
- package/dist/methods/requiredAsync.d.ts +171 -0
- package/dist/methods/requiredAsync.js +26 -0
- package/dist/methods/requiredAsync.js.map +1 -0
- package/dist/methods/safeParse.d.ts +12 -0
- package/dist/methods/safeParse.js +21 -0
- package/dist/methods/safeParse.js.map +1 -0
- package/dist/methods/safeParseAsync.d.ts +12 -0
- package/dist/methods/safeParseAsync.js +21 -0
- package/dist/methods/safeParseAsync.js.map +1 -0
- package/dist/methods/safeParser.d.ts +36 -0
- package/dist/methods/safeParser.js +11 -0
- package/dist/methods/safeParser.js.map +1 -0
- package/dist/methods/safeParserAsync.d.ts +36 -0
- package/dist/methods/safeParserAsync.js +11 -0
- package/dist/methods/safeParserAsync.js.map +1 -0
- package/dist/methods/summarize.d.ts +11 -0
- package/dist/methods/summarize.js +33 -0
- package/dist/methods/summarize.js.map +1 -0
- package/dist/methods/types/cache.d.ts +46 -0
- package/dist/methods/types/cache.js +2 -0
- package/dist/methods/types/cache.js.map +1 -0
- package/dist/methods/types/forward.d.ts +28 -0
- package/dist/methods/types/forward.js +2 -0
- package/dist/methods/types/forward.js.map +1 -0
- package/dist/methods/types/getDefaults.d.ts +15 -0
- package/dist/methods/types/getDefaults.js +2 -0
- package/dist/methods/types/getDefaults.js.map +1 -0
- package/dist/methods/types/getFallbacks.d.ts +15 -0
- package/dist/methods/types/getFallbacks.js +2 -0
- package/dist/methods/types/getFallbacks.js.map +1 -0
- package/dist/methods/types/index.d.ts +5 -0
- package/dist/methods/types/index.js +6 -0
- package/dist/methods/types/index.js.map +1 -0
- package/dist/methods/types/safeParse.d.ts +32 -0
- package/dist/methods/types/safeParse.js +2 -0
- package/dist/methods/types/safeParse.js.map +1 -0
- package/dist/methods/unwrap.d.ts +10 -0
- package/dist/methods/unwrap.js +12 -0
- package/dist/methods/unwrap.js.map +1 -0
- package/dist/regex.d.ts +151 -0
- package/dist/regex.js +159 -0
- package/dist/regex.js.map +1 -0
- package/dist/schemas/_merge.d.ts +22 -0
- package/dist/schemas/_merge.js +70 -0
- package/dist/schemas/_merge.js.map +1 -0
- package/dist/schemas/_subIssues.d.ts +11 -0
- package/dist/schemas/_subIssues.js +27 -0
- package/dist/schemas/_subIssues.js.map +1 -0
- package/dist/schemas/any.d.ts +28 -0
- package/dist/schemas/any.js +30 -0
- package/dist/schemas/any.js.map +1 -0
- package/dist/schemas/array.d.ts +44 -0
- package/dist/schemas/array.js +79 -0
- package/dist/schemas/array.js.map +1 -0
- package/dist/schemas/arrayAsync.d.ts +45 -0
- package/dist/schemas/arrayAsync.js +81 -0
- package/dist/schemas/arrayAsync.js.map +1 -0
- package/dist/schemas/bigint.d.ts +53 -0
- package/dist/schemas/bigint.js +27 -0
- package/dist/schemas/bigint.js.map +1 -0
- package/dist/schemas/blob.d.ts +53 -0
- package/dist/schemas/blob.js +27 -0
- package/dist/schemas/blob.js.map +1 -0
- package/dist/schemas/boolean.d.ts +53 -0
- package/dist/schemas/boolean.js +27 -0
- package/dist/schemas/boolean.js.map +1 -0
- package/dist/schemas/custom.d.ts +49 -0
- package/dist/schemas/custom.js +28 -0
- package/dist/schemas/custom.js.map +1 -0
- package/dist/schemas/customAsync.d.ts +50 -0
- package/dist/schemas/customAsync.js +28 -0
- package/dist/schemas/customAsync.js.map +1 -0
- package/dist/schemas/date.d.ts +53 -0
- package/dist/schemas/date.js +35 -0
- package/dist/schemas/date.js.map +1 -0
- package/dist/schemas/enum.d.ts +73 -0
- package/dist/schemas/enum.js +39 -0
- package/dist/schemas/enum.js.map +1 -0
- package/dist/schemas/exactOptional.d.ts +43 -0
- package/dist/schemas/exactOptional.js +20 -0
- package/dist/schemas/exactOptional.js.map +1 -0
- package/dist/schemas/exactOptionalAsync.d.ts +44 -0
- package/dist/schemas/exactOptionalAsync.js +20 -0
- package/dist/schemas/exactOptionalAsync.js.map +1 -0
- package/dist/schemas/file.d.ts +53 -0
- package/dist/schemas/file.js +27 -0
- package/dist/schemas/file.js.map +1 -0
- package/dist/schemas/function.d.ts +54 -0
- package/dist/schemas/function.js +28 -0
- package/dist/schemas/function.js.map +1 -0
- package/dist/schemas/index.d.ts +72 -0
- package/dist/schemas/index.js +73 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/instance.d.ts +60 -0
- package/dist/schemas/instance.js +28 -0
- package/dist/schemas/instance.js.map +1 -0
- package/dist/schemas/intersect.d.ts +40 -0
- package/dist/schemas/intersect.js +88 -0
- package/dist/schemas/intersect.js.map +1 -0
- package/dist/schemas/intersectAsync.d.ts +41 -0
- package/dist/schemas/intersectAsync.js +89 -0
- package/dist/schemas/intersectAsync.js.map +1 -0
- package/dist/schemas/lazy.d.ts +30 -0
- package/dist/schemas/lazy.js +26 -0
- package/dist/schemas/lazy.js.map +1 -0
- package/dist/schemas/lazyAsync.d.ts +31 -0
- package/dist/schemas/lazyAsync.js +26 -0
- package/dist/schemas/lazyAsync.js.map +1 -0
- package/dist/schemas/literal.d.ts +60 -0
- package/dist/schemas/literal.js +28 -0
- package/dist/schemas/literal.js.map +1 -0
- package/dist/schemas/looseObject.d.ts +48 -0
- package/dist/schemas/looseObject.js +132 -0
- package/dist/schemas/looseObject.js.map +1 -0
- package/dist/schemas/looseObjectAsync.d.ts +49 -0
- package/dist/schemas/looseObjectAsync.js +148 -0
- package/dist/schemas/looseObjectAsync.js.map +1 -0
- package/dist/schemas/looseTuple.d.ts +50 -0
- package/dist/schemas/looseTuple.js +86 -0
- package/dist/schemas/looseTuple.js.map +1 -0
- package/dist/schemas/looseTupleAsync.d.ts +51 -0
- package/dist/schemas/looseTupleAsync.js +89 -0
- package/dist/schemas/looseTupleAsync.js.map +1 -0
- package/dist/schemas/map.d.ts +50 -0
- package/dist/schemas/map.js +114 -0
- package/dist/schemas/map.js.map +1 -0
- package/dist/schemas/mapAsync.d.ts +51 -0
- package/dist/schemas/mapAsync.js +117 -0
- package/dist/schemas/mapAsync.js.map +1 -0
- package/dist/schemas/nan.d.ts +53 -0
- package/dist/schemas/nan.js +27 -0
- package/dist/schemas/nan.js.map +1 -0
- package/dist/schemas/never.d.ts +53 -0
- package/dist/schemas/never.js +21 -0
- package/dist/schemas/never.js.map +1 -0
- package/dist/schemas/nonNullable.d.ts +44 -0
- package/dist/schemas/nonNullable.js +31 -0
- package/dist/schemas/nonNullable.js.map +1 -0
- package/dist/schemas/nonNullableAsync.d.ts +45 -0
- package/dist/schemas/nonNullableAsync.js +31 -0
- package/dist/schemas/nonNullableAsync.js.map +1 -0
- package/dist/schemas/nonNullish.d.ts +44 -0
- package/dist/schemas/nonNullish.js +31 -0
- package/dist/schemas/nonNullish.js.map +1 -0
- package/dist/schemas/nonNullishAsync.d.ts +45 -0
- package/dist/schemas/nonNullishAsync.js +31 -0
- package/dist/schemas/nonNullishAsync.js.map +1 -0
- package/dist/schemas/nonOptional.d.ts +44 -0
- package/dist/schemas/nonOptional.js +31 -0
- package/dist/schemas/nonOptional.js.map +1 -0
- package/dist/schemas/nonOptionalAsync.d.ts +45 -0
- package/dist/schemas/nonOptionalAsync.js +31 -0
- package/dist/schemas/nonOptionalAsync.js.map +1 -0
- package/dist/schemas/null.d.ts +54 -0
- package/dist/schemas/null.js +28 -0
- package/dist/schemas/null.js.map +1 -0
- package/dist/schemas/nullable.d.ts +44 -0
- package/dist/schemas/nullable.js +36 -0
- package/dist/schemas/nullable.js.map +1 -0
- package/dist/schemas/nullableAsync.d.ts +45 -0
- package/dist/schemas/nullableAsync.js +36 -0
- package/dist/schemas/nullableAsync.js.map +1 -0
- package/dist/schemas/nullish.d.ts +44 -0
- package/dist/schemas/nullish.js +37 -0
- package/dist/schemas/nullish.js.map +1 -0
- package/dist/schemas/nullishAsync.d.ts +45 -0
- package/dist/schemas/nullishAsync.js +37 -0
- package/dist/schemas/nullishAsync.js.map +1 -0
- package/dist/schemas/number.d.ts +53 -0
- package/dist/schemas/number.js +27 -0
- package/dist/schemas/number.js.map +1 -0
- package/dist/schemas/object.d.ts +54 -0
- package/dist/schemas/object.js +122 -0
- package/dist/schemas/object.js.map +1 -0
- package/dist/schemas/objectAsync.d.ts +55 -0
- package/dist/schemas/objectAsync.js +138 -0
- package/dist/schemas/objectAsync.js.map +1 -0
- package/dist/schemas/objectWithRest.d.ts +54 -0
- package/dist/schemas/objectWithRest.js +174 -0
- package/dist/schemas/objectWithRest.js.map +1 -0
- package/dist/schemas/objectWithRestAsync.d.ts +55 -0
- package/dist/schemas/objectWithRestAsync.js +195 -0
- package/dist/schemas/objectWithRestAsync.js.map +1 -0
- package/dist/schemas/optional.d.ts +44 -0
- package/dist/schemas/optional.js +36 -0
- package/dist/schemas/optional.js.map +1 -0
- package/dist/schemas/optionalAsync.d.ts +45 -0
- package/dist/schemas/optionalAsync.js +36 -0
- package/dist/schemas/optionalAsync.js.map +1 -0
- package/dist/schemas/picklist.d.ts +60 -0
- package/dist/schemas/picklist.js +29 -0
- package/dist/schemas/picklist.js.map +1 -0
- package/dist/schemas/promise.d.ts +53 -0
- package/dist/schemas/promise.js +27 -0
- package/dist/schemas/promise.js.map +1 -0
- package/dist/schemas/record.d.ts +50 -0
- package/dist/schemas/record.js +117 -0
- package/dist/schemas/record.js.map +1 -0
- package/dist/schemas/recordAsync.d.ts +51 -0
- package/dist/schemas/recordAsync.js +118 -0
- package/dist/schemas/recordAsync.js.map +1 -0
- package/dist/schemas/set.d.ts +44 -0
- package/dist/schemas/set.js +78 -0
- package/dist/schemas/set.js.map +1 -0
- package/dist/schemas/setAsync.d.ts +45 -0
- package/dist/schemas/setAsync.js +82 -0
- package/dist/schemas/setAsync.js.map +1 -0
- package/dist/schemas/strictObject.d.ts +44 -0
- package/dist/schemas/strictObject.js +149 -0
- package/dist/schemas/strictObject.js.map +1 -0
- package/dist/schemas/strictObjectAsync.d.ts +45 -0
- package/dist/schemas/strictObjectAsync.js +165 -0
- package/dist/schemas/strictObjectAsync.js.map +1 -0
- package/dist/schemas/strictTuple.d.ts +44 -0
- package/dist/schemas/strictTuple.js +101 -0
- package/dist/schemas/strictTuple.js.map +1 -0
- package/dist/schemas/strictTupleAsync.d.ts +45 -0
- package/dist/schemas/strictTupleAsync.js +104 -0
- package/dist/schemas/strictTupleAsync.js.map +1 -0
- package/dist/schemas/string.d.ts +53 -0
- package/dist/schemas/string.js +27 -0
- package/dist/schemas/string.js.map +1 -0
- package/dist/schemas/symbol.d.ts +53 -0
- package/dist/schemas/symbol.js +27 -0
- package/dist/schemas/symbol.js.map +1 -0
- package/dist/schemas/tuple.d.ts +54 -0
- package/dist/schemas/tuple.js +79 -0
- package/dist/schemas/tuple.js.map +1 -0
- package/dist/schemas/tupleAsync.d.ts +55 -0
- package/dist/schemas/tupleAsync.js +82 -0
- package/dist/schemas/tupleAsync.js.map +1 -0
- package/dist/schemas/tupleWithRest.d.ts +56 -0
- package/dist/schemas/tupleWithRest.js +126 -0
- package/dist/schemas/tupleWithRest.js.map +1 -0
- package/dist/schemas/tupleWithRestAsync.d.ts +57 -0
- package/dist/schemas/tupleWithRestAsync.js +142 -0
- package/dist/schemas/tupleWithRestAsync.js.map +1 -0
- package/dist/schemas/types/array.d.ts +18 -0
- package/dist/schemas/types/array.js +2 -0
- package/dist/schemas/types/array.js.map +1 -0
- package/dist/schemas/types/custom.d.ts +18 -0
- package/dist/schemas/types/custom.js +2 -0
- package/dist/schemas/types/custom.js.map +1 -0
- package/dist/schemas/types/index.d.ts +23 -0
- package/dist/schemas/types/index.js +24 -0
- package/dist/schemas/types/index.js.map +1 -0
- package/dist/schemas/types/intersect.d.ts +51 -0
- package/dist/schemas/types/intersect.js +2 -0
- package/dist/schemas/types/intersect.js.map +1 -0
- package/dist/schemas/types/looseObject.d.ts +18 -0
- package/dist/schemas/types/looseObject.js +2 -0
- package/dist/schemas/types/looseObject.js.map +1 -0
- package/dist/schemas/types/looseTuple.d.ts +18 -0
- package/dist/schemas/types/looseTuple.js +2 -0
- package/dist/schemas/types/looseTuple.js.map +1 -0
- package/dist/schemas/types/map.d.ts +26 -0
- package/dist/schemas/types/map.js +2 -0
- package/dist/schemas/types/map.js.map +1 -0
- package/dist/schemas/types/nonNullable.d.ts +37 -0
- package/dist/schemas/types/nonNullable.js +2 -0
- package/dist/schemas/types/nonNullable.js.map +1 -0
- package/dist/schemas/types/nonNullish.d.ts +37 -0
- package/dist/schemas/types/nonNullish.js +2 -0
- package/dist/schemas/types/nonNullish.js.map +1 -0
- package/dist/schemas/types/nonOptional.d.ts +37 -0
- package/dist/schemas/types/nonOptional.js +2 -0
- package/dist/schemas/types/nonOptional.js.map +1 -0
- package/dist/schemas/types/nullable.d.ts +5 -0
- package/dist/schemas/types/nullable.js +2 -0
- package/dist/schemas/types/nullable.js.map +1 -0
- package/dist/schemas/types/nullish.d.ts +5 -0
- package/dist/schemas/types/nullish.js +2 -0
- package/dist/schemas/types/nullish.js.map +1 -0
- package/dist/schemas/types/object.d.ts +18 -0
- package/dist/schemas/types/object.js +2 -0
- package/dist/schemas/types/object.js.map +1 -0
- package/dist/schemas/types/objectWithRest.d.ts +18 -0
- package/dist/schemas/types/objectWithRest.js +2 -0
- package/dist/schemas/types/objectWithRest.js.map +1 -0
- package/dist/schemas/types/optional.d.ts +5 -0
- package/dist/schemas/types/optional.js +2 -0
- package/dist/schemas/types/optional.js.map +1 -0
- package/dist/schemas/types/record.d.ts +56 -0
- package/dist/schemas/types/record.js +2 -0
- package/dist/schemas/types/record.js.map +1 -0
- package/dist/schemas/types/set.d.ts +26 -0
- package/dist/schemas/types/set.js +2 -0
- package/dist/schemas/types/set.js.map +1 -0
- package/dist/schemas/types/strictObject.d.ts +18 -0
- package/dist/schemas/types/strictObject.js +2 -0
- package/dist/schemas/types/strictObject.js.map +1 -0
- package/dist/schemas/types/strictTuple.d.ts +18 -0
- package/dist/schemas/types/strictTuple.js +2 -0
- package/dist/schemas/types/strictTuple.js.map +1 -0
- package/dist/schemas/types/tuple.d.ts +18 -0
- package/dist/schemas/types/tuple.js +2 -0
- package/dist/schemas/types/tuple.js.map +1 -0
- package/dist/schemas/types/tupleWithRest.d.ts +18 -0
- package/dist/schemas/types/tupleWithRest.js +2 -0
- package/dist/schemas/types/tupleWithRest.js.map +1 -0
- package/dist/schemas/types/undefinedable.d.ts +5 -0
- package/dist/schemas/types/undefinedable.js +2 -0
- package/dist/schemas/types/undefinedable.js.map +1 -0
- package/dist/schemas/types/union.d.ts +22 -0
- package/dist/schemas/types/union.js +2 -0
- package/dist/schemas/types/union.js.map +1 -0
- package/dist/schemas/types/variant.d.ts +83 -0
- package/dist/schemas/types/variant.js +2 -0
- package/dist/schemas/types/variant.js.map +1 -0
- package/dist/schemas/undefined.d.ts +54 -0
- package/dist/schemas/undefined.js +28 -0
- package/dist/schemas/undefined.js.map +1 -0
- package/dist/schemas/undefinedable.d.ts +44 -0
- package/dist/schemas/undefinedable.js +36 -0
- package/dist/schemas/undefinedable.js.map +1 -0
- package/dist/schemas/undefinedableAsync.d.ts +45 -0
- package/dist/schemas/undefinedableAsync.js +36 -0
- package/dist/schemas/undefinedableAsync.js.map +1 -0
- package/dist/schemas/union.d.ts +44 -0
- package/dist/schemas/union.js +91 -0
- package/dist/schemas/union.js.map +1 -0
- package/dist/schemas/unionAsync.d.ts +45 -0
- package/dist/schemas/unionAsync.js +91 -0
- package/dist/schemas/unionAsync.js.map +1 -0
- package/dist/schemas/unknown.d.ts +24 -0
- package/dist/schemas/unknown.js +26 -0
- package/dist/schemas/unknown.js.map +1 -0
- package/dist/schemas/variant.d.ts +50 -0
- package/dist/schemas/variant.js +129 -0
- package/dist/schemas/variant.js.map +1 -0
- package/dist/schemas/variantAsync.d.ts +51 -0
- package/dist/schemas/variantAsync.js +129 -0
- package/dist/schemas/variantAsync.js.map +1 -0
- package/dist/schemas/void.d.ts +54 -0
- package/dist/schemas/void.js +28 -0
- package/dist/schemas/void.js.map +1 -0
- package/dist/storages/globalConfig.d.ts +23 -0
- package/dist/storages/globalConfig.js +35 -0
- package/dist/storages/globalConfig.js.map +1 -0
- package/dist/storages/globalMessage.d.ts +22 -0
- package/dist/storages/globalMessage.js +33 -0
- package/dist/storages/globalMessage.js.map +1 -0
- package/dist/storages/index.d.ts +4 -0
- package/dist/storages/index.js +5 -0
- package/dist/storages/index.js.map +1 -0
- package/dist/storages/schemaMessage.d.ts +22 -0
- package/dist/storages/schemaMessage.js +33 -0
- package/dist/storages/schemaMessage.js.map +1 -0
- package/dist/storages/specificMessage.d.ts +30 -0
- package/dist/storages/specificMessage.js +38 -0
- package/dist/storages/specificMessage.js.map +1 -0
- package/dist/types/config.d.ts +23 -0
- package/dist/types/config.js +2 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/dataset.d.ts +73 -0
- package/dist/types/dataset.js +2 -0
- package/dist/types/dataset.js.map +1 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/index.js +15 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/infer.d.ts +17 -0
- package/dist/types/infer.js +2 -0
- package/dist/types/infer.js.map +1 -0
- package/dist/types/issue.d.ts +208 -0
- package/dist/types/issue.js +2 -0
- package/dist/types/issue.js.map +1 -0
- package/dist/types/metadata.d.ts +31 -0
- package/dist/types/metadata.js +2 -0
- package/dist/types/metadata.js.map +1 -0
- package/dist/types/object.d.ts +87 -0
- package/dist/types/object.js +2 -0
- package/dist/types/object.js.map +1 -0
- package/dist/types/other.d.ts +22 -0
- package/dist/types/other.js +2 -0
- package/dist/types/other.js.map +1 -0
- package/dist/types/pipe.d.ts +43 -0
- package/dist/types/pipe.js +2 -0
- package/dist/types/pipe.js.map +1 -0
- package/dist/types/schema.d.ts +88 -0
- package/dist/types/schema.js +2 -0
- package/dist/types/schema.js.map +1 -0
- package/dist/types/standard.d.ts +82 -0
- package/dist/types/standard.js +2 -0
- package/dist/types/standard.js.map +1 -0
- package/dist/types/transformation.d.ts +77 -0
- package/dist/types/transformation.js +2 -0
- package/dist/types/transformation.js.map +1 -0
- package/dist/types/tuple.d.ts +28 -0
- package/dist/types/tuple.js +2 -0
- package/dist/types/tuple.js.map +1 -0
- package/dist/types/utils.d.ts +81 -0
- package/dist/types/utils.js +2 -0
- package/dist/types/utils.js.map +1 -0
- package/dist/types/validation.d.ts +81 -0
- package/dist/types/validation.js +2 -0
- package/dist/types/validation.js.map +1 -0
- package/dist/utils/ValidationError.d.ts +41 -0
- package/dist/utils/ValidationError.js +46 -0
- package/dist/utils/ValidationError.js.map +1 -0
- package/dist/utils/_addIssue.d.ts +35 -0
- package/dist/utils/_addIssue.js +67 -0
- package/dist/utils/_addIssue.js.map +1 -0
- package/dist/utils/_cloneDataset.d.ts +14 -0
- package/dist/utils/_cloneDataset.js +24 -0
- package/dist/utils/_cloneDataset.js.map +1 -0
- package/dist/utils/_getByteCount.d.ts +10 -0
- package/dist/utils/_getByteCount.js +18 -0
- package/dist/utils/_getByteCount.js.map +1 -0
- package/dist/utils/_getGraphemeCount.d.ts +10 -0
- package/dist/utils/_getGraphemeCount.js +24 -0
- package/dist/utils/_getGraphemeCount.js.map +1 -0
- package/dist/utils/_getLastMetadata.d.ts +30 -0
- package/dist/utils/_getLastMetadata.js +34 -0
- package/dist/utils/_getLastMetadata.js.map +1 -0
- package/dist/utils/_getStandardProps.d.ts +9 -0
- package/dist/utils/_getStandardProps.js +19 -0
- package/dist/utils/_getStandardProps.js.map +1 -0
- package/dist/utils/_getWordCount.d.ts +11 -0
- package/dist/utils/_getWordCount.js +29 -0
- package/dist/utils/_getWordCount.js.map +1 -0
- package/dist/utils/_isLuhnAlgo.d.ts +10 -0
- package/dist/utils/_isLuhnAlgo.js +31 -0
- package/dist/utils/_isLuhnAlgo.js.map +1 -0
- package/dist/utils/_isValidObjectKey.d.ts +12 -0
- package/dist/utils/_isValidObjectKey.js +19 -0
- package/dist/utils/_isValidObjectKey.js.map +1 -0
- package/dist/utils/_joinExpects.d.ts +11 -0
- package/dist/utils/_joinExpects.js +22 -0
- package/dist/utils/_joinExpects.js.map +1 -0
- package/dist/utils/_stringify.d.ts +10 -0
- package/dist/utils/_stringify.js +25 -0
- package/dist/utils/_stringify.js.map +1 -0
- package/dist/utils/ajv.d.ts +25 -0
- package/dist/utils/ajv.js +233 -0
- package/dist/utils/ajv.js.map +1 -0
- package/dist/utils/chainConstruct.d.ts +58 -0
- package/dist/utils/chainConstruct.js +136 -0
- package/dist/utils/chainConstruct.js.map +1 -0
- package/dist/utils/entriesFromList.d.ts +10 -0
- package/dist/utils/entriesFromList.js +18 -0
- package/dist/utils/entriesFromList.js.map +1 -0
- package/dist/utils/entriesFromObjects.d.ts +26 -0
- package/dist/utils/entriesFromObjects.js +10 -0
- package/dist/utils/entriesFromObjects.js.map +1 -0
- package/dist/utils/formatIssues.d.ts +13 -0
- package/dist/utils/formatIssues.js +35 -0
- package/dist/utils/formatIssues.js.map +1 -0
- package/dist/utils/getDotPath.d.ts +17 -0
- package/dist/utils/getDotPath.js +22 -0
- package/dist/utils/getDotPath.js.map +1 -0
- package/dist/utils/index.d.ts +23 -0
- package/dist/utils/index.js +24 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/isOfKind.d.ts +13 -0
- package/dist/utils/isOfKind.js +13 -0
- package/dist/utils/isOfKind.js.map +1 -0
- package/dist/utils/isOfType.d.ts +13 -0
- package/dist/utils/isOfType.js +13 -0
- package/dist/utils/isOfType.js.map +1 -0
- package/dist/utils/isValidationError.d.ts +10 -0
- package/dist/utils/isValidationError.js +13 -0
- package/dist/utils/isValidationError.js.map +1 -0
- package/dist/utils/jsonSchema.d.ts +10 -0
- package/dist/utils/jsonSchema.js +130 -0
- package/dist/utils/jsonSchema.js.map +1 -0
- package/dist/utils/schemaConstructors.d.ts +63 -0
- package/dist/utils/schemaConstructors.js +84 -0
- package/dist/utils/schemaConstructors.js.map +1 -0
- package/package.json +48 -4
package/LICENSE-APACHE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/LICENSE-MIT
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ZeruxJS.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @zeruxjs/validator
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Schema validation and transformation utilities with synchronous and asynchronous parsers. The library exports its schema constructors and validation actions from the package root.
|
|
4
|
+
|
|
5
|
+
## Fetch-compatible HTTP adapter
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { object, string, parseJsonRequest, validatedJsonHandler } from '@zeruxjs/validator';
|
|
9
|
+
const schema = object({ name: string() });
|
|
10
|
+
const handler = validatedJsonHandler(schema, async (body) => ({ hello: body.name }));
|
|
11
|
+
const response = await handler(new Request('https://example.test/api', { method:'POST', headers:{'content-type':'application/json'}, body: JSON.stringify({name:'Maya'}) }));
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
`readJsonBody` streams up to 1 MiB by default, rejecting invalid media types, malformed JSON and oversized payloads; `parseJsonRequest` and `parseQuery` validate with both synchronous and asynchronous schemas. `HttpValidationError.toResponse()` emits bounded error details and `Cache-Control: no-store`. Do not disclose raw input in external API errors. Use `maxBytes`/`maxQueryFields` to set explicit caps. This adapter works with the Web Fetch `Request` API and can be used by ZeruxJS route handlers or other framework integrations.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [Validates an ISBN-10](https://en.wikipedia.org/wiki/ISBN#ISBN-10_check_digits).
|
|
3
|
+
*
|
|
4
|
+
* @param input The input value.
|
|
5
|
+
*
|
|
6
|
+
* @returns `true` if the input is a valid ISBN-10, `false` otherwise.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function _isIsbn10(input: string): boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [Validates an ISBN-10](https://en.wikipedia.org/wiki/ISBN#ISBN-10_check_digits).
|
|
3
|
+
*
|
|
4
|
+
* @param input The input value.
|
|
5
|
+
*
|
|
6
|
+
* @returns `true` if the input is a valid ISBN-10, `false` otherwise.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export function _isIsbn10(input) {
|
|
11
|
+
const digits = input.split('').map((c) => (c === 'X' ? 10 : parseInt(c)));
|
|
12
|
+
let sum = 0;
|
|
13
|
+
for (let i = 0; i < 10; i++) {
|
|
14
|
+
sum += digits[i] * (10 - i);
|
|
15
|
+
}
|
|
16
|
+
return sum % 11 === 0;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=_isIsbn10.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_isIsbn10.js","sourceRoot":"","sources":["../../src/actions/_isIsbn10.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,UAAU,SAAS,CAAC,KAAa;IACrC,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1E,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5B,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;IAC9B,CAAC;IACD,OAAO,GAAG,GAAG,EAAE,KAAK,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [Validates an ISBN-13](https://en.wikipedia.org/wiki/ISBN#ISBN-13_check_digit_calculation).
|
|
3
|
+
*
|
|
4
|
+
* @param input The input value.
|
|
5
|
+
*
|
|
6
|
+
* @returns `true` if the input is a valid ISBN-13, `false` otherwise.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function _isIsbn13(input: string): boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [Validates an ISBN-13](https://en.wikipedia.org/wiki/ISBN#ISBN-13_check_digit_calculation).
|
|
3
|
+
*
|
|
4
|
+
* @param input The input value.
|
|
5
|
+
*
|
|
6
|
+
* @returns `true` if the input is a valid ISBN-13, `false` otherwise.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export function _isIsbn13(input) {
|
|
11
|
+
const digits = input.split('').map((c) => parseInt(c));
|
|
12
|
+
let sum = 0;
|
|
13
|
+
for (let i = 0; i < 13; i++) {
|
|
14
|
+
sum += digits[i] * (i % 2 === 0 ? 1 : 3);
|
|
15
|
+
}
|
|
16
|
+
return sum % 10 === 0;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=_isIsbn13.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_isIsbn13.js","sourceRoot":"","sources":["../../src/actions/_isIsbn13.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,UAAU,SAAS,CAAC,KAAa;IACrC,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACvD,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5B,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,GAAG,GAAG,EAAE,KAAK,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BaseIssue, OutputDataset } from '../types/index.js';
|
|
2
|
+
import type { Paths } from './types/partialCheck.js';
|
|
3
|
+
/**
|
|
4
|
+
* Checks if a dataset is partially typed.
|
|
5
|
+
*
|
|
6
|
+
* @param dataset The dataset to check.
|
|
7
|
+
* @param paths The paths to check.
|
|
8
|
+
*
|
|
9
|
+
* @returns Whether it is partially typed.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare function _isPartiallyTyped(dataset: OutputDataset<unknown, BaseIssue<unknown>>, paths: Paths): boolean;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if a dataset is partially typed.
|
|
3
|
+
*
|
|
4
|
+
* @param dataset The dataset to check.
|
|
5
|
+
* @param paths The paths to check.
|
|
6
|
+
*
|
|
7
|
+
* @returns Whether it is partially typed.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
// @__NO_SIDE_EFFECTS__
|
|
12
|
+
export function _isPartiallyTyped(dataset, paths) {
|
|
13
|
+
// If issues exist, check if a specified path matches path of a schema issue
|
|
14
|
+
if (dataset.issues) {
|
|
15
|
+
for (const path of paths) {
|
|
16
|
+
for (const issue of dataset.issues) {
|
|
17
|
+
// Hint: We also mark the data as untyped if there are validation
|
|
18
|
+
// issues, since the data could potentially be untyped if a pipeline
|
|
19
|
+
// contains a transformation action.
|
|
20
|
+
// Create typed variable
|
|
21
|
+
let typed = false;
|
|
22
|
+
// Calculate bound of match check
|
|
23
|
+
const bound = Math.min(path.length, issue.path?.length ?? 0);
|
|
24
|
+
// Mark data as typed if any path items of same index do not match
|
|
25
|
+
for (let index = 0; index < bound; index++) {
|
|
26
|
+
if (
|
|
27
|
+
// @ts-expect-error
|
|
28
|
+
path[index] !== issue.path[index].key &&
|
|
29
|
+
// @ts-expect-error
|
|
30
|
+
(path[index] !== '$' || issue.path[index].type !== 'array')) {
|
|
31
|
+
typed = true;
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
// Return false if untyped
|
|
36
|
+
if (!typed) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
// Return true if typed
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=_isPartiallyTyped.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_isPartiallyTyped.js","sourceRoot":"","sources":["../../src/actions/_isPartiallyTyped.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,uBAAuB;AACvB,MAAM,UAAU,iBAAiB,CAC/B,OAAmD,EACnD,KAAY;IAEZ,4EAA4E;IAC5E,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;gBACnC,iEAAiE;gBACjE,oEAAoE;gBACpE,oCAAoC;gBAEpC,wBAAwB;gBACxB,IAAI,KAAK,GAAG,KAAK,CAAC;gBAElB,iCAAiC;gBACjC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC;gBAE7D,kEAAkE;gBAClE,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC;oBAC3C;oBACE,mBAAmB;oBACnB,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG;wBACrC,mBAAmB;wBACnB,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,EAC3D,CAAC;wBACD,KAAK,GAAG,IAAI,CAAC;wBACb,MAAM;oBACR,CAAC;gBACH,CAAC;gBAED,0BAA0B;gBAC1B,IAAI,CAAC,KAAK,EAAE,CAAC;oBACX,OAAO,KAAK,CAAC;gBACf,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,uBAAuB;IACvB,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { LooseTupleIssue, LooseTupleSchema, StrictTupleIssue, StrictTupleSchema, TupleIssue, TupleSchema, TupleWithRestIssue, TupleWithRestSchema } from '../schemas/index.js';
|
|
2
|
+
import type { BaseIssue, BaseSchema, BaseTransformation, ErrorMessage, InferInput, TupleItems } from '../types/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Schema type.
|
|
5
|
+
*/
|
|
6
|
+
type Schema = LooseTupleSchema<TupleItems, ErrorMessage<LooseTupleIssue> | undefined> | StrictTupleSchema<TupleItems, ErrorMessage<StrictTupleIssue> | undefined> | TupleSchema<TupleItems, ErrorMessage<TupleIssue> | undefined> | TupleWithRestSchema<TupleItems, BaseSchema<unknown, unknown, BaseIssue<unknown>>, ErrorMessage<TupleWithRestIssue> | undefined>;
|
|
7
|
+
/**
|
|
8
|
+
* Args action type.
|
|
9
|
+
*/
|
|
10
|
+
export interface ArgsAction<TInput extends (...args: any[]) => unknown, TSchema extends Schema> extends BaseTransformation<TInput, (...args: InferInput<TSchema>) => ReturnType<TInput>, never> {
|
|
11
|
+
/**
|
|
12
|
+
* The action type.
|
|
13
|
+
*/
|
|
14
|
+
readonly type: 'args';
|
|
15
|
+
/**
|
|
16
|
+
* The action reference.
|
|
17
|
+
*/
|
|
18
|
+
readonly reference: typeof args;
|
|
19
|
+
/**
|
|
20
|
+
* The arguments schema.
|
|
21
|
+
*/
|
|
22
|
+
readonly schema: TSchema;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Creates a function arguments transformation action.
|
|
26
|
+
*
|
|
27
|
+
* @param schema The arguments schema.
|
|
28
|
+
*
|
|
29
|
+
* @returns An args action.
|
|
30
|
+
*/
|
|
31
|
+
export declare function args<TInput extends (...args: any[]) => unknown, TSchema extends Schema>(schema: TSchema): ArgsAction<TInput, TSchema>;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ValidationError } from '../utils/index.js';
|
|
2
|
+
// @__NO_SIDE_EFFECTS__
|
|
3
|
+
export function args(schema) {
|
|
4
|
+
return {
|
|
5
|
+
kind: 'transformation',
|
|
6
|
+
type: 'args',
|
|
7
|
+
reference: args,
|
|
8
|
+
async: false,
|
|
9
|
+
schema,
|
|
10
|
+
'~run'(dataset, config) {
|
|
11
|
+
const func = dataset.value;
|
|
12
|
+
dataset.value = (...args_) => {
|
|
13
|
+
const argsDataset = this.schema['~run']({ value: args_ }, config);
|
|
14
|
+
if (argsDataset.issues) {
|
|
15
|
+
throw new ValidationError(argsDataset.issues);
|
|
16
|
+
}
|
|
17
|
+
return func(...argsDataset.value);
|
|
18
|
+
};
|
|
19
|
+
return dataset;
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=args.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/actions/args.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAsDpD,uBAAuB;AACvB,MAAM,UAAU,IAAI,CAClB,MAAc;IAEd,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,IAAI;QACf,KAAK,EAAE,KAAK;QACZ,MAAM;QACN,MAAM,CAAC,OAAO,EAAE,MAAM;YACpB,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC;YAC3B,OAAO,CAAC,KAAK,GAAG,CAAC,GAAG,KAAK,EAAE,EAAE;gBAC3B,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,CAAC;gBAClE,IAAI,WAAW,CAAC,MAAM,EAAE,CAAC;oBACvB,MAAM,IAAI,eAAe,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;gBAChD,CAAC;gBACD,OAAO,IAAI,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;YACpC,CAAC,CAAC;YACF,OAAO,OAAO,CAAC;QACjB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { LooseTupleIssue, LooseTupleSchema, LooseTupleSchemaAsync, StrictTupleIssue, StrictTupleSchema, StrictTupleSchemaAsync, TupleIssue, TupleSchema, TupleSchemaAsync, TupleWithRestIssue, TupleWithRestSchema, TupleWithRestSchemaAsync } from '../schemas/index.js';
|
|
2
|
+
import type { BaseIssue, BaseSchema, BaseSchemaAsync, BaseTransformation, ErrorMessage, InferInput, TupleItems, TupleItemsAsync } from '../types/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Schema type.
|
|
5
|
+
*/
|
|
6
|
+
type Schema = LooseTupleSchema<TupleItems, ErrorMessage<LooseTupleIssue> | undefined> | LooseTupleSchemaAsync<TupleItemsAsync, ErrorMessage<LooseTupleIssue> | undefined> | StrictTupleSchema<TupleItems, ErrorMessage<StrictTupleIssue> | undefined> | StrictTupleSchemaAsync<TupleItemsAsync, ErrorMessage<StrictTupleIssue> | undefined> | TupleSchema<TupleItems, ErrorMessage<TupleIssue> | undefined> | TupleSchemaAsync<TupleItemsAsync, ErrorMessage<TupleIssue> | undefined> | TupleWithRestSchema<TupleItems, BaseSchema<unknown, unknown, BaseIssue<unknown>>, ErrorMessage<TupleWithRestIssue> | undefined> | TupleWithRestSchemaAsync<TupleItemsAsync, BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, ErrorMessage<TupleWithRestIssue> | undefined>;
|
|
7
|
+
/**
|
|
8
|
+
* Args action async type.
|
|
9
|
+
*/
|
|
10
|
+
export interface ArgsActionAsync<TInput extends (...args: any[]) => unknown, TSchema extends Schema> extends BaseTransformation<TInput, (...args: InferInput<TSchema>) => Promise<Awaited<ReturnType<TInput>>>, never> {
|
|
11
|
+
/**
|
|
12
|
+
* The action type.
|
|
13
|
+
*/
|
|
14
|
+
readonly type: 'args';
|
|
15
|
+
/**
|
|
16
|
+
* The action reference.
|
|
17
|
+
*/
|
|
18
|
+
readonly reference: typeof argsAsync;
|
|
19
|
+
/**
|
|
20
|
+
* The arguments schema.
|
|
21
|
+
*/
|
|
22
|
+
readonly schema: TSchema;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Creates a function arguments transformation action.
|
|
26
|
+
*
|
|
27
|
+
* @param schema The arguments schema.
|
|
28
|
+
*
|
|
29
|
+
* @returns An args action.
|
|
30
|
+
*/
|
|
31
|
+
export declare function argsAsync<TInput extends (...args: any[]) => unknown, TSchema extends Schema>(schema: TSchema): ArgsActionAsync<TInput, TSchema>;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ValidationError } from '../utils/index.js';
|
|
2
|
+
// @__NO_SIDE_EFFECTS__
|
|
3
|
+
export function argsAsync(schema) {
|
|
4
|
+
return {
|
|
5
|
+
kind: 'transformation',
|
|
6
|
+
type: 'args',
|
|
7
|
+
reference: argsAsync,
|
|
8
|
+
async: false,
|
|
9
|
+
schema,
|
|
10
|
+
'~run'(dataset, config) {
|
|
11
|
+
const func = dataset.value;
|
|
12
|
+
dataset.value = async (...args) => {
|
|
13
|
+
const argsDataset = await schema['~run']({ value: args }, config);
|
|
14
|
+
if (argsDataset.issues) {
|
|
15
|
+
throw new ValidationError(argsDataset.issues);
|
|
16
|
+
}
|
|
17
|
+
return func(...argsDataset.value);
|
|
18
|
+
};
|
|
19
|
+
return dataset;
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=argsAsync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"argsAsync.js","sourceRoot":"","sources":["../../src/actions/argsAsync.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAqEpD,uBAAuB;AACvB,MAAM,UAAU,SAAS,CACvB,MAAc;IAEd,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,SAAS;QACpB,KAAK,EAAE,KAAK;QACZ,MAAM;QACN,MAAM,CAAC,OAAO,EAAE,MAAM;YACpB,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC;YAC3B,OAAO,CAAC,KAAK,GAAG,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE;gBAChC,MAAM,WAAW,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,MAAM,CAAC,CAAC;gBAClE,IAAI,WAAW,CAAC,MAAM,EAAE,CAAC;oBACvB,MAAM,IAAI,eAAe,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;gBAChD,CAAC;gBACD,OAAO,IAAI,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;YACpC,CAAC,CAAC;YACF,OAAO,OAEN,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { BaseTransformationAsync } from '../types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Await action async interface.
|
|
4
|
+
*/
|
|
5
|
+
export interface AwaitActionAsync<TInput extends Promise<unknown>> extends BaseTransformationAsync<TInput, Awaited<TInput>, never> {
|
|
6
|
+
/**
|
|
7
|
+
* The action type.
|
|
8
|
+
*/
|
|
9
|
+
readonly type: 'await';
|
|
10
|
+
/**
|
|
11
|
+
* The action reference.
|
|
12
|
+
*/
|
|
13
|
+
readonly reference: typeof awaitAsync;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Creates an await transformation action.
|
|
17
|
+
*
|
|
18
|
+
* @returns An await action.
|
|
19
|
+
*/
|
|
20
|
+
export declare function awaitAsync<TInput extends Promise<unknown>>(): AwaitActionAsync<TInput>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates an await transformation action.
|
|
3
|
+
*
|
|
4
|
+
* @returns An await action.
|
|
5
|
+
*/
|
|
6
|
+
// @__NO_SIDE_EFFECTS__
|
|
7
|
+
export function awaitAsync() {
|
|
8
|
+
return {
|
|
9
|
+
kind: 'transformation',
|
|
10
|
+
type: 'await',
|
|
11
|
+
reference: awaitAsync,
|
|
12
|
+
async: true,
|
|
13
|
+
async '~run'(dataset) {
|
|
14
|
+
dataset.value = await dataset.value;
|
|
15
|
+
return dataset;
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=awaitAsync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"awaitAsync.js","sourceRoot":"","sources":["../../src/actions/awaitAsync.ts"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,uBAAuB;AACvB,MAAM,UAAU,UAAU;IAGxB,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,OAAO;QACb,SAAS,EAAE,UAAU;QACrB,KAAK,EAAE,IAAI;QACX,KAAK,CAAC,MAAM,CAAC,OAAO;YAClB,OAAO,CAAC,KAAK,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC;YACpC,OAAO,OAA0C,CAAC;QACpD,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { BaseIssue, BaseValidation, ErrorMessage } from '../types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Base64 issue interface.
|
|
4
|
+
*/
|
|
5
|
+
export interface Base64Issue<TInput extends string> extends BaseIssue<TInput> {
|
|
6
|
+
/**
|
|
7
|
+
* The issue kind.
|
|
8
|
+
*/
|
|
9
|
+
readonly kind: 'validation';
|
|
10
|
+
/**
|
|
11
|
+
* The issue type.
|
|
12
|
+
*/
|
|
13
|
+
readonly type: 'base64';
|
|
14
|
+
/**
|
|
15
|
+
* The expected property.
|
|
16
|
+
*/
|
|
17
|
+
readonly expected: null;
|
|
18
|
+
/**
|
|
19
|
+
* The received property.
|
|
20
|
+
*/
|
|
21
|
+
readonly received: `"${string}"`;
|
|
22
|
+
/**
|
|
23
|
+
* The Base64 regex.
|
|
24
|
+
*/
|
|
25
|
+
readonly requirement: RegExp;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Base64 action interface.
|
|
29
|
+
*/
|
|
30
|
+
export interface Base64Action<TInput extends string, TMessage extends ErrorMessage<Base64Issue<TInput>> | undefined> extends BaseValidation<TInput, TInput, Base64Issue<TInput>> {
|
|
31
|
+
/**
|
|
32
|
+
* The action type.
|
|
33
|
+
*/
|
|
34
|
+
readonly type: 'base64';
|
|
35
|
+
/**
|
|
36
|
+
* The action reference.
|
|
37
|
+
*/
|
|
38
|
+
readonly reference: typeof base64;
|
|
39
|
+
/**
|
|
40
|
+
* The expected property.
|
|
41
|
+
*/
|
|
42
|
+
readonly expects: null;
|
|
43
|
+
/**
|
|
44
|
+
* The Base64 regex.
|
|
45
|
+
*/
|
|
46
|
+
readonly requirement: RegExp;
|
|
47
|
+
/**
|
|
48
|
+
* The error message.
|
|
49
|
+
*/
|
|
50
|
+
readonly message: TMessage;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Creates a [Base64](https://en.wikipedia.org/wiki/Base64) validation action.
|
|
54
|
+
*
|
|
55
|
+
* @returns A Base64 action.
|
|
56
|
+
*/
|
|
57
|
+
export declare function base64<TInput extends string>(): Base64Action<TInput, undefined>;
|
|
58
|
+
/**
|
|
59
|
+
* Creates a [Base64](https://en.wikipedia.org/wiki/Base64) validation action.
|
|
60
|
+
*
|
|
61
|
+
* @param message The error message.
|
|
62
|
+
*
|
|
63
|
+
* @returns A Base64 action.
|
|
64
|
+
*/
|
|
65
|
+
export declare function base64<TInput extends string, const TMessage extends ErrorMessage<Base64Issue<TInput>> | undefined>(message: TMessage): Base64Action<TInput, TMessage>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BASE64_REGEX } from '../regex.js';
|
|
2
|
+
import { _addIssue } from '../utils/index.js';
|
|
3
|
+
// @__NO_SIDE_EFFECTS__
|
|
4
|
+
export function base64(message) {
|
|
5
|
+
return {
|
|
6
|
+
kind: 'validation',
|
|
7
|
+
type: 'base64',
|
|
8
|
+
reference: base64,
|
|
9
|
+
async: false,
|
|
10
|
+
expects: null,
|
|
11
|
+
requirement: BASE64_REGEX,
|
|
12
|
+
message,
|
|
13
|
+
'~run'(dataset, config) {
|
|
14
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) {
|
|
15
|
+
_addIssue(this, 'Base64', dataset, config);
|
|
16
|
+
}
|
|
17
|
+
return dataset;
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=base64.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base64.js","sourceRoot":"","sources":["../../src/actions/base64.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAM3C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AA+E9C,uBAAuB;AACvB,MAAM,UAAU,MAAM,CACpB,OAA2C;IAE3C,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,MAAM;QACjB,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,YAAY;QACzB,OAAO;QACP,MAAM,CAAC,OAAO,EAAE,MAAM;YACpB,IAAI,OAAO,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC3D,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;YAC7C,CAAC;YACD,OAAO,OAAO,CAAC;QACjB,CAAC;KACF,CAAC;AACJ,CAAC"}
|