@atlantjs/arch 15.7.6 → 15.7.8
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/package.json +4 -2
- package/src/@tool-box/tests/builder.abstract.util.d.ts +0 -1
- package/src/@tool-box/tests/builder.abstract.util.js +40 -0
- package/src/@tool-box/tests/builders/datetime/datetime.edge.builder.d.ts +2 -3
- package/src/@tool-box/tests/builders/datetime/datetime.edge.builder.js +15 -0
- package/src/@tool-box/tests/builders/failures/dummies/failure.dummy.d.ts +1 -2
- package/src/@tool-box/tests/builders/failures/dummies/failure.dummy.js +13 -0
- package/src/@tool-box/tests/builders/failures/failure.builder.d.ts +1 -2
- package/src/@tool-box/tests/builders/failures/failure.builder.js +18 -0
- package/src/@tool-box/tests/builders/metadata/metadata-uv.builder.d.ts +2 -3
- package/src/@tool-box/tests/builders/metadata/metadata-uv.builder.js +18 -0
- package/src/@tool-box/tests/builders/metadata/metadata.edge.builder.d.ts +2 -3
- package/src/@tool-box/tests/builders/metadata/metadata.edge.builder.js +15 -0
- package/src/@tool-box/tests/builders/user/email.edge.builder.d.ts +2 -3
- package/src/@tool-box/tests/builders/user/email.edge.builder.js +15 -0
- package/src/@tool-box/tests/builders/user/username.edge.builder.d.ts +2 -3
- package/src/@tool-box/tests/builders/user/username.edge.builder.js +15 -0
- package/src/@tool-box/tests/faker/faker.d.ts +0 -1
- package/src/@tool-box/tests/faker/faker.js +208 -0
- package/src/@tool-box/utils/convert-units/convert-units.d.ts +5 -6
- package/src/@tool-box/utils/convert-units/convert-units.js +154 -0
- package/src/@tool-box/utils/datatypes/boolean-utils.d.ts +0 -1
- package/src/@tool-box/utils/datatypes/boolean-utils.js +155 -0
- package/src/@tool-box/utils/datatypes/generic-types.d.ts +0 -1
- package/src/@tool-box/utils/datatypes/generic-types.js +3 -0
- package/src/@tool-box/utils/datatypes/plainify.d.ts +0 -1
- package/src/@tool-box/utils/datatypes/plainify.js +2 -0
- package/src/@tool-box/utils/datatypes/string-utils.d.ts +0 -1
- package/src/@tool-box/utils/datatypes/string-utils.js +292 -0
- package/src/@tool-box/utils/datetime/mappers/month.mapper.d.ts +2 -3
- package/src/@tool-box/utils/datetime/mappers/month.mapper.js +58 -0
- package/src/@tool-box/utils/datetime/mappers/points/month-abbreviation.enum.d.ts +0 -1
- package/src/@tool-box/utils/datetime/mappers/points/month-abbreviation.enum.js +18 -0
- package/src/@tool-box/utils/datetime/mappers/points/month-number.enum.d.ts +0 -1
- package/src/@tool-box/utils/datetime/mappers/points/month-number.enum.js +18 -0
- package/src/@tool-box/utils/ducts/common.d.ts +0 -1
- package/src/@tool-box/utils/ducts/common.js +47 -0
- package/src/@tool-box/utils/ducts/optional-type.d.ts +1 -2
- package/src/@tool-box/utils/ducts/optional-type.js +130 -0
- package/src/@tool-box/utils/ducts/return-type.d.ts +2 -3
- package/src/@tool-box/utils/ducts/return-type.js +69 -0
- package/src/@tool-box/utils/http-provider/http-provider-failure-response.d.ts +1 -2
- package/src/@tool-box/utils/http-provider/http-provider-failure-response.js +22 -0
- package/src/@tool-box/utils/http-provider/http-provider-success-response.d.ts +1 -2
- package/src/@tool-box/utils/http-provider/http-provider-success-response.js +22 -0
- package/src/@tool-box/utils/http-provider/http-provider.d.ts +4 -5
- package/src/@tool-box/utils/http-provider/http-provider.js +87 -0
- package/src/@tool-box/utils/logger/index.d.ts +0 -1
- package/src/@tool-box/utils/logger/index.js +31 -0
- package/src/@tool-box/utils/map/map.abstract.d.ts +0 -1
- package/src/@tool-box/utils/map/map.abstract.js +84 -0
- package/src/@tool-box/utils/random/random.d.ts +0 -1
- package/src/@tool-box/utils/random/random.js +260 -0
- package/src/@tool-box/utils/type-guard/guardian-exception.d.ts +0 -1
- package/src/@tool-box/utils/type-guard/guardian-exception.js +6 -0
- package/src/@tool-box/utils/type-guard/guardian.d.ts +2 -3
- package/src/@tool-box/utils/type-guard/guardian.js +625 -0
- package/src/@tool-box/utils/type-guard/guardian.type.d.ts +0 -1
- package/src/@tool-box/utils/type-guard/guardian.type.js +2 -0
- package/src/@tool-box/utils/validators/is-cron-expression.d.ts +0 -1
- package/src/@tool-box/utils/validators/is-cron-expression.js +39 -0
- package/src/@tool-box/utils/validators/is-date-string.d.ts +0 -1
- package/src/@tool-box/utils/validators/is-date-string.js +39 -0
- package/src/@tool-box/utils/validators/is-password-match.d.ts +0 -1
- package/src/@tool-box/utils/validators/is-password-match.js +27 -0
- package/src/@tool-box/utils/validators/is-password-policy.validator.d.ts +0 -1
- package/src/@tool-box/utils/validators/is-password-policy.validator.js +30 -0
- package/src/@tool-box/utils/validators/is-schedule.d.ts +0 -1
- package/src/@tool-box/utils/validators/is-schedule.js +43 -0
- package/src/@tool-box/utils/validators/is-time-string.d.ts +0 -1
- package/src/@tool-box/utils/validators/is-time-string.js +39 -0
- package/src/@tool-box/utils/validators/is-ulid.d.ts +0 -1
- package/src/@tool-box/utils/validators/is-ulid.js +39 -0
- package/src/index.d.ts +74 -75
- package/src/index.js +179 -0
- package/src/objects/@common/edges/email.edge.d.ts +1 -2
- package/src/objects/@common/edges/email.edge.js +88 -0
- package/src/objects/@common/edges/ulid.sketch.edge.d.ts +0 -1
- package/src/objects/@common/edges/ulid.sketch.edge.js +92 -0
- package/src/objects/@common/edges/url.edge.d.ts +1 -2
- package/src/objects/@common/edges/url.edge.js +270 -0
- package/src/objects/@common/edges/username.edge.d.ts +1 -2
- package/src/objects/@common/edges/username.edge.js +38 -0
- package/src/objects/@common/edges/uuid.sketch.edge.d.ts +0 -1
- package/src/objects/@common/edges/uuid.sketch.edge.js +146 -0
- package/src/objects/@common/points/environment.point.d.ts +0 -1
- package/src/objects/@common/points/environment.point.js +10 -0
- package/src/objects/@common/points/header-token-name.point.d.ts +0 -1
- package/src/objects/@common/points/header-token-name.point.js +10 -0
- package/src/objects/@common/points/http-status-codes.point.d.ts +0 -1
- package/src/objects/@common/points/http-status-codes.point.js +244 -0
- package/src/objects/amount/amount-value.edge.d.ts +1 -2
- package/src/objects/amount/amount-value.edge.js +76 -0
- package/src/objects/amount/amount.edge.d.ts +1 -2
- package/src/objects/amount/amount.edge.js +628 -0
- package/src/objects/amount/amount.polygon.d.ts +0 -1
- package/src/objects/amount/amount.polygon.js +2 -0
- package/src/objects/amount/amount.uv.d.ts +3 -4
- package/src/objects/amount/amount.uv.js +31 -0
- package/src/objects/amount/points/duration-unit.point.d.ts +0 -1
- package/src/objects/amount/points/duration-unit.point.js +15 -0
- package/src/objects/amount/points/energy-unit.point.d.ts +0 -1
- package/src/objects/amount/points/energy-unit.point.js +10 -0
- package/src/objects/amount/points/length-unit.point.d.ts +0 -1
- package/src/objects/amount/points/length-unit.point.js +10 -0
- package/src/objects/amount/points/mass-unit.point.d.ts +0 -1
- package/src/objects/amount/points/mass-unit.point.js +11 -0
- package/src/objects/amount/points/month-name.point.d.ts +0 -1
- package/src/objects/amount/points/month-name.point.js +18 -0
- package/src/objects/amount/points/object-unit.point.d.ts +0 -1
- package/src/objects/amount/points/object-unit.point.js +7 -0
- package/src/objects/amount/points/units.point.d.ts +5 -2
- package/src/objects/amount/points/units.point.js +2 -0
- package/src/objects/amount/points/volume-unit.point.d.ts +0 -1
- package/src/objects/amount/points/volume-unit.point.js +8 -0
- package/src/objects/amount/points/week-day.point.d.ts +0 -1
- package/src/objects/amount/points/week-day.point.js +13 -0
- package/src/objects/datetime/edges/datetime.edge.d.ts +2 -3
- package/src/objects/datetime/edges/datetime.edge.js +675 -0
- package/src/objects/datetime/edges/locale/day/day-name-to-english.mapper.d.ts +1 -2
- package/src/objects/datetime/edges/locale/day/day-name-to-english.mapper.js +16 -0
- package/src/objects/datetime/edges/locale/day/day-name-to-portuguese.mapper.d.ts +1 -2
- package/src/objects/datetime/edges/locale/day/day-name-to-portuguese.mapper.js +16 -0
- package/src/objects/datetime/edges/locale/day/today-to-language.mapper.d.ts +2 -3
- package/src/objects/datetime/edges/locale/day/today-to-language.mapper.js +12 -0
- package/src/objects/datetime/edges/locale/holidays-country.type.d.ts +0 -1
- package/src/objects/datetime/edges/locale/holidays-country.type.js +2 -0
- package/src/objects/datetime/edges/locale/month/month-to-english.mapper.d.ts +1 -2
- package/src/objects/datetime/edges/locale/month/month-to-english.mapper.js +21 -0
- package/src/objects/datetime/edges/locale/month/month-to-portuguese.mapper.d.ts +1 -2
- package/src/objects/datetime/edges/locale/month/month-to-portuguese.mapper.js +21 -0
- package/src/objects/datetime/points/month-name.enum.d.ts +0 -1
- package/src/objects/datetime/points/month-name.enum.js +18 -0
- package/src/objects/datetime/points/week-day.enum.d.ts +0 -1
- package/src/objects/datetime/points/week-day.enum.js +13 -0
- package/src/objects/failure/edges/failure.abstract.d.ts +1 -2
- package/src/objects/failure/edges/failure.abstract.js +27 -0
- package/src/objects/failure/edges/failure.abstract.polygon.d.ts +0 -1
- package/src/objects/failure/edges/failure.abstract.polygon.js +2 -0
- package/src/objects/language/points/language.point.d.ts +0 -1
- package/src/objects/language/points/language.point.js +135 -0
- package/src/objects/metadata/metadata.edge.d.ts +3 -4
- package/src/objects/metadata/metadata.edge.js +27 -0
- package/src/objects/metadata/metadata.polygon.d.ts +0 -1
- package/src/objects/metadata/metadata.polygon.js +2 -0
- package/src/objects/metadata/metadata.uv.d.ts +1 -2
- package/src/objects/metadata/metadata.uv.js +31 -0
- package/src/objects/password/password.edge.d.ts +2 -3
- package/src/objects/password/password.edge.js +176 -0
- package/src/objects/password/password.polygon.d.ts +1 -2
- package/src/objects/password/password.polygon.js +2 -0
- package/src/objects/password/steps/not-allowing-consecutive-chars-step.d.ts +2 -3
- package/src/objects/password/steps/not-allowing-consecutive-chars-step.js +35 -0
- package/src/objects/password/steps/not-allowing-date-step.d.ts +2 -3
- package/src/objects/password/steps/not-allowing-date-step.js +62 -0
- package/src/objects/password/steps/not-allowing-phone-step.d.ts +2 -3
- package/src/objects/password/steps/not-allowing-phone-step.js +28 -0
- package/src/objects/password/steps/not-allowing-repeated-chars-step.d.ts +2 -3
- package/src/objects/password/steps/not-allowing-repeated-chars-step.js +35 -0
- package/src/objects/password/steps/not-allowing-string-step.d.ts +2 -3
- package/src/objects/password/steps/not-allowing-string-step.js +20 -0
- package/src/objects/password/steps/not-allowing-these-chars-step.d.ts +2 -3
- package/src/objects/password/steps/not-allowing-these-chars-step.js +18 -0
- package/src/objects/password/steps/numeric-step.d.ts +2 -3
- package/src/objects/password/steps/numeric-step.js +13 -0
- package/src/objects/password/steps/with-at-least-one-letter-step.d.ts +2 -3
- package/src/objects/password/steps/with-at-least-one-letter-step.js +14 -0
- package/src/objects/password/steps/with-at-least-one-number-digit-step.d.ts +2 -3
- package/src/objects/password/steps/with-at-least-one-number-digit-step.js +14 -0
- package/src/objects/password/steps/with-at-least-one-special-char-step.d.ts +2 -3
- package/src/objects/password/steps/with-at-least-one-special-char-step.js +14 -0
- package/src/objects/password/steps/with-length-step.d.ts +2 -3
- package/src/objects/password/steps/with-length-step.js +19 -0
- package/src/objects/password/validation-step.d.ts +1 -2
- package/src/objects/password/validation-step.js +9 -0
- package/src/objects/password/validation-step.type.d.ts +0 -1
- package/src/objects/password/validation-step.type.js +2 -0
- package/src/objects/primitives/boolean.edge.sketch.d.ts +0 -1
- package/src/objects/primitives/boolean.edge.sketch.js +148 -0
- package/src/objects/primitives/datetime.edge.sketch.d.ts +1 -2
- package/src/objects/primitives/datetime.edge.sketch.js +7 -0
- package/src/objects/primitives/number.edge.sketch.d.ts +0 -1
- package/src/objects/primitives/number.edge.sketch.js +347 -0
- package/src/objects/primitives/string.edge.sketch.d.ts +0 -1
- package/src/objects/primitives/string.edge.sketch.js +219 -0
- package/src/objects/scheduling/scheduling.edge.d.ts +6 -7
- package/src/objects/scheduling/scheduling.edge.failure.d.ts +1 -2
- package/src/objects/scheduling/scheduling.edge.failure.js +14 -0
- package/src/objects/scheduling/scheduling.edge.js +281 -0
- package/src/objects/time/time.edge.d.ts +1 -2
- package/src/objects/time/time.edge.js +448 -0
- package/src/objects-interface/edges/edge.abstract.d.ts +1 -2
- package/src/objects-interface/edges/edge.abstract.js +6 -0
- package/src/objects-interface/face.abstract.d.ts +2 -3
- package/src/objects-interface/face.abstract.js +6 -0
- package/src/objects-interface/solid.abstract.d.ts +5 -6
- package/src/objects-interface/solid.abstract.js +13 -0
- package/src/objects-interface/uv.abstract.d.ts +3 -4
- package/src/objects-interface/uv.abstract.js +6 -0
- package/src/objects-interface/vertices/vertex.abstract.d.ts +5 -6
- package/src/objects-interface/vertices/vertex.abstract.js +13 -0
- package/src/shared/payload.abstract.d.ts +0 -1
- package/src/shared/payload.abstract.js +6 -0
- package/src/shared/request.abstract.d.ts +5 -6
- package/src/shared/request.abstract.js +3 -0
- package/src/shared/response.abstract.d.ts +0 -1
- package/src/shared/response.abstract.js +6 -0
- package/{tsconfig-default.json → tsconfig.base.json} +0 -2
- package/{tsconfig-lib.json → tsconfig.lib.json} +0 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/src/@tool-box/tests/builder.abstract.util.d.ts.map +0 -1
- package/src/@tool-box/tests/builders/datetime/datetime.edge.builder.d.ts.map +0 -1
- package/src/@tool-box/tests/builders/failures/dummies/failure.dummy.d.ts.map +0 -1
- package/src/@tool-box/tests/builders/failures/failure.builder.d.ts.map +0 -1
- package/src/@tool-box/tests/builders/metadata/metadata-uv.builder.d.ts.map +0 -1
- package/src/@tool-box/tests/builders/metadata/metadata.edge.builder.d.ts.map +0 -1
- package/src/@tool-box/tests/builders/user/email.edge.builder.d.ts.map +0 -1
- package/src/@tool-box/tests/builders/user/username.edge.builder.d.ts.map +0 -1
- package/src/@tool-box/tests/faker/faker.d.ts.map +0 -1
- package/src/@tool-box/utils/convert-units/convert-units.d.ts.map +0 -1
- package/src/@tool-box/utils/datatypes/boolean-utils.d.ts.map +0 -1
- package/src/@tool-box/utils/datatypes/generic-types.d.ts.map +0 -1
- package/src/@tool-box/utils/datatypes/plainify.d.ts.map +0 -1
- package/src/@tool-box/utils/datatypes/string-utils.d.ts.map +0 -1
- package/src/@tool-box/utils/datetime/mappers/month.mapper.d.ts.map +0 -1
- package/src/@tool-box/utils/datetime/mappers/points/month-abbreviation.enum.d.ts.map +0 -1
- package/src/@tool-box/utils/datetime/mappers/points/month-number.enum.d.ts.map +0 -1
- package/src/@tool-box/utils/ducts/common.d.ts.map +0 -1
- package/src/@tool-box/utils/ducts/optional-type.d.ts.map +0 -1
- package/src/@tool-box/utils/ducts/return-type.d.ts.map +0 -1
- package/src/@tool-box/utils/http-provider/http-provider-failure-response.d.ts.map +0 -1
- package/src/@tool-box/utils/http-provider/http-provider-success-response.d.ts.map +0 -1
- package/src/@tool-box/utils/http-provider/http-provider.d.ts.map +0 -1
- package/src/@tool-box/utils/logger/index.d.ts.map +0 -1
- package/src/@tool-box/utils/map/map.abstract.d.ts.map +0 -1
- package/src/@tool-box/utils/random/random.d.ts.map +0 -1
- package/src/@tool-box/utils/type-guard/guardian-exception.d.ts.map +0 -1
- package/src/@tool-box/utils/type-guard/guardian.d.ts.map +0 -1
- package/src/@tool-box/utils/type-guard/guardian.type.d.ts.map +0 -1
- package/src/@tool-box/utils/validators/is-cron-expression.d.ts.map +0 -1
- package/src/@tool-box/utils/validators/is-date-string.d.ts.map +0 -1
- package/src/@tool-box/utils/validators/is-password-match.d.ts.map +0 -1
- package/src/@tool-box/utils/validators/is-password-policy.validator.d.ts.map +0 -1
- package/src/@tool-box/utils/validators/is-schedule.d.ts.map +0 -1
- package/src/@tool-box/utils/validators/is-time-string.d.ts.map +0 -1
- package/src/@tool-box/utils/validators/is-ulid.d.ts.map +0 -1
- package/src/index.d.ts.map +0 -1
- package/src/objects/@common/edges/email.edge.d.ts.map +0 -1
- package/src/objects/@common/edges/ulid.sketch.edge.d.ts.map +0 -1
- package/src/objects/@common/edges/url.edge.d.ts.map +0 -1
- package/src/objects/@common/edges/username.edge.d.ts.map +0 -1
- package/src/objects/@common/edges/uuid.sketch.edge.d.ts.map +0 -1
- package/src/objects/@common/points/environment.point.d.ts.map +0 -1
- package/src/objects/@common/points/header-token-name.point.d.ts.map +0 -1
- package/src/objects/@common/points/http-status-codes.point.d.ts.map +0 -1
- package/src/objects/amount/amount-value.edge.d.ts.map +0 -1
- package/src/objects/amount/amount.edge.d.ts.map +0 -1
- package/src/objects/amount/amount.polygon.d.ts.map +0 -1
- package/src/objects/amount/amount.uv.d.ts.map +0 -1
- package/src/objects/amount/points/duration-unit.point.d.ts.map +0 -1
- package/src/objects/amount/points/energy-unit.point.d.ts.map +0 -1
- package/src/objects/amount/points/length-unit.point.d.ts.map +0 -1
- package/src/objects/amount/points/mass-unit.point.d.ts.map +0 -1
- package/src/objects/amount/points/month-name.point.d.ts.map +0 -1
- package/src/objects/amount/points/object-unit.point.d.ts.map +0 -1
- package/src/objects/amount/points/units.point.d.ts.map +0 -1
- package/src/objects/amount/points/volume-unit.point.d.ts.map +0 -1
- package/src/objects/amount/points/week-day.point.d.ts.map +0 -1
- package/src/objects/datetime/edges/datetime.edge.d.ts.map +0 -1
- package/src/objects/datetime/edges/locale/day/day-name-to-english.mapper.d.ts.map +0 -1
- package/src/objects/datetime/edges/locale/day/day-name-to-portuguese.mapper.d.ts.map +0 -1
- package/src/objects/datetime/edges/locale/day/today-to-language.mapper.d.ts.map +0 -1
- package/src/objects/datetime/edges/locale/holidays-country.type.d.ts.map +0 -1
- package/src/objects/datetime/edges/locale/month/month-to-english.mapper.d.ts.map +0 -1
- package/src/objects/datetime/edges/locale/month/month-to-portuguese.mapper.d.ts.map +0 -1
- package/src/objects/datetime/points/month-name.enum.d.ts.map +0 -1
- package/src/objects/datetime/points/week-day.enum.d.ts.map +0 -1
- package/src/objects/failure/edges/failure.abstract.d.ts.map +0 -1
- package/src/objects/failure/edges/failure.abstract.polygon.d.ts.map +0 -1
- package/src/objects/language/points/language.point.d.ts.map +0 -1
- package/src/objects/metadata/metadata.edge.d.ts.map +0 -1
- package/src/objects/metadata/metadata.polygon.d.ts.map +0 -1
- package/src/objects/metadata/metadata.uv.d.ts.map +0 -1
- package/src/objects/password/password.edge.d.ts.map +0 -1
- package/src/objects/password/password.polygon.d.ts.map +0 -1
- package/src/objects/password/steps/not-allowing-consecutive-chars-step.d.ts.map +0 -1
- package/src/objects/password/steps/not-allowing-date-step.d.ts.map +0 -1
- package/src/objects/password/steps/not-allowing-phone-step.d.ts.map +0 -1
- package/src/objects/password/steps/not-allowing-repeated-chars-step.d.ts.map +0 -1
- package/src/objects/password/steps/not-allowing-string-step.d.ts.map +0 -1
- package/src/objects/password/steps/not-allowing-these-chars-step.d.ts.map +0 -1
- package/src/objects/password/steps/numeric-step.d.ts.map +0 -1
- package/src/objects/password/steps/with-at-least-one-letter-step.d.ts.map +0 -1
- package/src/objects/password/steps/with-at-least-one-number-digit-step.d.ts.map +0 -1
- package/src/objects/password/steps/with-at-least-one-special-char-step.d.ts.map +0 -1
- package/src/objects/password/steps/with-length-step.d.ts.map +0 -1
- package/src/objects/password/validation-step.d.ts.map +0 -1
- package/src/objects/password/validation-step.type.d.ts.map +0 -1
- package/src/objects/primitives/boolean.edge.sketch.d.ts.map +0 -1
- package/src/objects/primitives/datetime.edge.sketch.d.ts.map +0 -1
- package/src/objects/primitives/number.edge.sketch.d.ts.map +0 -1
- package/src/objects/primitives/string.edge.sketch.d.ts.map +0 -1
- package/src/objects/scheduling/scheduling.edge.d.ts.map +0 -1
- package/src/objects/scheduling/scheduling.edge.failure.d.ts.map +0 -1
- package/src/objects/time/time.edge.d.ts.map +0 -1
- package/src/objects-interface/edges/edge.abstract.d.ts.map +0 -1
- package/src/objects-interface/face.abstract.d.ts.map +0 -1
- package/src/objects-interface/solid.abstract.d.ts.map +0 -1
- package/src/objects-interface/uv.abstract.d.ts.map +0 -1
- package/src/objects-interface/vertices/vertex.abstract.d.ts.map +0 -1
- package/src/shared/payload.abstract.d.ts.map +0 -1
- package/src/shared/request.abstract.d.ts.map +0 -1
- package/src/shared/response.abstract.d.ts.map +0 -1
- /package/{tsconfig-backend.json → tsconfig.backend.json} +0 -0
- /package/{tsconfig-mobile.json → tsconfig.mobile.json} +0 -0
- /package/{tsconfig-web.json → tsconfig.web.json} +0 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Verifica se o valor booleano é verdadeiro (true).
|
|
5
|
+
* @returns true se o valor é true, false caso contrário
|
|
6
|
+
* @example
|
|
7
|
+
* (true).truthy() // true
|
|
8
|
+
* (false).truthy() // false
|
|
9
|
+
*/
|
|
10
|
+
Boolean.prototype.truthy = function () {
|
|
11
|
+
return this.valueOf() === true;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Verifica se o valor booleano é falso (false ou undefined).
|
|
15
|
+
* @returns true se o valor é false ou undefined, false caso contrário
|
|
16
|
+
* @example
|
|
17
|
+
* (false).falsy() // true
|
|
18
|
+
* (true).falsy() // false
|
|
19
|
+
*/
|
|
20
|
+
Boolean.prototype.falsy = function () {
|
|
21
|
+
return this.valueOf() === false || this.valueOf() === undefined;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Retorna o valor booleano negado (inversão lógica).
|
|
25
|
+
* @returns true se o valor é false, false se o valor é true
|
|
26
|
+
* @example
|
|
27
|
+
* (true).not() // false
|
|
28
|
+
* (false).not() // true
|
|
29
|
+
*/
|
|
30
|
+
Boolean.prototype.not = function () {
|
|
31
|
+
return !this.valueOf();
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Realiza a operação lógica AND (E) entre este valor e outro.
|
|
35
|
+
* Retorna true somente se ambos os valores forem true.
|
|
36
|
+
* @param value - Segundo operando booleano
|
|
37
|
+
* @returns true se ambos são true, false caso contrário
|
|
38
|
+
* @example
|
|
39
|
+
* (true).and(true) // true
|
|
40
|
+
* (true).and(false) // false
|
|
41
|
+
* (false).and(true) // false
|
|
42
|
+
*/
|
|
43
|
+
Boolean.prototype.and = function (value) {
|
|
44
|
+
return this.valueOf() === true && value === true;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Realiza a operação lógica OR (OU) entre este valor e outro.
|
|
48
|
+
* Retorna true se pelo menos um dos valores for true.
|
|
49
|
+
* @param value - Segundo operando booleano
|
|
50
|
+
* @returns true se pelo menos um é true, false caso contrário
|
|
51
|
+
* @example
|
|
52
|
+
* (true).or(false) // true
|
|
53
|
+
* (false).or(false) // false
|
|
54
|
+
* (false).or(true) // true
|
|
55
|
+
*/
|
|
56
|
+
Boolean.prototype.or = function (value) {
|
|
57
|
+
return this.valueOf() === true || value === true;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Verifica se este valor booleano é igual a outro.
|
|
61
|
+
* @param value - Valor booleano para comparação
|
|
62
|
+
* @returns true se os valores são iguais, false caso contrário
|
|
63
|
+
* @example
|
|
64
|
+
* (true).equal(true) // true
|
|
65
|
+
* (true).equal(false) // false
|
|
66
|
+
*/
|
|
67
|
+
Boolean.prototype.equal = function (value) {
|
|
68
|
+
return this.valueOf() === value;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Verifica se este valor booleano é diferente de outro.
|
|
72
|
+
* @param value - Valor booleano para comparação
|
|
73
|
+
* @returns true se os valores são diferentes, false caso contrário
|
|
74
|
+
* @example
|
|
75
|
+
* (true).different(false) // true
|
|
76
|
+
* (true).different(true) // false
|
|
77
|
+
*/
|
|
78
|
+
Boolean.prototype.different = function (value) {
|
|
79
|
+
return this.valueOf() !== value;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Realiza a operação lógica XOR (OU exclusivo) entre este valor e outro.
|
|
83
|
+
* Retorna true somente se exatamente um dos valores for true.
|
|
84
|
+
* @param value - Segundo operando booleano
|
|
85
|
+
* @returns true se exatamente um é true, false caso contrário
|
|
86
|
+
* @example
|
|
87
|
+
* (true).xor(false) // true
|
|
88
|
+
* (true).xor(true) // false
|
|
89
|
+
* (false).xor(false) // false
|
|
90
|
+
*/
|
|
91
|
+
Boolean.prototype.xor = function (value) {
|
|
92
|
+
return this.valueOf() !== value;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Realiza a operação lógica NAND (NÃO-E) entre este valor e outro.
|
|
96
|
+
* Retorna false somente se ambos os valores forem true.
|
|
97
|
+
* @param value - Segundo operando booleano
|
|
98
|
+
* @returns false se ambos são true, true caso contrário
|
|
99
|
+
* @example
|
|
100
|
+
* (true).nand(true) // false
|
|
101
|
+
* (true).nand(false) // true
|
|
102
|
+
* (false).nand(false) // true
|
|
103
|
+
*/
|
|
104
|
+
Boolean.prototype.nand = function (value) {
|
|
105
|
+
return !(this.valueOf() === true && value === true);
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Realiza a operação lógica NOR (NÃO-OU) entre este valor e outro.
|
|
109
|
+
* Retorna true somente se ambos os valores forem false.
|
|
110
|
+
* @param value - Segundo operando booleano
|
|
111
|
+
* @returns true se ambos são false, false caso contrário
|
|
112
|
+
* @example
|
|
113
|
+
* (false).nor(false) // true
|
|
114
|
+
* (true).nor(false) // false
|
|
115
|
+
* (true).nor(true) // false
|
|
116
|
+
*/
|
|
117
|
+
Boolean.prototype.nor = function (value) {
|
|
118
|
+
return !(this.valueOf() === true || value === true);
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Realiza a operação lógica de implicação (→) entre este valor e outro.
|
|
122
|
+
* Retorna false somente se este valor é true e o outro é false.
|
|
123
|
+
* @param value - Consequente da implicação
|
|
124
|
+
* @returns false se this é true e value é false, true caso contrário
|
|
125
|
+
* @example
|
|
126
|
+
* (true).implies(true) // true
|
|
127
|
+
* (true).implies(false) // false
|
|
128
|
+
* (false).implies(true) // true
|
|
129
|
+
* (false).implies(false) // true
|
|
130
|
+
*/
|
|
131
|
+
Boolean.prototype.implies = function (value) {
|
|
132
|
+
return !this.valueOf() || value;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Converte o valor booleano para número.
|
|
136
|
+
* true é convertido para 1, false para 0.
|
|
137
|
+
* @returns 1 se o valor é true, 0 se o valor é false
|
|
138
|
+
* @example
|
|
139
|
+
* (true).toNumber() // 1
|
|
140
|
+
* (false).toNumber() // 0
|
|
141
|
+
*/
|
|
142
|
+
Boolean.prototype.toNumber = function () {
|
|
143
|
+
return this.valueOf() ? 1 : 0;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Retorna o valor booleano invertido sem alterar o original.
|
|
147
|
+
* Equivalente a `.not()`, porém semânticamente indica alternância de estado.
|
|
148
|
+
* @returns true se o valor é false, false se o valor é true
|
|
149
|
+
* @example
|
|
150
|
+
* (true).toggle() // false
|
|
151
|
+
* (false).toggle() // true
|
|
152
|
+
*/
|
|
153
|
+
Boolean.prototype.toggle = function () {
|
|
154
|
+
return !this.valueOf();
|
|
155
|
+
};
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// ==================== Transformação de Casing ====================
|
|
4
|
+
/**
|
|
5
|
+
* Converte a string para o formato kebab-case.
|
|
6
|
+
* Separa palavras com hífen e converte tudo para minúsculas.
|
|
7
|
+
* @returns String no formato kebab-case
|
|
8
|
+
* @example
|
|
9
|
+
* "helloWorld".toKebabCase() // "hello-world"
|
|
10
|
+
* "FooBarBaz".toKebabCase() // "foo-bar-baz"
|
|
11
|
+
*/
|
|
12
|
+
String.prototype.toKebabCase = function () {
|
|
13
|
+
return this.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Converte a string para o formato snake_case.
|
|
17
|
+
* Separa palavras com underscore e converte tudo para minúsculas.
|
|
18
|
+
* @returns String no formato snake_case
|
|
19
|
+
* @example
|
|
20
|
+
* "helloWorld".toSnakeCase() // "hello_world"
|
|
21
|
+
* "FooBarBaz".toSnakeCase() // "foo_bar_baz"
|
|
22
|
+
*/
|
|
23
|
+
String.prototype.toSnakeCase = function () {
|
|
24
|
+
return this.replace(/([a-z])([A-Z])/g, "$1_$2").toLowerCase();
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Converte a string para o formato camelCase.
|
|
28
|
+
* Remove espaços e capitaliza a primeira letra de cada palavra, exceto a primeira.
|
|
29
|
+
* @returns String no formato camelCase
|
|
30
|
+
* @example
|
|
31
|
+
* "hello world".toCamelCase() // "helloWorld"
|
|
32
|
+
* "foo bar baz".toCamelCase() // "fooBarBaz"
|
|
33
|
+
*/
|
|
34
|
+
String.prototype.toCamelCase = function () {
|
|
35
|
+
return this.valueOf()
|
|
36
|
+
.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g, (match, index) => index === 0 ? match.toLowerCase() : match.toUpperCase())
|
|
37
|
+
.replace(/\s+/g, "");
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Converte a string para o formato PascalCase.
|
|
41
|
+
* Remove espaços e capitaliza a primeira letra de cada palavra.
|
|
42
|
+
* @returns String no formato PascalCase
|
|
43
|
+
* @example
|
|
44
|
+
* "hello world".toPascalCase() // "HelloWorld"
|
|
45
|
+
* "foo bar baz".toPascalCase() // "FooBarBaz"
|
|
46
|
+
*/
|
|
47
|
+
String.prototype.toPascalCase = function () {
|
|
48
|
+
return this.valueOf()
|
|
49
|
+
.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g, (match) => match.toUpperCase())
|
|
50
|
+
.replace(/\s+/g, "");
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Converte a string para o formato Title Case.
|
|
54
|
+
* Capitaliza a primeira letra de cada palavra, mantendo as demais em minúsculo.
|
|
55
|
+
* @returns String no formato Title Case
|
|
56
|
+
* @example
|
|
57
|
+
* "hello world".toTitleCase() // "Hello World"
|
|
58
|
+
* "the quick brown fox".toTitleCase() // "The Quick Brown Fox"
|
|
59
|
+
*/
|
|
60
|
+
String.prototype.toTitleCase = function () {
|
|
61
|
+
return this.valueOf()
|
|
62
|
+
.toLowerCase()
|
|
63
|
+
.replace(/(?:^|\s)\w/g, (match) => match.toUpperCase());
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Capitaliza a primeira letra de cada palavra da string.
|
|
67
|
+
* @returns String com a primeira letra de cada palavra em maiúsculo
|
|
68
|
+
* @example
|
|
69
|
+
* "hello world".capitalize() // "Hello World"
|
|
70
|
+
* "foo BAR".capitalize() // "Foo Bar"
|
|
71
|
+
*/
|
|
72
|
+
String.prototype.capitalize = function () {
|
|
73
|
+
return this.valueOf()
|
|
74
|
+
.split(" ")
|
|
75
|
+
.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
|
|
76
|
+
.join(" ");
|
|
77
|
+
};
|
|
78
|
+
// ==================== Manipulação ====================
|
|
79
|
+
/**
|
|
80
|
+
* Remove espaços extras e faz trim na string.
|
|
81
|
+
* Substitui múltiplos espaços consecutivos por um único espaço.
|
|
82
|
+
* @returns String sem espaços extras
|
|
83
|
+
* @example
|
|
84
|
+
* " hello world ".sanitize() // "hello world"
|
|
85
|
+
* "foo bar".sanitize() // "foo bar"
|
|
86
|
+
*/
|
|
87
|
+
String.prototype.sanitize = function () {
|
|
88
|
+
return this.valueOf().replace(/\s+/g, " ").trim();
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Trunca a string para um comprimento máximo, adicionando "..." ao final.
|
|
92
|
+
* Se a string já for menor ou igual ao comprimento, retorna sem alteração.
|
|
93
|
+
* @param length - Comprimento máximo da string resultante (incluindo "...")
|
|
94
|
+
* @returns String truncada com "..." se necessário
|
|
95
|
+
* @example
|
|
96
|
+
* "Hello World".truncate(8) // "Hello..."
|
|
97
|
+
* "Hi".truncate(8) // "Hi"
|
|
98
|
+
*/
|
|
99
|
+
String.prototype.truncate = function (length) {
|
|
100
|
+
if (this.valueOf().length <= length)
|
|
101
|
+
return this.valueOf();
|
|
102
|
+
return `${this.valueOf().substring(0, length - 3)}...`;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Remove todos os espaços em branco da string.
|
|
106
|
+
* @returns String sem nenhum espaço em branco
|
|
107
|
+
* @example
|
|
108
|
+
* "hello world".removeWhitespace() // "helloworld"
|
|
109
|
+
* " foo bar ".removeWhitespace() // "foobar"
|
|
110
|
+
*/
|
|
111
|
+
String.prototype.removeWhitespace = function () {
|
|
112
|
+
return this.valueOf().replace(/\s+/g, "");
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Inverte os caracteres da string.
|
|
116
|
+
* @returns String com os caracteres em ordem inversa
|
|
117
|
+
* @example
|
|
118
|
+
* "hello".reverse() // "olleh"
|
|
119
|
+
* "abcd".reverse() // "dcba"
|
|
120
|
+
*/
|
|
121
|
+
String.prototype.reverse = function () {
|
|
122
|
+
return this.valueOf().split("").reverse().join("");
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Preenche o início (esquerda) da string com um caractere até atingir o comprimento especificado.
|
|
126
|
+
* @param length - Comprimento total desejado da string
|
|
127
|
+
* @param char - Caractere de preenchimento (padrão: " ")
|
|
128
|
+
* @returns String preenchida à esquerda
|
|
129
|
+
* @example
|
|
130
|
+
* "5".padLeft(3, "0") // "005"
|
|
131
|
+
* "hi".padLeft(5) // " hi"
|
|
132
|
+
*/
|
|
133
|
+
String.prototype.padLeft = function (length, char = " ") {
|
|
134
|
+
return this.valueOf().padStart(length, char);
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Preenche o final (direita) da string com um caractere até atingir o comprimento especificado.
|
|
138
|
+
* @param length - Comprimento total desejado da string
|
|
139
|
+
* @param char - Caractere de preenchimento (padrão: " ")
|
|
140
|
+
* @returns String preenchida à direita
|
|
141
|
+
* @example
|
|
142
|
+
* "5".padRight(3, "0") // "500"
|
|
143
|
+
* "hi".padRight(5) // "hi "
|
|
144
|
+
*/
|
|
145
|
+
String.prototype.padRight = function (length, char = " ") {
|
|
146
|
+
return this.valueOf().padEnd(length, char);
|
|
147
|
+
};
|
|
148
|
+
function escapeRegExp(value) {
|
|
149
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Substitui todas as ocorrências de uma substring por outra.
|
|
153
|
+
* @param search - Substring/RegExp a ser substituída
|
|
154
|
+
* @param replacement - String de substituição ou função de substituição
|
|
155
|
+
* @returns Nova string com todas as ocorrências substituídas
|
|
156
|
+
* @example
|
|
157
|
+
* "foo bar foo".replaceAll("foo", "baz") // "baz bar baz"
|
|
158
|
+
*/
|
|
159
|
+
String.prototype.replaceAll = function (search, replacement) {
|
|
160
|
+
const source = this.valueOf();
|
|
161
|
+
if (search instanceof RegExp) {
|
|
162
|
+
const flags = search.flags.includes("g")
|
|
163
|
+
? search.flags
|
|
164
|
+
: `${search.flags}g`;
|
|
165
|
+
return source.replace(new RegExp(search.source, flags), replacement);
|
|
166
|
+
}
|
|
167
|
+
const literalGlobalRegex = new RegExp(escapeRegExp(search), "g");
|
|
168
|
+
return source.replace(literalGlobalRegex, replacement);
|
|
169
|
+
};
|
|
170
|
+
// ==================== Verificação de Conteúdo ====================
|
|
171
|
+
/**
|
|
172
|
+
* Verifica se a string contém uma substring específica.
|
|
173
|
+
* @param substring - Substring a ser procurada
|
|
174
|
+
* @returns true se a substring foi encontrada, false caso contrário
|
|
175
|
+
* @example
|
|
176
|
+
* "hello world".contains("world") // true
|
|
177
|
+
* "hello world".contains("foo") // false
|
|
178
|
+
*/
|
|
179
|
+
String.prototype.contains = function (substring) {
|
|
180
|
+
return this.valueOf().indexOf(substring) !== -1;
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* Conta o número de ocorrências de uma substring na string.
|
|
184
|
+
* @param substring - Substring a ser contada
|
|
185
|
+
* @returns Número de ocorrências encontradas
|
|
186
|
+
* @example
|
|
187
|
+
* "hello world hello".countOccurrences("hello") // 2
|
|
188
|
+
* "aaaa".countOccurrences("aa") // 2
|
|
189
|
+
*/
|
|
190
|
+
String.prototype.countOccurrences = function (substring) {
|
|
191
|
+
if (substring.length === 0)
|
|
192
|
+
return 0;
|
|
193
|
+
return this.valueOf().split(substring).length - 1;
|
|
194
|
+
};
|
|
195
|
+
// ==================== Validações ====================
|
|
196
|
+
/**
|
|
197
|
+
* Verifica se a string está vazia (sem nenhum caractere).
|
|
198
|
+
* @returns true se a string não possui caracteres, false caso contrário
|
|
199
|
+
* @example
|
|
200
|
+
* "".isEmpty() // true
|
|
201
|
+
* "hello".isEmpty() // false
|
|
202
|
+
*/
|
|
203
|
+
String.prototype.isEmpty = function () {
|
|
204
|
+
return this.valueOf().length === 0;
|
|
205
|
+
};
|
|
206
|
+
/**
|
|
207
|
+
* Verifica se a string possui conteúdo (não está vazia).
|
|
208
|
+
* @returns true se a string possui pelo menos um caractere, false caso contrário
|
|
209
|
+
* @example
|
|
210
|
+
* "hello".isFilled() // true
|
|
211
|
+
* "".isFilled() // false
|
|
212
|
+
*/
|
|
213
|
+
String.prototype.isFilled = function () {
|
|
214
|
+
return this.valueOf().length > 0;
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* Verifica se a string é um palíndromo (lida da mesma forma de frente para trás).
|
|
218
|
+
* @returns true se a string é um palíndromo, false caso contrário
|
|
219
|
+
* @example
|
|
220
|
+
* "racecar".isPalindrome() // true
|
|
221
|
+
* "hello".isPalindrome() // false
|
|
222
|
+
*/
|
|
223
|
+
String.prototype.isPalindrome = function () {
|
|
224
|
+
const clean = this.valueOf().toLowerCase().removeWhitespace();
|
|
225
|
+
return clean === clean.split("").reverse().join("");
|
|
226
|
+
};
|
|
227
|
+
/**
|
|
228
|
+
* Verifica se a string representa um valor numérico válido.
|
|
229
|
+
* @returns true se a string pode ser convertida para número, false caso contrário
|
|
230
|
+
* @example
|
|
231
|
+
* "42".isNumeric() // true
|
|
232
|
+
* "3.14".isNumeric() // true
|
|
233
|
+
* "hello".isNumeric() // false
|
|
234
|
+
*/
|
|
235
|
+
String.prototype.isNumeric = function () {
|
|
236
|
+
return !Number.isNaN(Number(this.valueOf())) && this.valueOf().isFilled();
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* Verifica se a string é um endereço de e-mail válido.
|
|
240
|
+
* @returns true se a string é um e-mail válido, false caso contrário
|
|
241
|
+
* @example
|
|
242
|
+
* "user@example.com".isEmail() // true
|
|
243
|
+
* "invalid-email".isEmail() // false
|
|
244
|
+
*/
|
|
245
|
+
String.prototype.isEmail = function () {
|
|
246
|
+
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(this.valueOf());
|
|
247
|
+
};
|
|
248
|
+
/**
|
|
249
|
+
* Verifica se a string é uma URL válida.
|
|
250
|
+
* @returns true se a string é uma URL válida, false caso contrário
|
|
251
|
+
* @example
|
|
252
|
+
* "https://example.com".isURL() // true
|
|
253
|
+
* "not a url".isURL() // false
|
|
254
|
+
*/
|
|
255
|
+
String.prototype.isURL = function () {
|
|
256
|
+
try {
|
|
257
|
+
new URL(this.valueOf());
|
|
258
|
+
return true;
|
|
259
|
+
}
|
|
260
|
+
catch {
|
|
261
|
+
return false;
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
/**
|
|
265
|
+
* Verifica se a string é um UUID (Universally Unique Identifier) válido.
|
|
266
|
+
* @returns true se a string é um UUID válido, false caso contrário
|
|
267
|
+
* @example
|
|
268
|
+
* "550e8400-e29b-41d4-a716-446655440000".isUUID() // true
|
|
269
|
+
* "invalid-uuid".isUUID() // false
|
|
270
|
+
*/
|
|
271
|
+
String.prototype.isUUID = function () {
|
|
272
|
+
return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(this.valueOf());
|
|
273
|
+
};
|
|
274
|
+
// ==================== Conversão ====================
|
|
275
|
+
/**
|
|
276
|
+
* Converte a string para o formato Base64.
|
|
277
|
+
* @returns String codificada em Base64
|
|
278
|
+
* @example
|
|
279
|
+
* "hello".toBase64() // "aGVsbG8="
|
|
280
|
+
*/
|
|
281
|
+
String.prototype.toBase64 = function () {
|
|
282
|
+
return btoa(this.valueOf());
|
|
283
|
+
};
|
|
284
|
+
/**
|
|
285
|
+
* Decodifica a string do formato Base64.
|
|
286
|
+
* @returns String decodificada do Base64
|
|
287
|
+
* @example
|
|
288
|
+
* "aGVsbG8=".fromBase64() // "hello"
|
|
289
|
+
*/
|
|
290
|
+
String.prototype.fromBase64 = function () {
|
|
291
|
+
return atob(this.valueOf());
|
|
292
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { MonthAbbreviationEnum } from "
|
|
2
|
-
import { MonthNumberEnum } from "
|
|
1
|
+
import { MonthAbbreviationEnum } from "../../../../@tool-box/utils/datetime/mappers/points/month-abbreviation.enum";
|
|
2
|
+
import { MonthNumberEnum } from "../../../../@tool-box/utils/datetime/mappers/points/month-number.enum";
|
|
3
3
|
export declare class MonthMapper {
|
|
4
4
|
static toNumber(monthAbbreviation: MonthAbbreviationEnum): MonthNumberEnum;
|
|
5
5
|
static toAbbreviation(monthNumber: MonthNumberEnum): MonthAbbreviationEnum;
|
|
6
6
|
}
|
|
7
|
-
//# sourceMappingURL=month.mapper.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MonthMapper = void 0;
|
|
4
|
+
const month_abbreviation_enum_1 = require("../../../../@tool-box/utils/datetime/mappers/points/month-abbreviation.enum");
|
|
5
|
+
const month_number_enum_1 = require("../../../../@tool-box/utils/datetime/mappers/points/month-number.enum");
|
|
6
|
+
class MonthMapper {
|
|
7
|
+
static toNumber(monthAbbreviation) {
|
|
8
|
+
if (monthAbbreviation === month_abbreviation_enum_1.MonthAbbreviationEnum.january)
|
|
9
|
+
return month_number_enum_1.MonthNumberEnum.january;
|
|
10
|
+
if (monthAbbreviation === month_abbreviation_enum_1.MonthAbbreviationEnum.february)
|
|
11
|
+
return month_number_enum_1.MonthNumberEnum.february;
|
|
12
|
+
if (monthAbbreviation === month_abbreviation_enum_1.MonthAbbreviationEnum.march)
|
|
13
|
+
return month_number_enum_1.MonthNumberEnum.march;
|
|
14
|
+
if (monthAbbreviation === month_abbreviation_enum_1.MonthAbbreviationEnum.april)
|
|
15
|
+
return month_number_enum_1.MonthNumberEnum.april;
|
|
16
|
+
if (monthAbbreviation === month_abbreviation_enum_1.MonthAbbreviationEnum.may)
|
|
17
|
+
return month_number_enum_1.MonthNumberEnum.may;
|
|
18
|
+
if (monthAbbreviation === month_abbreviation_enum_1.MonthAbbreviationEnum.june)
|
|
19
|
+
return month_number_enum_1.MonthNumberEnum.june;
|
|
20
|
+
if (monthAbbreviation === month_abbreviation_enum_1.MonthAbbreviationEnum.july)
|
|
21
|
+
return month_number_enum_1.MonthNumberEnum.july;
|
|
22
|
+
if (monthAbbreviation === month_abbreviation_enum_1.MonthAbbreviationEnum.august)
|
|
23
|
+
return month_number_enum_1.MonthNumberEnum.august;
|
|
24
|
+
if (monthAbbreviation === month_abbreviation_enum_1.MonthAbbreviationEnum.september)
|
|
25
|
+
return month_number_enum_1.MonthNumberEnum.september;
|
|
26
|
+
if (monthAbbreviation === month_abbreviation_enum_1.MonthAbbreviationEnum.october)
|
|
27
|
+
return month_number_enum_1.MonthNumberEnum.october;
|
|
28
|
+
if (monthAbbreviation === month_abbreviation_enum_1.MonthAbbreviationEnum.november)
|
|
29
|
+
return month_number_enum_1.MonthNumberEnum.november;
|
|
30
|
+
return month_number_enum_1.MonthNumberEnum.december;
|
|
31
|
+
}
|
|
32
|
+
static toAbbreviation(monthNumber) {
|
|
33
|
+
if (monthNumber === month_number_enum_1.MonthNumberEnum.january)
|
|
34
|
+
return month_abbreviation_enum_1.MonthAbbreviationEnum.january;
|
|
35
|
+
if (monthNumber === month_number_enum_1.MonthNumberEnum.february)
|
|
36
|
+
return month_abbreviation_enum_1.MonthAbbreviationEnum.february;
|
|
37
|
+
if (monthNumber === month_number_enum_1.MonthNumberEnum.march)
|
|
38
|
+
return month_abbreviation_enum_1.MonthAbbreviationEnum.march;
|
|
39
|
+
if (monthNumber === month_number_enum_1.MonthNumberEnum.april)
|
|
40
|
+
return month_abbreviation_enum_1.MonthAbbreviationEnum.april;
|
|
41
|
+
if (monthNumber === month_number_enum_1.MonthNumberEnum.may)
|
|
42
|
+
return month_abbreviation_enum_1.MonthAbbreviationEnum.may;
|
|
43
|
+
if (monthNumber === month_number_enum_1.MonthNumberEnum.june)
|
|
44
|
+
return month_abbreviation_enum_1.MonthAbbreviationEnum.june;
|
|
45
|
+
if (monthNumber === month_number_enum_1.MonthNumberEnum.july)
|
|
46
|
+
return month_abbreviation_enum_1.MonthAbbreviationEnum.july;
|
|
47
|
+
if (monthNumber === month_number_enum_1.MonthNumberEnum.august)
|
|
48
|
+
return month_abbreviation_enum_1.MonthAbbreviationEnum.august;
|
|
49
|
+
if (monthNumber === month_number_enum_1.MonthNumberEnum.september)
|
|
50
|
+
return month_abbreviation_enum_1.MonthAbbreviationEnum.september;
|
|
51
|
+
if (monthNumber === month_number_enum_1.MonthNumberEnum.october)
|
|
52
|
+
return month_abbreviation_enum_1.MonthAbbreviationEnum.october;
|
|
53
|
+
if (monthNumber === month_number_enum_1.MonthNumberEnum.november)
|
|
54
|
+
return month_abbreviation_enum_1.MonthAbbreviationEnum.november;
|
|
55
|
+
return month_abbreviation_enum_1.MonthAbbreviationEnum.december;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.MonthMapper = MonthMapper;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MonthAbbreviationEnum = void 0;
|
|
4
|
+
var MonthAbbreviationEnum;
|
|
5
|
+
(function (MonthAbbreviationEnum) {
|
|
6
|
+
MonthAbbreviationEnum["january"] = "jan";
|
|
7
|
+
MonthAbbreviationEnum["february"] = "fev";
|
|
8
|
+
MonthAbbreviationEnum["march"] = "mar";
|
|
9
|
+
MonthAbbreviationEnum["april"] = "abr";
|
|
10
|
+
MonthAbbreviationEnum["may"] = "mai";
|
|
11
|
+
MonthAbbreviationEnum["june"] = "jun";
|
|
12
|
+
MonthAbbreviationEnum["july"] = "jul";
|
|
13
|
+
MonthAbbreviationEnum["august"] = "ago";
|
|
14
|
+
MonthAbbreviationEnum["september"] = "set";
|
|
15
|
+
MonthAbbreviationEnum["october"] = "out";
|
|
16
|
+
MonthAbbreviationEnum["november"] = "nov";
|
|
17
|
+
MonthAbbreviationEnum["december"] = "dez";
|
|
18
|
+
})(MonthAbbreviationEnum || (exports.MonthAbbreviationEnum = MonthAbbreviationEnum = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MonthNumberEnum = void 0;
|
|
4
|
+
var MonthNumberEnum;
|
|
5
|
+
(function (MonthNumberEnum) {
|
|
6
|
+
MonthNumberEnum["january"] = "01";
|
|
7
|
+
MonthNumberEnum["february"] = "02";
|
|
8
|
+
MonthNumberEnum["march"] = "03";
|
|
9
|
+
MonthNumberEnum["april"] = "04";
|
|
10
|
+
MonthNumberEnum["may"] = "05";
|
|
11
|
+
MonthNumberEnum["june"] = "06";
|
|
12
|
+
MonthNumberEnum["july"] = "07";
|
|
13
|
+
MonthNumberEnum["august"] = "08";
|
|
14
|
+
MonthNumberEnum["september"] = "09";
|
|
15
|
+
MonthNumberEnum["october"] = "10";
|
|
16
|
+
MonthNumberEnum["november"] = "11";
|
|
17
|
+
MonthNumberEnum["december"] = "12";
|
|
18
|
+
})(MonthNumberEnum || (exports.MonthNumberEnum = MonthNumberEnum = {}));
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmptyArray = exports.FnVal = exports.ValueReturn = exports.SuccessReturn = void 0;
|
|
4
|
+
exports.isTruthy = isTruthy;
|
|
5
|
+
const guardian_1 = require("../../../@tool-box/utils/type-guard/guardian");
|
|
6
|
+
/**
|
|
7
|
+
* Symbol que representa o estado de sucesso em estruturas de dutos.
|
|
8
|
+
* @example
|
|
9
|
+
* const isSuccess = result[SuccessReturn];
|
|
10
|
+
*/
|
|
11
|
+
exports.SuccessReturn = Symbol("SuccessReturn");
|
|
12
|
+
/**
|
|
13
|
+
* Symbol que representa o valor encapsulado em estruturas de dutos.
|
|
14
|
+
* @example
|
|
15
|
+
* const value = result[ValueReturn];
|
|
16
|
+
*/
|
|
17
|
+
exports.ValueReturn = Symbol("ValueReturn");
|
|
18
|
+
/**
|
|
19
|
+
* Symbol utilitário para armazenar referência de função/valor.
|
|
20
|
+
* @example
|
|
21
|
+
* const fnHolder = { [FnVal]: () => "ok" };
|
|
22
|
+
*/
|
|
23
|
+
exports.FnVal = Symbol("FnVal");
|
|
24
|
+
/**
|
|
25
|
+
* Array vazio imutável para reuso seguro.
|
|
26
|
+
* @example
|
|
27
|
+
* for (const item of EmptyArray) {
|
|
28
|
+
* // não executa
|
|
29
|
+
* }
|
|
30
|
+
*/
|
|
31
|
+
exports.EmptyArray = Object.freeze([]);
|
|
32
|
+
/**
|
|
33
|
+
* Verifica se um valor deve ser tratado como "truthy".
|
|
34
|
+
* - Para Date, valida se o timestamp é válido (não-NaN).
|
|
35
|
+
* - Para demais tipos, usa coerção booleana.
|
|
36
|
+
*
|
|
37
|
+
* @param val Valor a ser verificado.
|
|
38
|
+
* @returns true quando o valor é considerado válido/truthy.
|
|
39
|
+
* @example
|
|
40
|
+
* isTruthy("abc"); // true
|
|
41
|
+
* isTruthy(""); // false
|
|
42
|
+
* isTruthy(new Date()); // true
|
|
43
|
+
* isTruthy(new Date("invalid")); // false
|
|
44
|
+
*/
|
|
45
|
+
function isTruthy(val) {
|
|
46
|
+
return val instanceof Date ? guardian_1._.isEqual(val.getTime(), val.getTime()) : !!val;
|
|
47
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FalseyValues, IterType, SuccessReturn, ValueReturn } from "
|
|
1
|
+
import { FalseyValues, IterType, SuccessReturn, ValueReturn } from "../../../@tool-box/utils/ducts/common";
|
|
2
2
|
/**
|
|
3
3
|
* Representa um Optional com valor presente.
|
|
4
4
|
* @example
|
|
@@ -107,4 +107,3 @@ export declare function Optional<T>(val: T): Optional<From<T>>;
|
|
|
107
107
|
*/
|
|
108
108
|
export declare const Nothing: Readonly<OptionalType<never>>;
|
|
109
109
|
export {};
|
|
110
|
-
//# sourceMappingURL=optional-type.d.ts.map
|