@bgord/tools 1.3.24 → 1.4.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/src/age-years.vo.d.ts +11 -0
- package/dist/src/age-years.vo.js +6 -0
- package/dist/{age.vo.js → src/age.vo.js} +2 -1
- package/dist/src/api-key.vo.d.ts +7 -0
- package/dist/src/api-key.vo.js +7 -0
- package/dist/src/basename.vo.d.ts +12 -0
- package/dist/src/basename.vo.js +22 -0
- package/dist/src/day-iso-id.vo.d.ts +9 -0
- package/dist/{day-iso-id.vo.js → src/day-iso-id.vo.js} +4 -8
- package/dist/{day.vo.js → src/day.vo.js} +7 -6
- package/dist/src/directory-path-absolute.vo.d.ts +12 -0
- package/dist/{directory-path-absolute.vo.js → src/directory-path-absolute.vo.js} +5 -12
- package/dist/src/directory-path-relative.vo.d.ts +12 -0
- package/dist/{directory-path-relative.vo.js → src/directory-path-relative.vo.js} +5 -12
- package/dist/src/distance-value.vo.d.ts +7 -0
- package/dist/src/distance-value.vo.js +5 -0
- package/dist/{distance.vo.js → src/distance.vo.js} +7 -6
- package/dist/src/division-factor.vo.d.ts +7 -0
- package/dist/src/division-factor.vo.js +5 -0
- package/dist/src/duration-ms.vo.d.ts +6 -0
- package/dist/src/duration-ms.vo.js +5 -0
- package/dist/{duration.service.js → src/duration.service.js} +2 -1
- package/dist/src/email.vo.d.ts +6 -0
- package/dist/src/email.vo.js +4 -0
- package/dist/{etags.vo.js → src/etags.vo.js} +3 -2
- package/dist/src/extension.vo.d.ts +9 -0
- package/dist/src/extension.vo.js +15 -0
- package/dist/src/feature-flag-value.vo.d.ts +10 -0
- package/dist/{feature-flag-value.vo.js → src/feature-flag-value.vo.js} +2 -2
- package/dist/src/file-path-absolute-schema.vo.d.ts +17 -0
- package/dist/{file-path-absolute-schema.vo.js → src/file-path-absolute-schema.vo.js} +6 -13
- package/dist/src/file-path-relative-schema.vo.d.ts +17 -0
- package/dist/{file-path-relative-schema.vo.js → src/file-path-relative-schema.vo.js} +6 -13
- package/dist/{file-path.vo.js → src/file-path.vo.js} +5 -4
- package/dist/src/filename-affix.vo.d.ts +13 -0
- package/dist/{filename-affix.vo.js → src/filename-affix.vo.js} +4 -9
- package/dist/src/filename-from-string.vo.d.ts +10 -0
- package/dist/{filename-from-string.vo.js → src/filename-from-string.vo.js} +5 -8
- package/dist/{filename.vo.js → src/filename.vo.js} +8 -7
- package/dist/src/height-milimiters.vo.d.ts +7 -0
- package/dist/src/height-milimiters.vo.js +8 -0
- package/dist/{height.vo.js → src/height.vo.js} +4 -3
- package/dist/src/hour-value.vo.d.ts +7 -0
- package/dist/src/hour-value.vo.js +5 -0
- package/dist/{hour.vo.js → src/hour.vo.js} +3 -2
- package/dist/src/iban-schema.vo.d.ts +7 -0
- package/dist/src/iban-schema.vo.js +7 -0
- package/dist/{iban.vo.js → src/iban.vo.js} +2 -1
- package/dist/src/image.vo.d.ts +13 -0
- package/dist/src/image.vo.js +10 -0
- package/dist/src/integer-non-negative.vo.d.ts +7 -0
- package/dist/src/integer-non-negative.vo.js +8 -0
- package/dist/src/integer-positive.vo.d.ts +7 -0
- package/dist/src/integer-positive.vo.js +5 -0
- package/dist/src/integer.vo.d.ts +6 -0
- package/dist/src/integer.vo.js +4 -0
- package/dist/src/language.vo.d.ts +7 -0
- package/dist/{language.vo.js → src/language.vo.js} +2 -2
- package/dist/src/mime-value.vo.d.ts +7 -0
- package/dist/{mime-value.vo.js → src/mime-value.vo.js} +4 -7
- package/dist/{mime.vo.js → src/mime.vo.js} +2 -1
- package/dist/src/mimes.js +19 -0
- package/dist/src/minute-value.vo.d.ts +7 -0
- package/dist/src/minute-value.vo.js +5 -0
- package/dist/{minute.vo.js → src/minute.vo.js} +3 -2
- package/dist/src/money-amount.vo.d.ts +7 -0
- package/dist/src/money-amount.vo.js +5 -0
- package/dist/{money.vo.js → src/money.vo.js} +7 -6
- package/dist/src/month-iso-id.vo.d.ts +8 -0
- package/dist/{month-iso-id.vo.js → src/month-iso-id.vo.js} +5 -9
- package/dist/{month.vo.js → src/month.vo.js} +5 -4
- package/dist/src/multiplication-factor.vo.d.ts +7 -0
- package/dist/src/multiplication-factor.vo.js +8 -0
- package/dist/src/object-key.vo.d.ts +11 -0
- package/dist/src/object-key.vo.js +19 -0
- package/dist/src/package-version-schema.vo.d.ts +8 -0
- package/dist/{package-version-schema.vo.js → src/package-version-schema.vo.js} +4 -7
- package/dist/{package-version.vo.js → src/package-version.vo.js} +3 -4
- package/dist/src/pagination-page.vo.d.ts +6 -0
- package/dist/src/pagination-page.vo.js +3 -0
- package/dist/src/pagination-skip.vo.d.ts +7 -0
- package/dist/src/pagination-skip.vo.js +3 -0
- package/dist/src/pagination-take.vo.d.ts +7 -0
- package/dist/src/pagination-take.vo.js +3 -0
- package/dist/{pagination.service.js → src/pagination.service.js} +8 -7
- package/dist/src/quarter-iso-id.vo.d.ts +8 -0
- package/dist/src/quarter-iso-id.vo.js +7 -0
- package/dist/{quarter.vo.js → src/quarter.vo.js} +3 -2
- package/dist/src/reordering-item-position-value.vo.d.ts +6 -0
- package/dist/src/reordering-item-position-value.vo.js +3 -0
- package/dist/{reordering.service.d.ts → src/reordering.service.d.ts} +9 -9
- package/dist/{reordering.service.js → src/reordering.service.js} +7 -7
- package/dist/src/revision-value.vo.d.ts +7 -0
- package/dist/src/revision-value.vo.js +3 -0
- package/dist/{revision.vo.js → src/revision.vo.js} +3 -2
- package/dist/{rounding-decimal.strategy.d.ts → src/rounding-decimal.strategy.d.ts} +2 -2
- package/dist/src/rounding-decimal.strategy.js +14 -0
- package/dist/src/size-bytes.vo.d.ts +6 -0
- package/dist/src/size-bytes.vo.js +5 -0
- package/dist/{size.vo.js → src/size.vo.js} +5 -4
- package/dist/src/time-zone-offset-value.vo.d.ts +8 -0
- package/dist/src/time-zone-offset-value.vo.js +13 -0
- package/dist/src/timestamp-value.vo.d.ts +6 -0
- package/dist/src/timestamp-value.vo.js +5 -0
- package/dist/{timestamp.vo.js → src/timestamp.vo.js} +2 -1
- package/dist/src/timezone.vo.d.ts +9 -0
- package/dist/{timezone.vo.js → src/timezone.vo.js} +7 -10
- package/dist/src/url-with-slash.vo.d.ts +6 -0
- package/dist/src/url-with-slash.vo.js +5 -0
- package/dist/src/url-without-slash.vo.d.ts +6 -0
- package/dist/src/url-without-slash.vo.js +5 -0
- package/dist/src/week-iso-id.vo.d.ts +8 -0
- package/dist/{week-iso-id.vo.js → src/week-iso-id.vo.js} +5 -9
- package/dist/{week.vo.js → src/week.vo.js} +5 -4
- package/dist/src/weekday-iso-id.vo.d.ts +7 -0
- package/dist/src/weekday-iso-id.vo.js +5 -0
- package/dist/{weekday.vo.js → src/weekday.vo.js} +9 -8
- package/dist/src/weight-grams.vo.d.ts +7 -0
- package/dist/src/weight-grams.vo.js +5 -0
- package/dist/{weight.vo.js → src/weight.vo.js} +8 -7
- package/dist/src/year-iso-id.vo.d.ts +7 -0
- package/dist/src/year-iso-id.vo.js +7 -0
- package/dist/{year.vo.js → src/year.vo.js} +6 -5
- package/dist/tests/age-years.vo.test.d.ts +1 -0
- package/dist/tests/age-years.vo.test.js +24 -0
- package/dist/tests/age.vo.test.d.ts +1 -0
- package/dist/tests/age.vo.test.js +106 -0
- package/dist/tests/api-key.vo.test.d.ts +1 -0
- package/dist/tests/api-key.vo.test.js +24 -0
- package/dist/tests/basename.vo.test.d.ts +1 -0
- package/dist/tests/basename.vo.test.js +53 -0
- package/dist/tests/batch.test.d.ts +1 -0
- package/dist/tests/batch.test.js +24 -0
- package/dist/tests/date-calculator.service.test.d.ts +1 -0
- package/dist/tests/date-calculator.service.test.js +32 -0
- package/dist/tests/date-formatter.service.test.d.ts +1 -0
- package/dist/tests/date-formatter.service.test.js +22 -0
- package/dist/tests/date-range.vo.test.d.ts +1 -0
- package/dist/tests/date-range.vo.test.js +49 -0
- package/dist/tests/day-iso-id.vo.test.d.ts +1 -0
- package/dist/tests/day-iso-id.vo.test.js +36 -0
- package/dist/tests/day.vo.test.d.ts +1 -0
- package/dist/tests/day.vo.test.js +68 -0
- package/dist/tests/directory-path-absolute.vo.test.d.ts +1 -0
- package/dist/tests/directory-path-absolute.vo.test.js +47 -0
- package/dist/tests/directory-path-relative.vo.test.d.ts +1 -0
- package/dist/tests/directory-path-relative.vo.test.js +44 -0
- package/dist/tests/distance-value.vo.test.d.ts +1 -0
- package/dist/tests/distance-value.vo.test.js +21 -0
- package/dist/tests/distance.vo.test.d.ts +1 -0
- package/dist/tests/distance.vo.test.js +74 -0
- package/dist/tests/division-factor.vo.test.d.ts +1 -0
- package/dist/tests/division-factor.vo.test.js +21 -0
- package/dist/tests/dll.service.test.d.ts +1 -0
- package/dist/tests/dll.service.test.js +381 -0
- package/dist/tests/duration-ms.vo.test.d.ts +1 -0
- package/dist/tests/duration-ms.vo.test.js +18 -0
- package/dist/tests/duration.service.test.d.ts +1 -0
- package/dist/tests/duration.service.test.js +126 -0
- package/dist/tests/email-mask.service.test.d.ts +1 -0
- package/dist/tests/email-mask.service.test.js +15 -0
- package/dist/tests/email.vo.test.d.ts +1 -0
- package/dist/tests/email.vo.test.js +17 -0
- package/dist/tests/etags.vo.test.d.ts +1 -0
- package/dist/tests/etags.vo.test.js +54 -0
- package/dist/tests/extension.vo.test.d.ts +1 -0
- package/dist/tests/extension.vo.test.js +51 -0
- package/dist/tests/feature-flag-value.vo.test.d.ts +1 -0
- package/dist/tests/feature-flag-value.vo.test.js +12 -0
- package/dist/tests/feature-flag.vo.test.d.ts +1 -0
- package/dist/tests/feature-flag.vo.test.js +13 -0
- package/dist/tests/file-path-absolute-schema.vo.test.d.ts +1 -0
- package/dist/tests/file-path-absolute-schema.vo.test.js +53 -0
- package/dist/tests/file-path-relative-schema.vo.test.d.ts +1 -0
- package/dist/tests/file-path-relative-schema.vo.test.js +52 -0
- package/dist/tests/file-path.vo.test.d.ts +1 -0
- package/dist/tests/file-path.vo.test.js +74 -0
- package/dist/tests/filename-affix.vo.test.d.ts +1 -0
- package/dist/tests/filename-affix.vo.test.js +30 -0
- package/dist/tests/filename-from-string.vo.test.d.ts +1 -0
- package/dist/tests/filename-from-string.vo.test.js +37 -0
- package/dist/tests/filename.vo.test.d.ts +1 -0
- package/dist/tests/filename.vo.test.js +93 -0
- package/dist/tests/height-milimiters.vo.test.d.ts +1 -0
- package/dist/tests/height-milimiters.vo.test.js +21 -0
- package/dist/tests/height.vo.test.d.ts +1 -0
- package/dist/tests/height.vo.test.js +64 -0
- package/dist/tests/hour-value.vo.test.d.ts +1 -0
- package/dist/tests/hour-value.vo.test.js +24 -0
- package/dist/tests/hour.vo.test.d.ts +1 -0
- package/dist/tests/hour.vo.test.js +64 -0
- package/dist/tests/iban-mask.service.test.d.ts +1 -0
- package/dist/tests/iban-mask.service.test.js +13 -0
- package/dist/tests/iban-schema.vo.test.d.ts +1 -0
- package/dist/tests/iban-schema.vo.test.js +43 -0
- package/dist/tests/iban.vo.test.d.ts +1 -0
- package/dist/tests/iban.vo.test.js +46 -0
- package/dist/tests/image.vo.test.d.ts +1 -0
- package/dist/tests/image.vo.test.js +41 -0
- package/dist/tests/integer-non-negative.vo.test.d.ts +1 -0
- package/dist/tests/integer-non-negative.vo.test.js +22 -0
- package/dist/tests/integer-positive.vo.test.d.ts +1 -0
- package/dist/tests/integer-positive.vo.test.js +21 -0
- package/dist/tests/integer.vo.test.d.ts +1 -0
- package/dist/tests/integer.vo.test.js +21 -0
- package/dist/tests/language.vo.test.d.ts +1 -0
- package/dist/tests/language.vo.test.js +28 -0
- package/dist/tests/linear-regression.service.test.d.ts +1 -0
- package/dist/tests/linear-regression.service.test.js +111 -0
- package/dist/tests/mean.service.test.d.ts +1 -0
- package/dist/tests/mean.service.test.js +23 -0
- package/dist/tests/mime-registry-entry.vo.test.d.ts +1 -0
- package/dist/tests/mime-registry-entry.vo.test.js +15 -0
- package/dist/tests/mime-registry.service.test.d.ts +1 -0
- package/dist/tests/mime-registry.service.test.js +45 -0
- package/dist/tests/mime-value.vo.test.d.ts +1 -0
- package/dist/tests/mime-value.vo.test.js +49 -0
- package/dist/tests/mime.vo.test.d.ts +1 -0
- package/dist/tests/mime.vo.test.js +53 -0
- package/dist/tests/mimes.test.d.ts +1 -0
- package/dist/tests/mimes.test.js +28 -0
- package/dist/tests/min-max-scaler.service.test.d.ts +1 -0
- package/dist/tests/min-max-scaler.service.test.js +116 -0
- package/dist/tests/minute-value.vo.test.d.ts +1 -0
- package/dist/tests/minute-value.vo.test.js +24 -0
- package/dist/tests/minute.vo.test.d.ts +1 -0
- package/dist/tests/minute.vo.test.js +64 -0
- package/dist/tests/mocks.d.ts +6 -0
- package/dist/tests/mocks.js +7 -0
- package/dist/tests/money-amount.vo.test.d.ts +1 -0
- package/dist/tests/money-amount.vo.test.js +21 -0
- package/dist/tests/money.vo.test.d.ts +1 -0
- package/dist/tests/money.vo.test.js +90 -0
- package/dist/tests/month-iso-id.vo.test.d.ts +1 -0
- package/dist/tests/month-iso-id.vo.test.js +36 -0
- package/dist/tests/month.vo.test.d.ts +1 -0
- package/dist/tests/month.vo.test.js +65 -0
- package/dist/tests/multiplication-factor.vo.test.d.ts +1 -0
- package/dist/tests/multiplication-factor.vo.test.js +19 -0
- package/dist/tests/noop.test.d.ts +1 -0
- package/dist/tests/noop.test.js +12 -0
- package/dist/tests/object-key.vo.test.d.ts +1 -0
- package/dist/tests/object-key.vo.test.js +56 -0
- package/dist/tests/outlier-detector.service.test.d.ts +1 -0
- package/dist/tests/outlier-detector.service.test.js +35 -0
- package/dist/tests/package-version-schema.vo.test.d.ts +1 -0
- package/dist/tests/package-version-schema.vo.test.js +32 -0
- package/dist/tests/package-version.vo.test.d.ts +1 -0
- package/dist/tests/package-version.vo.test.js +138 -0
- package/dist/tests/pagination-page.vo.test.d.ts +1 -0
- package/dist/tests/pagination-page.vo.test.js +26 -0
- package/dist/tests/pagination-skip.vo.test.d.ts +1 -0
- package/dist/tests/pagination-skip.vo.test.js +23 -0
- package/dist/tests/pagination-take.vo.test.d.ts +1 -0
- package/dist/tests/pagination-take.vo.test.js +25 -0
- package/dist/tests/pagination.service.test.d.ts +1 -0
- package/dist/tests/pagination.service.test.js +92 -0
- package/dist/tests/percentage.service.test.d.ts +1 -0
- package/dist/tests/percentage.service.test.js +16 -0
- package/dist/tests/population-standard-deviation.service.test.d.ts +1 -0
- package/dist/tests/population-standard-deviation.service.test.js +20 -0
- package/dist/tests/quarter-iso-id.vo.test.d.ts +1 -0
- package/dist/tests/quarter-iso-id.vo.test.js +30 -0
- package/dist/tests/quarter.vo.test.d.ts +1 -0
- package/dist/tests/quarter.vo.test.js +54 -0
- package/dist/tests/random.service.test.d.ts +1 -0
- package/dist/tests/random.service.test.js +93 -0
- package/dist/tests/rate-limiter.service.test.d.ts +1 -0
- package/dist/tests/rate-limiter.service.test.js +39 -0
- package/dist/tests/relative-date.vo.test.d.ts +1 -0
- package/dist/tests/relative-date.vo.test.js +22 -0
- package/dist/tests/reordering-item-position-value.vo.test.d.ts +1 -0
- package/dist/tests/reordering-item-position-value.vo.test.js +21 -0
- package/dist/tests/reordering.service.test.d.ts +1 -0
- package/dist/tests/reordering.service.test.js +76 -0
- package/dist/tests/repeat.test.d.ts +1 -0
- package/dist/tests/repeat.test.js +8 -0
- package/dist/tests/revision-value.vo.test.d.ts +1 -0
- package/dist/tests/revision-value.vo.test.js +21 -0
- package/dist/tests/revision.vo.test.d.ts +1 -0
- package/dist/tests/revision.vo.test.js +52 -0
- package/dist/tests/rounding-decimal.strategy.test.d.ts +1 -0
- package/dist/tests/rounding-decimal.strategy.test.js +17 -0
- package/dist/tests/rounding-down.strategy.test.d.ts +1 -0
- package/dist/tests/rounding-down.strategy.test.js +9 -0
- package/dist/tests/rounding-to-nearest.strategy.test.d.ts +1 -0
- package/dist/tests/rounding-to-nearest.strategy.test.js +9 -0
- package/dist/tests/rounding-up.strategy.test.d.ts +1 -0
- package/dist/tests/rounding-up.strategy.test.js +9 -0
- package/dist/tests/size-bytes.vo.test.d.ts +1 -0
- package/dist/tests/size-bytes.vo.test.js +21 -0
- package/dist/tests/size.vo.test.d.ts +1 -0
- package/dist/tests/size.vo.test.js +93 -0
- package/dist/tests/slug.service.test.d.ts +1 -0
- package/dist/tests/slug.service.test.js +45 -0
- package/dist/tests/sum.service.test.d.ts +1 -0
- package/dist/tests/sum.service.test.js +22 -0
- package/dist/tests/thousands-separator.service.test.d.ts +1 -0
- package/dist/tests/thousands-separator.service.test.js +27 -0
- package/dist/tests/time-zone-offset-value.test.d.ts +1 -0
- package/dist/tests/time-zone-offset-value.test.js +27 -0
- package/dist/tests/timestamp-value.vo.test.d.ts +1 -0
- package/dist/tests/timestamp-value.vo.test.js +21 -0
- package/dist/tests/timestamp.vo.test.d.ts +1 -0
- package/dist/tests/timestamp.vo.test.js +73 -0
- package/dist/tests/timezone.vo.test.d.ts +1 -0
- package/dist/tests/timezone.vo.test.js +29 -0
- package/dist/tests/url-with-slash.vo.test.d.ts +1 -0
- package/dist/tests/url-with-slash.vo.test.js +24 -0
- package/dist/tests/url-without-slash.vo.test.d.ts +1 -0
- package/dist/tests/url-without-slash.vo.test.js +25 -0
- package/dist/tests/visually-unambiguous-characters-generator.service.test.d.ts +1 -0
- package/dist/tests/visually-unambiguous-characters-generator.service.test.js +89 -0
- package/dist/tests/week-iso-id.vo.test.d.ts +1 -0
- package/dist/tests/week-iso-id.vo.test.js +37 -0
- package/dist/tests/week.vo.test.d.ts +1 -0
- package/dist/tests/week.vo.test.js +64 -0
- package/dist/tests/weekday-iso-id.vo.test.d.ts +1 -0
- package/dist/tests/weekday-iso-id.vo.test.js +24 -0
- package/dist/tests/weekday.vo.test.d.ts +1 -0
- package/dist/tests/weekday.vo.test.js +51 -0
- package/dist/tests/weight-grams.vo.test.d.ts +1 -0
- package/dist/tests/weight-grams.vo.test.js +21 -0
- package/dist/tests/weight.vo.test.d.ts +1 -0
- package/dist/tests/weight.vo.test.js +66 -0
- package/dist/tests/year-iso-id.vo.test.d.ts +1 -0
- package/dist/tests/year-iso-id.vo.test.js +23 -0
- package/dist/tests/year.vo.test.d.ts +1 -0
- package/dist/tests/year.vo.test.js +79 -0
- package/dist/tests/z-score.service.test.d.ts +1 -0
- package/dist/tests/z-score.service.test.js +26 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -12
- package/dist/age-years.vo.d.ts +0 -11
- package/dist/age-years.vo.js +0 -11
- package/dist/api-key.vo.d.ts +0 -8
- package/dist/api-key.vo.js +0 -11
- package/dist/basename.vo.d.ts +0 -12
- package/dist/basename.vo.js +0 -27
- package/dist/day-iso-id.vo.d.ts +0 -9
- package/dist/directory-path-absolute.vo.d.ts +0 -12
- package/dist/directory-path-relative.vo.d.ts +0 -12
- package/dist/distance-value.vo.d.ts +0 -7
- package/dist/distance-value.vo.js +0 -9
- package/dist/division-factor.vo.d.ts +0 -7
- package/dist/division-factor.vo.js +0 -8
- package/dist/duration-ms.vo.d.ts +0 -6
- package/dist/duration-ms.vo.js +0 -4
- package/dist/email.vo.d.ts +0 -6
- package/dist/email.vo.js +0 -4
- package/dist/extension.vo.d.ts +0 -9
- package/dist/extension.vo.js +0 -21
- package/dist/feature-flag-value.vo.d.ts +0 -10
- package/dist/file-path-absolute-schema.vo.d.ts +0 -14
- package/dist/file-path-relative-schema.vo.d.ts +0 -14
- package/dist/filename-affix.vo.d.ts +0 -13
- package/dist/filename-from-string.vo.d.ts +0 -10
- package/dist/height-milimiters.vo.d.ts +0 -7
- package/dist/height-milimiters.vo.js +0 -12
- package/dist/hour-value.vo.d.ts +0 -7
- package/dist/hour-value.vo.js +0 -10
- package/dist/iban-schema.vo.d.ts +0 -7
- package/dist/iban-schema.vo.js +0 -12
- package/dist/image.vo.d.ts +0 -13
- package/dist/image.vo.js +0 -20
- package/dist/integer-non-negative.vo.d.ts +0 -7
- package/dist/integer-non-negative.vo.js +0 -12
- package/dist/integer-positive.vo.d.ts +0 -7
- package/dist/integer-positive.vo.js +0 -9
- package/dist/integer.vo.d.ts +0 -6
- package/dist/integer.vo.js +0 -4
- package/dist/language.vo.d.ts +0 -7
- package/dist/mime-value.vo.d.ts +0 -6
- package/dist/mimes.js +0 -18
- package/dist/minute-value.vo.d.ts +0 -7
- package/dist/minute-value.vo.js +0 -10
- package/dist/money-amount.vo.d.ts +0 -7
- package/dist/money-amount.vo.js +0 -9
- package/dist/month-iso-id.vo.d.ts +0 -8
- package/dist/multiplication-factor.vo.d.ts +0 -7
- package/dist/multiplication-factor.vo.js +0 -11
- package/dist/object-key.vo.d.ts +0 -11
- package/dist/object-key.vo.js +0 -24
- package/dist/package-version-schema.vo.d.ts +0 -8
- package/dist/pagination-page.vo.d.ts +0 -6
- package/dist/pagination-page.vo.js +0 -7
- package/dist/pagination-skip.vo.d.ts +0 -7
- package/dist/pagination-skip.vo.js +0 -6
- package/dist/pagination-take.vo.d.ts +0 -7
- package/dist/pagination-take.vo.js +0 -6
- package/dist/quarter-iso-id.vo.d.ts +0 -7
- package/dist/quarter-iso-id.vo.js +0 -11
- package/dist/reordering-item-position-value.vo.d.ts +0 -6
- package/dist/reordering-item-position-value.vo.js +0 -6
- package/dist/revision-value.vo.d.ts +0 -7
- package/dist/revision-value.vo.js +0 -6
- package/dist/rounding-decimal.strategy.js +0 -19
- package/dist/size-bytes.vo.d.ts +0 -6
- package/dist/size-bytes.vo.js +0 -9
- package/dist/time-zone-offset-value.vo.d.ts +0 -8
- package/dist/time-zone-offset-value.vo.js +0 -17
- package/dist/timestamp-value.vo.d.ts +0 -6
- package/dist/timestamp-value.vo.js +0 -9
- package/dist/timezone.vo.d.ts +0 -9
- package/dist/url-with-slash.vo.d.ts +0 -6
- package/dist/url-with-slash.vo.js +0 -8
- package/dist/url-without-slash.vo.d.ts +0 -6
- package/dist/url-without-slash.vo.js +0 -8
- package/dist/week-iso-id.vo.d.ts +0 -8
- package/dist/weekday-iso-id.vo.d.ts +0 -7
- package/dist/weekday-iso-id.vo.js +0 -10
- package/dist/weight-grams.vo.d.ts +0 -7
- package/dist/weight-grams.vo.js +0 -9
- package/dist/year-iso-id.vo.d.ts +0 -7
- package/dist/year-iso-id.vo.js +0 -10
- package/dist/{age.vo.d.ts → src/age.vo.d.ts} +0 -0
- package/dist/{batch.d.ts → src/batch.d.ts} +0 -0
- package/dist/{batch.js → src/batch.js} +0 -0
- package/dist/{date-calculator.service.d.ts → src/date-calculator.service.d.ts} +0 -0
- package/dist/{date-calculator.service.js → src/date-calculator.service.js} +0 -0
- package/dist/{date-formatter.service.d.ts → src/date-formatter.service.d.ts} +0 -0
- package/dist/{date-formatter.service.js → src/date-formatter.service.js} +0 -0
- package/dist/{date-range.vo.d.ts → src/date-range.vo.d.ts} +0 -0
- package/dist/{date-range.vo.js → src/date-range.vo.js} +0 -0
- package/dist/{day.vo.d.ts → src/day.vo.d.ts} +1 -1
- /package/dist/{distance.vo.d.ts → src/distance.vo.d.ts} +0 -0
- /package/dist/{dll.service.d.ts → src/dll.service.d.ts} +0 -0
- /package/dist/{dll.service.js → src/dll.service.js} +0 -0
- /package/dist/{duration.service.d.ts → src/duration.service.d.ts} +0 -0
- /package/dist/{email-mask.service.d.ts → src/email-mask.service.d.ts} +0 -0
- /package/dist/{email-mask.service.js → src/email-mask.service.js} +0 -0
- /package/dist/{etags.vo.d.ts → src/etags.vo.d.ts} +0 -0
- /package/dist/{feature-flag.vo.d.ts → src/feature-flag.vo.d.ts} +0 -0
- /package/dist/{feature-flag.vo.js → src/feature-flag.vo.js} +0 -0
- /package/dist/{file-path.vo.d.ts → src/file-path.vo.d.ts} +0 -0
- /package/dist/{filename.vo.d.ts → src/filename.vo.d.ts} +0 -0
- /package/dist/{height.vo.d.ts → src/height.vo.d.ts} +0 -0
- /package/dist/{hour.vo.d.ts → src/hour.vo.d.ts} +0 -0
- /package/dist/{iban-mask.service.d.ts → src/iban-mask.service.d.ts} +0 -0
- /package/dist/{iban-mask.service.js → src/iban-mask.service.js} +0 -0
- /package/dist/{iban.vo.d.ts → src/iban.vo.d.ts} +0 -0
- /package/dist/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/{index.js → src/index.js} +0 -0
- /package/dist/{linear-regression.service.d.ts → src/linear-regression.service.d.ts} +0 -0
- /package/dist/{linear-regression.service.js → src/linear-regression.service.js} +0 -0
- /package/dist/{mean.service.d.ts → src/mean.service.d.ts} +0 -0
- /package/dist/{mean.service.js → src/mean.service.js} +0 -0
- /package/dist/{mime-registry-entry.vo.d.ts → src/mime-registry-entry.vo.d.ts} +0 -0
- /package/dist/{mime-registry-entry.vo.js → src/mime-registry-entry.vo.js} +0 -0
- /package/dist/{mime-registry.service.d.ts → src/mime-registry.service.d.ts} +0 -0
- /package/dist/{mime-registry.service.js → src/mime-registry.service.js} +0 -0
- /package/dist/{mime.vo.d.ts → src/mime.vo.d.ts} +0 -0
- /package/dist/{mimes.d.ts → src/mimes.d.ts} +0 -0
- /package/dist/{min-max-scaler.service.d.ts → src/min-max-scaler.service.d.ts} +0 -0
- /package/dist/{min-max-scaler.service.js → src/min-max-scaler.service.js} +0 -0
- /package/dist/{minute.vo.d.ts → src/minute.vo.d.ts} +0 -0
- /package/dist/{money.vo.d.ts → src/money.vo.d.ts} +0 -0
- /package/dist/{month.vo.d.ts → src/month.vo.d.ts} +0 -0
- /package/dist/{noop.service.d.ts → src/noop.service.d.ts} +0 -0
- /package/dist/{noop.service.js → src/noop.service.js} +0 -0
- /package/dist/{outlier-detector.service.d.ts → src/outlier-detector.service.d.ts} +0 -0
- /package/dist/{outlier-detector.service.js → src/outlier-detector.service.js} +0 -0
- /package/dist/{package-version.vo.d.ts → src/package-version.vo.d.ts} +0 -0
- /package/dist/{pagination.service.d.ts → src/pagination.service.d.ts} +0 -0
- /package/dist/{percentage.service.d.ts → src/percentage.service.d.ts} +0 -0
- /package/dist/{percentage.service.js → src/percentage.service.js} +0 -0
- /package/dist/{population-standard-deviation.service.d.ts → src/population-standard-deviation.service.d.ts} +0 -0
- /package/dist/{population-standard-deviation.service.js → src/population-standard-deviation.service.js} +0 -0
- /package/dist/{quarter.vo.d.ts → src/quarter.vo.d.ts} +0 -0
- /package/dist/{random.service.d.ts → src/random.service.d.ts} +0 -0
- /package/dist/{random.service.js → src/random.service.js} +0 -0
- /package/dist/{rate-limiter.service.d.ts → src/rate-limiter.service.d.ts} +0 -0
- /package/dist/{rate-limiter.service.js → src/rate-limiter.service.js} +0 -0
- /package/dist/{relative-date.vo.d.ts → src/relative-date.vo.d.ts} +0 -0
- /package/dist/{relative-date.vo.js → src/relative-date.vo.js} +0 -0
- /package/dist/{repeat.d.ts → src/repeat.d.ts} +0 -0
- /package/dist/{repeat.js → src/repeat.js} +0 -0
- /package/dist/{revision.vo.d.ts → src/revision.vo.d.ts} +0 -0
- /package/dist/{rounding-down.strategy.d.ts → src/rounding-down.strategy.d.ts} +0 -0
- /package/dist/{rounding-down.strategy.js → src/rounding-down.strategy.js} +0 -0
- /package/dist/{rounding-to-nearest.strategy.d.ts → src/rounding-to-nearest.strategy.d.ts} +0 -0
- /package/dist/{rounding-to-nearest.strategy.js → src/rounding-to-nearest.strategy.js} +0 -0
- /package/dist/{rounding-up.strategy.d.ts → src/rounding-up.strategy.d.ts} +0 -0
- /package/dist/{rounding-up.strategy.js → src/rounding-up.strategy.js} +0 -0
- /package/dist/{rounding.strategy.d.ts → src/rounding.strategy.d.ts} +0 -0
- /package/dist/{rounding.strategy.js → src/rounding.strategy.js} +0 -0
- /package/dist/{size.vo.d.ts → src/size.vo.d.ts} +0 -0
- /package/dist/{slug.service.d.ts → src/slug.service.d.ts} +0 -0
- /package/dist/{slug.service.js → src/slug.service.js} +0 -0
- /package/dist/{sum.service.d.ts → src/sum.service.d.ts} +0 -0
- /package/dist/{sum.service.js → src/sum.service.js} +0 -0
- /package/dist/{thousands-separator.service.d.ts → src/thousands-separator.service.d.ts} +0 -0
- /package/dist/{thousands-separator.service.js → src/thousands-separator.service.js} +0 -0
- /package/dist/{timestamp.vo.d.ts → src/timestamp.vo.d.ts} +0 -0
- /package/dist/{ts-utils.d.ts → src/ts-utils.d.ts} +0 -0
- /package/dist/{ts-utils.js → src/ts-utils.js} +0 -0
- /package/dist/{visually-unambiguous-characters-generator.service.d.ts → src/visually-unambiguous-characters-generator.service.d.ts} +0 -0
- /package/dist/{visually-unambiguous-characters-generator.service.js → src/visually-unambiguous-characters-generator.service.js} +0 -0
- /package/dist/{week.vo.d.ts → src/week.vo.d.ts} +0 -0
- /package/dist/{weekday.vo.d.ts → src/weekday.vo.d.ts} +0 -0
- /package/dist/{weight.vo.d.ts → src/weight.vo.d.ts} +0 -0
- /package/dist/{year.vo.d.ts → src/year.vo.d.ts} +0 -0
- /package/dist/{z-score.service.d.ts → src/z-score.service.d.ts} +0 -0
- /package/dist/{z-score.service.js → src/z-score.service.js} +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
2
|
+
import { endOfYear, startOfYear } from "date-fns";
|
|
3
|
+
import * as v from "valibot";
|
|
4
|
+
import { Duration } from "../src/duration.service";
|
|
5
|
+
import { Integer } from "../src/integer.vo";
|
|
6
|
+
import { Timestamp } from "../src/timestamp.vo";
|
|
7
|
+
import { Year } from "../src/year.vo";
|
|
8
|
+
import { YearIsoId } from "../src/year-iso-id.vo";
|
|
9
|
+
import * as mocks from "./mocks";
|
|
10
|
+
const twentyTwentyThree = v.parse(YearIsoId, "2023");
|
|
11
|
+
describe("Year", () => {
|
|
12
|
+
test("happy path", () => {
|
|
13
|
+
const year = Year.fromTimestamp(mocks.TIME_ZERO);
|
|
14
|
+
expect(year.getStart()).toEqual(Timestamp.fromNumber(startOfYear(mocks.TIME_ZERO.ms).getTime()));
|
|
15
|
+
expect(year.getEnd()).toEqual(Timestamp.fromNumber(endOfYear(mocks.TIME_ZERO.ms).getTime()));
|
|
16
|
+
expect(year.toIsoId()).toEqual(twentyTwentyThree);
|
|
17
|
+
expect(year.contains(mocks.TIME_ZERO)).toEqual(true);
|
|
18
|
+
});
|
|
19
|
+
test("happy path - near year boundary", () => {
|
|
20
|
+
const timestamp = Timestamp.fromDateLike("2025-12-31T23:59:59Z");
|
|
21
|
+
const year = Year.fromTimestamp(timestamp);
|
|
22
|
+
expect(year.getStart()).toEqual(Timestamp.fromNumber(startOfYear(timestamp.ms).getTime()));
|
|
23
|
+
expect(year.getEnd()).toEqual(Timestamp.fromNumber(endOfYear(timestamp.ms).getTime()));
|
|
24
|
+
expect(year.toIsoId()).toEqual(v.parse(YearIsoId, "2025"));
|
|
25
|
+
});
|
|
26
|
+
test("fromNumber rejects invalid inputs", () => {
|
|
27
|
+
expect(() => Year.fromNumber(-1)).toThrow("year.iso.id.bad.chars");
|
|
28
|
+
expect(() => Year.fromNumber(10000)).toThrow("year.iso.id.bad.chars");
|
|
29
|
+
expect(() => Year.fromNumber(2025.5)).toThrow("year.iso.id.bad.chars");
|
|
30
|
+
expect(() => Year.fromNumber(Number.NaN)).toThrow("year.iso.id.bad.chars");
|
|
31
|
+
});
|
|
32
|
+
test("fromNumber", () => {
|
|
33
|
+
const valid = [1970, 1999, 2024, 2025, 2026];
|
|
34
|
+
for (const value of valid) {
|
|
35
|
+
expect(Year.fromNumber(value).toIsoId()).toEqual(v.parse(YearIsoId, value.toString()));
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
test("fromNow", () => {
|
|
39
|
+
expect(Year.fromNow(mocks.TIME_ZERO).toIsoId()).toEqual(twentyTwentyThree);
|
|
40
|
+
});
|
|
41
|
+
test("fromTimestampValue", () => {
|
|
42
|
+
expect(Year.fromTimestampValue(mocks.TIME_ZERO.ms).toIsoId()).toEqual(twentyTwentyThree);
|
|
43
|
+
});
|
|
44
|
+
test("fromIsoId", () => {
|
|
45
|
+
expect(Year.fromIsoId(twentyTwentyThree).toIsoId()).toEqual(twentyTwentyThree);
|
|
46
|
+
});
|
|
47
|
+
test("next", () => {
|
|
48
|
+
expect(Year.fromTimestamp(mocks.TIME_ZERO).next().toIsoId()).toEqual(v.parse(YearIsoId, "2024"));
|
|
49
|
+
});
|
|
50
|
+
test("previous", () => {
|
|
51
|
+
expect(Year.fromTimestamp(mocks.TIME_ZERO).previous().toIsoId()).toEqual(v.parse(YearIsoId, "2022"));
|
|
52
|
+
});
|
|
53
|
+
test("shift", () => {
|
|
54
|
+
expect(Year.fromTimestamp(mocks.TIME_ZERO).shift(v.parse(Integer, 2)).toIsoId()).toEqual(v.parse(YearIsoId, "2025"));
|
|
55
|
+
expect(Year.fromTimestamp(mocks.TIME_ZERO).shift(v.parse(Integer, -2)).toIsoId()).toEqual(v.parse(YearIsoId, "2021"));
|
|
56
|
+
});
|
|
57
|
+
test("round-trips", () => {
|
|
58
|
+
const ids = ["1970", "1999", "2024", "2025", "2026"].map((value) => v.parse(YearIsoId, value));
|
|
59
|
+
for (const id of ids) {
|
|
60
|
+
expect(Year.fromIsoId(id).toIsoId()).toEqual(id);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
test("contains", () => {
|
|
64
|
+
const year = Year.fromTimestamp(mocks.TIME_ZERO);
|
|
65
|
+
expect(year.contains(year.getStart().subtract(Duration.Ms(1)))).toEqual(false);
|
|
66
|
+
expect(year.contains(year.getEnd().add(Duration.Ms(1)))).toEqual(false);
|
|
67
|
+
});
|
|
68
|
+
test("leap year check for 2000", () => expect(Year.fromNumber(2000).isLeapYear()).toEqual(true));
|
|
69
|
+
test("leap year check for 2010", () => expect(Year.fromNumber(2010).isLeapYear()).toEqual(false));
|
|
70
|
+
test("leap year check for 2024", () => expect(Year.fromNumber(2024).isLeapYear()).toEqual(true));
|
|
71
|
+
test("leap year check for 2400", () => expect(Year.fromNumber(2400).isLeapYear()).toEqual(true));
|
|
72
|
+
test("leap year check for 2100", () => expect(Year.fromNumber(2100).isLeapYear()).toEqual(false));
|
|
73
|
+
test("toString", () => {
|
|
74
|
+
expect(Year.fromIsoId(twentyTwentyThree).toString()).toEqual("2023");
|
|
75
|
+
});
|
|
76
|
+
test("toJSON", () => {
|
|
77
|
+
expect(Year.fromIsoId(twentyTwentyThree).toJSON()).toEqual({ start: 1672531200000, end: 1704067199999 });
|
|
78
|
+
});
|
|
79
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
2
|
+
import { RoundingToNearestStrategy } from "../src/rounding-to-nearest.strategy";
|
|
3
|
+
import { ZScore } from "../src/z-score.service";
|
|
4
|
+
describe("Z-score", () => {
|
|
5
|
+
test("throws for empty values array", () => {
|
|
6
|
+
expect(() => new ZScore([])).toThrow("z.score.not.enough.values");
|
|
7
|
+
});
|
|
8
|
+
test("works for all zeros", () => {
|
|
9
|
+
expect(new ZScore([0, 0, 0]).calculate(1)).toEqual(Number.POSITIVE_INFINITY);
|
|
10
|
+
});
|
|
11
|
+
test("throws for one value", () => {
|
|
12
|
+
expect(() => new ZScore([1])).toThrow("z.score.not.enough.values");
|
|
13
|
+
});
|
|
14
|
+
test("works for two values", () => {
|
|
15
|
+
expect(new ZScore([1, 2]).calculate(1)).toEqual(-1);
|
|
16
|
+
});
|
|
17
|
+
test("works for two values", () => {
|
|
18
|
+
expect(new ZScore([1, 2]).calculate(2)).toEqual(1);
|
|
19
|
+
});
|
|
20
|
+
test("works for a set of values", () => {
|
|
21
|
+
expect(new ZScore([1, 1, 1, 2, 2, 3, 3, 3, 10]).calculate(2)).toEqual(-0.34);
|
|
22
|
+
});
|
|
23
|
+
test("non-default rounding", () => {
|
|
24
|
+
expect(new ZScore([1, 1, 1, 2, 2, 3, 3, 3, 10], new RoundingToNearestStrategy()).calculate(1)).toEqual(-1);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/age-years.vo.ts","../src/age.vo.ts","../src/api-key.vo.ts","../src/basename.vo.ts","../src/batch.ts","../src/date-calculator.service.ts","../src/date-formatter.service.ts","../src/date-range.vo.ts","../src/day-iso-id.vo.ts","../src/day.vo.ts","../src/directory-path-absolute.vo.ts","../src/directory-path-relative.vo.ts","../src/distance-value.vo.ts","../src/distance.vo.ts","../src/division-factor.vo.ts","../src/dll.service.ts","../src/duration-ms.vo.ts","../src/duration.service.ts","../src/email-mask.service.ts","../src/email.vo.ts","../src/etags.vo.ts","../src/extension.vo.ts","../src/feature-flag-value.vo.ts","../src/feature-flag.vo.ts","../src/file-path-absolute-schema.vo.ts","../src/file-path-relative-schema.vo.ts","../src/file-path.vo.ts","../src/filename-affix.vo.ts","../src/filename-from-string.vo.ts","../src/filename.vo.ts","../src/height-milimiters.vo.ts","../src/height.vo.ts","../src/hour-value.vo.ts","../src/hour.vo.ts","../src/iban-mask.service.ts","../src/iban-schema.vo.ts","../src/iban.vo.ts","../src/image.vo.ts","../src/index.ts","../src/integer-non-negative.vo.ts","../src/integer-positive.vo.ts","../src/integer.vo.ts","../src/language.vo.ts","../src/linear-regression.service.ts","../src/mean.service.ts","../src/mime-registry-entry.vo.ts","../src/mime-registry.service.ts","../src/mime-value.vo.ts","../src/mime.vo.ts","../src/mimes.ts","../src/min-max-scaler.service.ts","../src/minute-value.vo.ts","../src/minute.vo.ts","../src/money-amount.vo.ts","../src/money.vo.ts","../src/month-iso-id.vo.ts","../src/month.vo.ts","../src/multiplication-factor.vo.ts","../src/noop.service.ts","../src/object-key.vo.ts","../src/outlier-detector.service.ts","../src/package-version-schema.vo.ts","../src/package-version.vo.ts","../src/pagination-page.vo.ts","../src/pagination-skip.vo.ts","../src/pagination-take.vo.ts","../src/pagination.service.ts","../src/percentage.service.ts","../src/population-standard-deviation.service.ts","../src/quarter-iso-id.vo.ts","../src/quarter.vo.ts","../src/random.service.ts","../src/rate-limiter.service.ts","../src/relative-date.vo.ts","../src/reordering-item-position-value.vo.ts","../src/reordering.service.ts","../src/repeat.ts","../src/revision-value.vo.ts","../src/revision.vo.ts","../src/rounding-decimal.strategy.ts","../src/rounding-down.strategy.ts","../src/rounding-to-nearest.strategy.ts","../src/rounding-up.strategy.ts","../src/rounding.strategy.ts","../src/size-bytes.vo.ts","../src/size.vo.ts","../src/slug.service.ts","../src/sum.service.ts","../src/thousands-separator.service.ts","../src/time-zone-offset-value.vo.ts","../src/timestamp-value.vo.ts","../src/timestamp.vo.ts","../src/timezone.vo.ts","../src/ts-utils.ts","../src/url-with-slash.vo.ts","../src/url-without-slash.vo.ts","../src/visually-unambiguous-characters-generator.service.ts","../src/week-iso-id.vo.ts","../src/week.vo.ts","../src/weekday-iso-id.vo.ts","../src/weekday.vo.ts","../src/weight-grams.vo.ts","../src/weight.vo.ts","../src/year-iso-id.vo.ts","../src/year.vo.ts","../src/z-score.service.ts"],"version":"5.9.3"}
|
|
1
|
+
{"root":["../src/age-years.vo.ts","../src/age.vo.ts","../src/api-key.vo.ts","../src/basename.vo.ts","../src/batch.ts","../src/date-calculator.service.ts","../src/date-formatter.service.ts","../src/date-range.vo.ts","../src/day-iso-id.vo.ts","../src/day.vo.ts","../src/directory-path-absolute.vo.ts","../src/directory-path-relative.vo.ts","../src/distance-value.vo.ts","../src/distance.vo.ts","../src/division-factor.vo.ts","../src/dll.service.ts","../src/duration-ms.vo.ts","../src/duration.service.ts","../src/email-mask.service.ts","../src/email.vo.ts","../src/etags.vo.ts","../src/extension.vo.ts","../src/feature-flag-value.vo.ts","../src/feature-flag.vo.ts","../src/file-path-absolute-schema.vo.ts","../src/file-path-relative-schema.vo.ts","../src/file-path.vo.ts","../src/filename-affix.vo.ts","../src/filename-from-string.vo.ts","../src/filename.vo.ts","../src/height-milimiters.vo.ts","../src/height.vo.ts","../src/hour-value.vo.ts","../src/hour.vo.ts","../src/iban-mask.service.ts","../src/iban-schema.vo.ts","../src/iban.vo.ts","../src/image.vo.ts","../src/index.ts","../src/integer-non-negative.vo.ts","../src/integer-positive.vo.ts","../src/integer.vo.ts","../src/language.vo.ts","../src/linear-regression.service.ts","../src/mean.service.ts","../src/mime-registry-entry.vo.ts","../src/mime-registry.service.ts","../src/mime-value.vo.ts","../src/mime.vo.ts","../src/mimes.ts","../src/min-max-scaler.service.ts","../src/minute-value.vo.ts","../src/minute.vo.ts","../src/money-amount.vo.ts","../src/money.vo.ts","../src/month-iso-id.vo.ts","../src/month.vo.ts","../src/multiplication-factor.vo.ts","../src/noop.service.ts","../src/object-key.vo.ts","../src/outlier-detector.service.ts","../src/package-version-schema.vo.ts","../src/package-version.vo.ts","../src/pagination-page.vo.ts","../src/pagination-skip.vo.ts","../src/pagination-take.vo.ts","../src/pagination.service.ts","../src/percentage.service.ts","../src/population-standard-deviation.service.ts","../src/quarter-iso-id.vo.ts","../src/quarter.vo.ts","../src/random.service.ts","../src/rate-limiter.service.ts","../src/relative-date.vo.ts","../src/reordering-item-position-value.vo.ts","../src/reordering.service.ts","../src/repeat.ts","../src/revision-value.vo.ts","../src/revision.vo.ts","../src/rounding-decimal.strategy.ts","../src/rounding-down.strategy.ts","../src/rounding-to-nearest.strategy.ts","../src/rounding-up.strategy.ts","../src/rounding.strategy.ts","../src/size-bytes.vo.ts","../src/size.vo.ts","../src/slug.service.ts","../src/sum.service.ts","../src/thousands-separator.service.ts","../src/time-zone-offset-value.vo.ts","../src/timestamp-value.vo.ts","../src/timestamp.vo.ts","../src/timezone.vo.ts","../src/ts-utils.ts","../src/url-with-slash.vo.ts","../src/url-without-slash.vo.ts","../src/visually-unambiguous-characters-generator.service.ts","../src/week-iso-id.vo.ts","../src/week.vo.ts","../src/weekday-iso-id.vo.ts","../src/weekday.vo.ts","../src/weight-grams.vo.ts","../src/weight.vo.ts","../src/year-iso-id.vo.ts","../src/year.vo.ts","../src/z-score.service.ts","../tests/age-years.vo.test.ts","../tests/age.vo.test.ts","../tests/api-key.vo.test.ts","../tests/basename.vo.test.ts","../tests/batch.test.ts","../tests/date-calculator.service.test.ts","../tests/date-formatter.service.test.ts","../tests/date-range.vo.test.ts","../tests/day-iso-id.vo.test.ts","../tests/day.vo.test.ts","../tests/directory-path-absolute.vo.test.ts","../tests/directory-path-relative.vo.test.ts","../tests/distance-value.vo.test.ts","../tests/distance.vo.test.ts","../tests/division-factor.vo.test.ts","../tests/dll.service.test.ts","../tests/duration-ms.vo.test.ts","../tests/duration.service.test.ts","../tests/email-mask.service.test.ts","../tests/email.vo.test.ts","../tests/etags.vo.test.ts","../tests/extension.vo.test.ts","../tests/feature-flag-value.vo.test.ts","../tests/feature-flag.vo.test.ts","../tests/file-path-absolute-schema.vo.test.ts","../tests/file-path-relative-schema.vo.test.ts","../tests/file-path.vo.test.ts","../tests/filename-affix.vo.test.ts","../tests/filename-from-string.vo.test.ts","../tests/filename.vo.test.ts","../tests/height-milimiters.vo.test.ts","../tests/height.vo.test.ts","../tests/hour-value.vo.test.ts","../tests/hour.vo.test.ts","../tests/iban-mask.service.test.ts","../tests/iban-schema.vo.test.ts","../tests/iban.vo.test.ts","../tests/image.vo.test.ts","../tests/integer-non-negative.vo.test.ts","../tests/integer-positive.vo.test.ts","../tests/integer.vo.test.ts","../tests/language.vo.test.ts","../tests/linear-regression.service.test.ts","../tests/mean.service.test.ts","../tests/mime-registry-entry.vo.test.ts","../tests/mime-registry.service.test.ts","../tests/mime-value.vo.test.ts","../tests/mime.vo.test.ts","../tests/mimes.test.ts","../tests/min-max-scaler.service.test.ts","../tests/minute-value.vo.test.ts","../tests/minute.vo.test.ts","../tests/mocks.ts","../tests/money-amount.vo.test.ts","../tests/money.vo.test.ts","../tests/month-iso-id.vo.test.ts","../tests/month.vo.test.ts","../tests/multiplication-factor.vo.test.ts","../tests/noop.test.ts","../tests/object-key.vo.test.ts","../tests/outlier-detector.service.test.ts","../tests/package-version-schema.vo.test.ts","../tests/package-version.vo.test.ts","../tests/pagination-page.vo.test.ts","../tests/pagination-skip.vo.test.ts","../tests/pagination-take.vo.test.ts","../tests/pagination.service.test.ts","../tests/percentage.service.test.ts","../tests/population-standard-deviation.service.test.ts","../tests/quarter-iso-id.vo.test.ts","../tests/quarter.vo.test.ts","../tests/random.service.test.ts","../tests/rate-limiter.service.test.ts","../tests/relative-date.vo.test.ts","../tests/reordering-item-position-value.vo.test.ts","../tests/reordering.service.test.ts","../tests/repeat.test.ts","../tests/revision-value.vo.test.ts","../tests/revision.vo.test.ts","../tests/rounding-decimal.strategy.test.ts","../tests/rounding-down.strategy.test.ts","../tests/rounding-to-nearest.strategy.test.ts","../tests/rounding-up.strategy.test.ts","../tests/size-bytes.vo.test.ts","../tests/size.vo.test.ts","../tests/slug.service.test.ts","../tests/sum.service.test.ts","../tests/thousands-separator.service.test.ts","../tests/time-zone-offset-value.test.ts","../tests/timestamp-value.vo.test.ts","../tests/timestamp.vo.test.ts","../tests/timezone.vo.test.ts","../tests/url-with-slash.vo.test.ts","../tests/url-without-slash.vo.test.ts","../tests/visually-unambiguous-characters-generator.service.test.ts","../tests/week-iso-id.vo.test.ts","../tests/week.vo.test.ts","../tests/weekday-iso-id.vo.test.ts","../tests/weekday.vo.test.ts","../tests/weight-grams.vo.test.ts","../tests/weight.vo.test.ts","../tests/year-iso-id.vo.test.ts","../tests/year.vo.test.ts","../tests/z-score.service.test.ts"],"version":"5.9.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bgord/tools",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bartosz Gordon",
|
|
@@ -20,25 +20,22 @@
|
|
|
20
20
|
"preinstall": "bunx only-allow bun"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@biomejs/biome": "2.4.
|
|
24
|
-
"@commitlint/cli": "20.
|
|
25
|
-
"@commitlint/config-conventional": "20.
|
|
23
|
+
"@biomejs/biome": "2.4.7",
|
|
24
|
+
"@commitlint/cli": "20.5.0",
|
|
25
|
+
"@commitlint/config-conventional": "20.5.0",
|
|
26
26
|
"@stryker-mutator/core": "9.6.0",
|
|
27
27
|
"@types/bun": "1.3.10",
|
|
28
28
|
"cspell": "9.7.0",
|
|
29
|
-
"knip": "5.
|
|
30
|
-
"lefthook": "2.1.
|
|
29
|
+
"knip": "5.87.0",
|
|
30
|
+
"lefthook": "2.1.4",
|
|
31
31
|
"lockfile-lint": "5.0.0",
|
|
32
32
|
"only-allow": "1.2.2",
|
|
33
33
|
"shellcheck": "4.1.0",
|
|
34
|
-
"typescript": "5.9.3"
|
|
35
|
-
"zod": "4.3.6"
|
|
34
|
+
"typescript": "5.9.3"
|
|
36
35
|
},
|
|
37
36
|
"dependencies": {
|
|
38
|
-
"date-fns": "4.1.0"
|
|
39
|
-
|
|
40
|
-
"peerDependencies": {
|
|
41
|
-
"zod": "4.3.6"
|
|
37
|
+
"date-fns": "4.1.0",
|
|
38
|
+
"valibot": "1.2.0"
|
|
42
39
|
},
|
|
43
40
|
"sideEffects": false
|
|
44
41
|
}
|
package/dist/age-years.vo.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export declare const AgeYearsError: {
|
|
3
|
-
Type: string;
|
|
4
|
-
Invalid: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const AgeYearsConstraints: {
|
|
7
|
-
min: number;
|
|
8
|
-
max: number;
|
|
9
|
-
};
|
|
10
|
-
export declare const AgeYears: z.core.$ZodBranded<z.ZodNumber, "AgeYears", "out">;
|
|
11
|
-
export type AgeYearsType = z.infer<typeof AgeYears>;
|
package/dist/age-years.vo.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export const AgeYearsError = { Type: "age.years.type", Invalid: "age.years.invalid" };
|
|
3
|
-
export const AgeYearsConstraints = { min: 0, max: 130 };
|
|
4
|
-
// Stryker disable all
|
|
5
|
-
export const AgeYears = z
|
|
6
|
-
// Stryker restore all
|
|
7
|
-
.number(AgeYearsError.Type)
|
|
8
|
-
.int(AgeYearsError.Type)
|
|
9
|
-
.min(0, AgeYearsError.Invalid)
|
|
10
|
-
.max(130, AgeYearsError.Invalid)
|
|
11
|
-
.brand("AgeYears");
|
package/dist/api-key.vo.d.ts
DELETED
package/dist/api-key.vo.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export const ApiKeyError = { Type: "api.key.type", Length: "api.key.length", BadChars: "api.key.bad.chars" };
|
|
3
|
-
// 64 letters and digits allowed
|
|
4
|
-
const API_KEY_CHARS = /^[a-zA-Z0-9]{64}$/;
|
|
5
|
-
// Stryker disable all
|
|
6
|
-
export const ApiKey = z
|
|
7
|
-
// Stryker disable all
|
|
8
|
-
.string(ApiKeyError.Type)
|
|
9
|
-
.length(64, ApiKeyError.Length)
|
|
10
|
-
.regex(API_KEY_CHARS, ApiKeyError.BadChars)
|
|
11
|
-
.brand("ApiKey");
|
package/dist/basename.vo.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export declare const BasenameError: {
|
|
3
|
-
Type: string;
|
|
4
|
-
Empty: string;
|
|
5
|
-
TooLong: string;
|
|
6
|
-
DotSegments: string;
|
|
7
|
-
Dotfiles: string;
|
|
8
|
-
TrailingDot: string;
|
|
9
|
-
BadChars: string;
|
|
10
|
-
};
|
|
11
|
-
export declare const Basename: z.core.$ZodBranded<z.ZodString, "Basename", "out">;
|
|
12
|
-
export type BasenameType = z.infer<typeof Basename>;
|
package/dist/basename.vo.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export const BasenameError = {
|
|
3
|
-
Type: "basename.type",
|
|
4
|
-
Empty: "basename.empty",
|
|
5
|
-
TooLong: "basename.too.long",
|
|
6
|
-
DotSegments: "basename.dot.segments",
|
|
7
|
-
Dotfiles: "basename.dotfiles",
|
|
8
|
-
TrailingDot: "basename.trailing.dot",
|
|
9
|
-
BadChars: "basename.bad.chars",
|
|
10
|
-
};
|
|
11
|
-
// Letters, digits, dots, underscores, and hyphens allowed
|
|
12
|
-
const BASENAME_CHARS = /^[a-zA-Z0-9._-]+$/;
|
|
13
|
-
const DOT_SEGMENTS = [".", ".."];
|
|
14
|
-
// Stryker disable all
|
|
15
|
-
export const Basename = z
|
|
16
|
-
// Stryker restore all
|
|
17
|
-
.string(BasenameError.Type)
|
|
18
|
-
.min(1, BasenameError.Empty)
|
|
19
|
-
.max(128, BasenameError.TooLong)
|
|
20
|
-
// Reject "." and ".." as a filename to avoid directory traversal
|
|
21
|
-
.refine((value) => !DOT_SEGMENTS.includes(value), BasenameError.DotSegments)
|
|
22
|
-
// Reject dotfiles like ".env"
|
|
23
|
-
.refine((value) => !value.startsWith("."), BasenameError.Dotfiles)
|
|
24
|
-
// Reject trailing dot like "picture." to avoid extension collision
|
|
25
|
-
.refine((value) => !value.endsWith("."), BasenameError.TrailingDot)
|
|
26
|
-
.regex(BASENAME_CHARS, BasenameError.BadChars)
|
|
27
|
-
.brand("Basename");
|
package/dist/day-iso-id.vo.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export declare const DayIsoIdError: {
|
|
3
|
-
Type: string;
|
|
4
|
-
BadChars: string;
|
|
5
|
-
InvalidDate: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const DAY_ISO_ID_CHARS: RegExp;
|
|
8
|
-
export declare const DayIsoId: z.core.$ZodBranded<z.ZodString, "DayIsoId", "out">;
|
|
9
|
-
export type DayIsoIdType = z.infer<typeof DayIsoId>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export declare const DirectoryPathAbsoluteError: {
|
|
3
|
-
BadSegments: string;
|
|
4
|
-
Empty: string;
|
|
5
|
-
LeadingSlash: string;
|
|
6
|
-
TooLong: string;
|
|
7
|
-
TrailingSlash: string;
|
|
8
|
-
Type: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const DIRECTORY_PATH_ABSOLUTE_CHARS: RegExp;
|
|
11
|
-
export declare const DirectoryPathAbsoluteSchema: z.core.$ZodBranded<z.ZodString, "DirectoryPathAbsoluteSchema", "out">;
|
|
12
|
-
export type DirectoryPathAbsoluteType = z.infer<typeof DirectoryPathAbsoluteSchema>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export declare const DirectoryPathRelativeError: {
|
|
3
|
-
BadSegments: string;
|
|
4
|
-
Empty: string;
|
|
5
|
-
LeadingSlash: string;
|
|
6
|
-
TooLong: string;
|
|
7
|
-
TrailingSlash: string;
|
|
8
|
-
Type: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const DIRECTORY_PATH_RELATIVE_CHARS: RegExp;
|
|
11
|
-
export declare const DirectoryPathRelativeSchema: z.core.$ZodBranded<z.ZodString, "DirectoryPathRelativeSchema", "out">;
|
|
12
|
-
export type DirectoryPathRelativeType = z.infer<typeof DirectoryPathRelativeSchema>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export declare const DistanceValueError: {
|
|
3
|
-
Type: string;
|
|
4
|
-
Invalid: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const DistanceValue: z.core.$ZodBranded<z.ZodNumber, "DistanceValue", "out">;
|
|
7
|
-
export type DistanceValueType = z.infer<typeof DistanceValue>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export const DistanceValueError = { Type: "distance.value.type", Invalid: "distance.value.invalid" };
|
|
3
|
-
// Stryker disable all
|
|
4
|
-
export const DistanceValue = z
|
|
5
|
-
// Stryker restore all
|
|
6
|
-
.number(DistanceValueError.Type)
|
|
7
|
-
.int(DistanceValueError.Type)
|
|
8
|
-
.min(0, DistanceValueError.Invalid)
|
|
9
|
-
.brand("DistanceValue");
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export declare const DivisionFactorError: {
|
|
3
|
-
Type: string;
|
|
4
|
-
Invalid: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const DivisionFactor: z.core.$ZodBranded<z.ZodNumber, "DivisionFactor", "out">;
|
|
7
|
-
export type DivisionFactorType = z.infer<typeof DivisionFactor>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export const DivisionFactorError = { Type: "division.factor.type", Invalid: "division.factor.invalid" };
|
|
3
|
-
// Stryker disable all
|
|
4
|
-
export const DivisionFactor = z
|
|
5
|
-
// Stryker restore all
|
|
6
|
-
.number(DivisionFactorError.Type)
|
|
7
|
-
.gt(0, DivisionFactorError.Invalid)
|
|
8
|
-
.brand("DivisionFactor");
|
package/dist/duration-ms.vo.d.ts
DELETED
package/dist/duration-ms.vo.js
DELETED
package/dist/email.vo.d.ts
DELETED
package/dist/email.vo.js
DELETED
package/dist/extension.vo.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export declare const ExtensionError: {
|
|
3
|
-
Type: string;
|
|
4
|
-
Empty: string;
|
|
5
|
-
TooLong: string;
|
|
6
|
-
BadChars: string;
|
|
7
|
-
};
|
|
8
|
-
export declare const Extension: z.core.$ZodBranded<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, "Extension", "out">;
|
|
9
|
-
export type ExtensionType = z.infer<typeof Extension>;
|
package/dist/extension.vo.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export const ExtensionError = {
|
|
3
|
-
Type: "extension.type",
|
|
4
|
-
Empty: "extension.empty",
|
|
5
|
-
TooLong: "extension.too.long",
|
|
6
|
-
BadChars: "extension.bad.chars",
|
|
7
|
-
};
|
|
8
|
-
// Lowercase letters and digits allowed
|
|
9
|
-
const EXTENSION_WHITELIST = /^[a-z0-9]+$/;
|
|
10
|
-
const LEADING_DOT_FILE = /^\./;
|
|
11
|
-
// Stryker disable all
|
|
12
|
-
export const Extension = z
|
|
13
|
-
// Stryker restore all
|
|
14
|
-
.string(ExtensionError.Type)
|
|
15
|
-
.toLowerCase()
|
|
16
|
-
.min(2, ExtensionError.Empty)
|
|
17
|
-
.max(16, ExtensionError.TooLong)
|
|
18
|
-
// Transform ".png" -> "png"
|
|
19
|
-
.transform((value) => value.replace(LEADING_DOT_FILE, ""))
|
|
20
|
-
.refine((value) => EXTENSION_WHITELIST.test(value), ExtensionError.BadChars)
|
|
21
|
-
.brand("Extension");
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export declare const FeatureFlagValueError: {
|
|
3
|
-
Invalid: string;
|
|
4
|
-
};
|
|
5
|
-
export declare enum FeatureFlagEnum {
|
|
6
|
-
yes = "yes",
|
|
7
|
-
no = "no"
|
|
8
|
-
}
|
|
9
|
-
export declare const FeatureFlagValue: z.ZodEnum<typeof FeatureFlagEnum>;
|
|
10
|
-
export type FeatureFlagValueType = z.infer<typeof FeatureFlagValue>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import { Filename } from "./filename.vo";
|
|
3
|
-
export declare const FilePathAbsoluteSchemaError: {
|
|
4
|
-
Type: string;
|
|
5
|
-
LeadingSlash: string;
|
|
6
|
-
TrailingSlash: string;
|
|
7
|
-
BackslashForbidden: string;
|
|
8
|
-
Empty: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const FilePathAbsoluteSchema: z.core.$ZodBranded<z.ZodPipe<z.ZodString, z.ZodTransform<{
|
|
11
|
-
directory: string & z.core.$brand<"DirectoryPathAbsoluteSchema">;
|
|
12
|
-
filename: Filename;
|
|
13
|
-
}, string>>, "FilePathAbsoluteSchema", "out">;
|
|
14
|
-
export type FilePathAbsoluteType = z.infer<typeof FilePathAbsoluteSchema>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import { Filename } from "./filename.vo";
|
|
3
|
-
export declare const FilePathRelativeSchemaError: {
|
|
4
|
-
Type: string;
|
|
5
|
-
LeadingSlash: string;
|
|
6
|
-
BackslashForbidden: string;
|
|
7
|
-
RequiresDirectory: string;
|
|
8
|
-
Empty: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const FilePathRelativeSchema: z.core.$ZodBranded<z.ZodPipe<z.ZodString, z.ZodTransform<{
|
|
11
|
-
directory: string & z.core.$brand<"DirectoryPathRelativeSchema">;
|
|
12
|
-
filename: Filename;
|
|
13
|
-
}, string>>, "FilePathRelativeSchema", "out">;
|
|
14
|
-
export type FilePathRelativeType = z.infer<typeof FilePathRelativeSchema>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export declare enum FilenameAffixStrategy {
|
|
3
|
-
prefix = "prefix",
|
|
4
|
-
suffix = "suffix"
|
|
5
|
-
}
|
|
6
|
-
export declare const FilenameAffixError: {
|
|
7
|
-
Type: string;
|
|
8
|
-
Empty: string;
|
|
9
|
-
TooLong: string;
|
|
10
|
-
BadChars: string;
|
|
11
|
-
};
|
|
12
|
-
export declare const FilenameAffix: z.core.$ZodBranded<z.ZodString, "FilenameAffix", "out">;
|
|
13
|
-
export type FilenameAffixType = z.infer<typeof FilenameAffix>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export declare const FilenameFromStringError: {
|
|
3
|
-
Type: string;
|
|
4
|
-
Invalid: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const FilenameFromString: z.ZodPipe<z.ZodString, z.ZodTransform<{
|
|
7
|
-
basename: string & z.core.$brand<"Basename">;
|
|
8
|
-
extension: string & z.core.$brand<"Extension">;
|
|
9
|
-
}, string>>;
|
|
10
|
-
export type FilenameFromStringType = z.infer<typeof FilenameFromString>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export declare const HeightMillimetersError: {
|
|
3
|
-
Type: string;
|
|
4
|
-
Invalid: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const HeightMillimeters: z.core.$ZodBranded<z.ZodNumber, "HeightMillimeters", "out">;
|
|
7
|
-
export type HeightMillimetersType = z.infer<typeof HeightMillimeters>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export const HeightMillimetersError = {
|
|
3
|
-
Type: "height.millimeters.type",
|
|
4
|
-
Invalid: "height.millimeters.invalid",
|
|
5
|
-
};
|
|
6
|
-
// Stryker disable all
|
|
7
|
-
export const HeightMillimeters = z
|
|
8
|
-
// Stryker restore all
|
|
9
|
-
.number(HeightMillimetersError.Type)
|
|
10
|
-
.int(HeightMillimetersError.Type)
|
|
11
|
-
.min(0, HeightMillimetersError.Invalid)
|
|
12
|
-
.brand("HeightMillimeters");
|
package/dist/hour-value.vo.d.ts
DELETED
package/dist/hour-value.vo.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export const HourValueError = { Type: "hour.value.type", Invalid: "hour.value.invalid" };
|
|
3
|
-
// Stryker disable all
|
|
4
|
-
export const HourValue = z
|
|
5
|
-
// Stryker restore all
|
|
6
|
-
.number(HourValueError.Type)
|
|
7
|
-
.int(HourValueError.Type)
|
|
8
|
-
.gte(0, HourValueError.Invalid)
|
|
9
|
-
.lte(23, HourValueError.Invalid)
|
|
10
|
-
.brand("HourSchema");
|
package/dist/iban-schema.vo.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export declare const IbanSchemaError: {
|
|
3
|
-
Type: string;
|
|
4
|
-
Invalid: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const IbanSchema: z.core.$ZodBranded<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, "IbanSchema", "out">;
|
|
7
|
-
export type IbanSchemaType = z.infer<typeof IbanSchema>;
|
package/dist/iban-schema.vo.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export const IbanSchemaError = { Type: "iban.schema.type", Invalid: "iban.schema.invalid" };
|
|
3
|
-
// Two letters for country code, two digits, 11–30 uppercase letters or digits
|
|
4
|
-
const IBAN_CHARS_WHITELIST = /^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/;
|
|
5
|
-
// Stryker disable all
|
|
6
|
-
export const IbanSchema = z
|
|
7
|
-
// Stryker restore all
|
|
8
|
-
.string(IbanSchemaError.Type)
|
|
9
|
-
.toUpperCase()
|
|
10
|
-
.transform((value) => value.replaceAll(" ", ""))
|
|
11
|
-
.refine((value) => IBAN_CHARS_WHITELIST.test(value), IbanSchemaError.Invalid)
|
|
12
|
-
.brand("IbanSchema");
|
package/dist/image.vo.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export declare const ImageWidthError: {
|
|
3
|
-
Type: string;
|
|
4
|
-
Length: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const ImageHeightError: {
|
|
7
|
-
Type: string;
|
|
8
|
-
Length: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const ImageWidth: z.core.$ZodBranded<z.ZodNumber, "ImageWidth", "out">;
|
|
11
|
-
export type ImageWidthType = z.infer<typeof ImageWidth>;
|
|
12
|
-
export declare const ImageHeight: z.core.$ZodBranded<z.ZodNumber, "ImageHeight", "out">;
|
|
13
|
-
export type ImageHeightType = z.infer<typeof ImageHeight>;
|
package/dist/image.vo.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export const ImageWidthError = { Type: "image.width.type", Length: "image.width.length" };
|
|
3
|
-
export const ImageHeightError = { Type: "image.height.type", Length: "image.height.length" };
|
|
4
|
-
const IMAGE_DIMENSIONS_CONSTRAINTS = { min: 1, max: 10_000 };
|
|
5
|
-
// Stryker disable all
|
|
6
|
-
export const ImageWidth = z
|
|
7
|
-
// Stryker restore all
|
|
8
|
-
.number(ImageWidthError.Type)
|
|
9
|
-
.int(ImageWidthError.Type)
|
|
10
|
-
.min(IMAGE_DIMENSIONS_CONSTRAINTS.min, ImageWidthError.Length)
|
|
11
|
-
.max(IMAGE_DIMENSIONS_CONSTRAINTS.max, ImageWidthError.Length)
|
|
12
|
-
.brand("ImageWidth");
|
|
13
|
-
// Stryker disable all
|
|
14
|
-
export const ImageHeight = z
|
|
15
|
-
// Stryker restore all
|
|
16
|
-
.number(ImageHeightError.Type)
|
|
17
|
-
.int(ImageHeightError.Type)
|
|
18
|
-
.min(IMAGE_DIMENSIONS_CONSTRAINTS.min, ImageHeightError.Length)
|
|
19
|
-
.max(IMAGE_DIMENSIONS_CONSTRAINTS.max, ImageHeightError.Length)
|
|
20
|
-
.brand("ImageHeight");
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export declare const IntegerNonNegativeError: {
|
|
3
|
-
Type: string;
|
|
4
|
-
Invalid: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const IntegerNonNegative: z.core.$ZodBranded<z.ZodNumber, "IntegerNonNegative", "out">;
|
|
7
|
-
export type IntegerNonNegativeType = z.infer<typeof IntegerNonNegative>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export const IntegerNonNegativeError = {
|
|
3
|
-
Type: "integer.non.negative.type",
|
|
4
|
-
Invalid: "integer.non.negative.invalid",
|
|
5
|
-
};
|
|
6
|
-
// Stryker disable all
|
|
7
|
-
export const IntegerNonNegative = z
|
|
8
|
-
// Stryker restore all
|
|
9
|
-
.number(IntegerNonNegativeError.Type)
|
|
10
|
-
.int(IntegerNonNegativeError.Type)
|
|
11
|
-
.min(0, IntegerNonNegativeError.Invalid)
|
|
12
|
-
.brand("IntegerNonNegative");
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export declare const IntegerPositiveError: {
|
|
3
|
-
Type: string;
|
|
4
|
-
Invalid: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const IntegerPositive: z.core.$ZodBranded<z.ZodNumber, "IntegerPositive", "out">;
|
|
7
|
-
export type IntegerPositiveType = z.infer<typeof IntegerPositive>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
export const IntegerPositiveError = { Type: "integer.positive.type", Invalid: "integer.positive.invalid" };
|
|
3
|
-
// Stryker disable all
|
|
4
|
-
export const IntegerPositive = z
|
|
5
|
-
// Stryker restore all
|
|
6
|
-
.number(IntegerPositiveError.Type)
|
|
7
|
-
.int(IntegerPositiveError.Type)
|
|
8
|
-
.min(1, IntegerPositiveError.Invalid)
|
|
9
|
-
.brand("IntegerPositive");
|