@bgord/tools 1.1.20 → 1.2.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/email-mask.service.d.ts +2 -1
- package/dist/email.vo.d.ts +6 -0
- package/dist/email.vo.js +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/url-with-slash.vo.d.ts +6 -0
- package/dist/url-with-slash.vo.js +6 -0
- package/dist/url-without-slash.vo.d.ts +6 -0
- package/dist/url-without-slash.vo.js +6 -0
- package/package.json +1 -1
- package/readme.md +3 -0
- package/src/email-mask.service.ts +3 -1
- package/src/email.vo.ts +7 -0
- package/src/index.ts +3 -0
- package/src/url-with-slash.vo.ts +10 -0
- package/src/url-without-slash.vo.ts +10 -0
package/dist/email.vo.js
ADDED
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export * from "./division-factor.vo";
|
|
|
17
17
|
export * from "./dll.service";
|
|
18
18
|
export * from "./duration.service";
|
|
19
19
|
export * from "./duration-ms.vo";
|
|
20
|
+
export * from "./email.vo";
|
|
20
21
|
export * from "./email-mask.service";
|
|
21
22
|
export * from "./etags.vo";
|
|
22
23
|
export * from "./extension.vo";
|
|
@@ -86,6 +87,8 @@ export * from "./timestamp.vo";
|
|
|
86
87
|
export * from "./timestamp-value.vo";
|
|
87
88
|
export * from "./timezone.vo";
|
|
88
89
|
export * from "./ts-utils";
|
|
90
|
+
export * from "./url-with-slash.vo";
|
|
91
|
+
export * from "./url-without-slash.vo";
|
|
89
92
|
export * from "./visually-unambiguous-characters-generator.service";
|
|
90
93
|
export * from "./week.vo";
|
|
91
94
|
export * from "./week-iso-id.vo";
|
package/dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ export * from "./division-factor.vo";
|
|
|
17
17
|
export * from "./dll.service";
|
|
18
18
|
export * from "./duration.service";
|
|
19
19
|
export * from "./duration-ms.vo";
|
|
20
|
+
export * from "./email.vo";
|
|
20
21
|
export * from "./email-mask.service";
|
|
21
22
|
export * from "./etags.vo";
|
|
22
23
|
export * from "./extension.vo";
|
|
@@ -86,6 +87,8 @@ export * from "./timestamp.vo";
|
|
|
86
87
|
export * from "./timestamp-value.vo";
|
|
87
88
|
export * from "./timezone.vo";
|
|
88
89
|
export * from "./ts-utils";
|
|
90
|
+
export * from "./url-with-slash.vo";
|
|
91
|
+
export * from "./url-without-slash.vo";
|
|
89
92
|
export * from "./visually-unambiguous-characters-generator.service";
|
|
90
93
|
export * from "./week.vo";
|
|
91
94
|
export * from "./week-iso-id.vo";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/age-years.vo.ts","../src/age.vo.ts","../src/api-key.vo.ts","../src/basename.vo.ts","../src/clock-format.service.ts","../src/clock.vo.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/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-format.service.ts","../src/hour-schema.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/language.vo.ts","../src/linear-regression.service.ts","../src/mean.service.ts","../src/mime-types.vo.ts","../src/mime-value.vo.ts","../src/mime.vo.ts","../src/min-max-scaler.service.ts","../src/minute-schema.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/notification-template.vo.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/revision-value.vo.ts","../src/revision.vo.ts","../src/rounding.adapter.ts","../src/rounding.port.ts","../src/size-bytes.vo.ts","../src/size.vo.ts","../src/slug.service.ts","../src/stopwatch.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/visually-unambiguous-characters-generator.service.ts","../src/week-iso-id.vo.ts","../src/week.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/clock-format.service.ts","../src/clock.vo.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-format.service.ts","../src/hour-schema.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/language.vo.ts","../src/linear-regression.service.ts","../src/mean.service.ts","../src/mime-types.vo.ts","../src/mime-value.vo.ts","../src/mime.vo.ts","../src/min-max-scaler.service.ts","../src/minute-schema.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/notification-template.vo.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/revision-value.vo.ts","../src/revision.vo.ts","../src/rounding.adapter.ts","../src/rounding.port.ts","../src/size-bytes.vo.ts","../src/size.vo.ts","../src/slug.service.ts","../src/stopwatch.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.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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
|
+
export const UrlWithSlashError = { Invalid: "url.with.slash.invalid" };
|
|
3
|
+
export const UrlWithSlash = z
|
|
4
|
+
.url({ error: UrlWithSlashError.Invalid })
|
|
5
|
+
.refine((value) => value.endsWith("/"), UrlWithSlashError.Invalid)
|
|
6
|
+
.brand("UrlWithSlash");
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
|
+
export declare const UrlWithoutSlashError: {
|
|
3
|
+
readonly Invalid: "url.without.slash.invalid";
|
|
4
|
+
};
|
|
5
|
+
export declare const UrlWithoutSlash: z.core.$ZodBranded<z.ZodURL, "UrlWithoutSlash">;
|
|
6
|
+
export type UrlWithoutSlashType = z.infer<typeof UrlWithoutSlash>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
|
+
export const UrlWithoutSlashError = { Invalid: "url.without.slash.invalid" };
|
|
3
|
+
export const UrlWithoutSlash = z
|
|
4
|
+
.url({ error: UrlWithoutSlashError.Invalid })
|
|
5
|
+
.refine((value) => !value.endsWith("/"), UrlWithoutSlashError.Invalid)
|
|
6
|
+
.brand("UrlWithoutSlash");
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -44,6 +44,7 @@ src/
|
|
|
44
44
|
├── duration-ms.vo.ts
|
|
45
45
|
├── duration.service.ts
|
|
46
46
|
├── email-mask.service.ts
|
|
47
|
+
├── email.vo.ts
|
|
47
48
|
├── etags.vo.ts
|
|
48
49
|
├── extension.vo.ts
|
|
49
50
|
├── feature-flag-value.vo.ts
|
|
@@ -111,6 +112,8 @@ src/
|
|
|
111
112
|
├── timestamp.vo.ts
|
|
112
113
|
├── timezone.vo.ts
|
|
113
114
|
├── ts-utils.ts
|
|
115
|
+
├── url-with-slash.vo.ts
|
|
116
|
+
├── url-without-slash.vo.ts
|
|
114
117
|
├── visually-unambiguous-characters-generator.service.ts
|
|
115
118
|
├── week-iso-id.vo.ts
|
|
116
119
|
├── week.vo.ts
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { EmailType } from "./email.vo";
|
|
2
|
+
|
|
1
3
|
export class EmailMask {
|
|
2
|
-
static censor(email:
|
|
4
|
+
static censor(email: EmailType): string {
|
|
3
5
|
const [local, domain] = email.split("@");
|
|
4
6
|
|
|
5
7
|
if (local.length <= 2) return `${"*".repeat(local.length)}@${domain}`;
|
package/src/email.vo.ts
ADDED
package/src/index.ts
CHANGED
|
@@ -17,6 +17,7 @@ export * from "./division-factor.vo";
|
|
|
17
17
|
export * from "./dll.service";
|
|
18
18
|
export * from "./duration.service";
|
|
19
19
|
export * from "./duration-ms.vo";
|
|
20
|
+
export * from "./email.vo";
|
|
20
21
|
export * from "./email-mask.service";
|
|
21
22
|
export * from "./etags.vo";
|
|
22
23
|
export * from "./extension.vo";
|
|
@@ -86,6 +87,8 @@ export * from "./timestamp.vo";
|
|
|
86
87
|
export * from "./timestamp-value.vo";
|
|
87
88
|
export * from "./timezone.vo";
|
|
88
89
|
export * from "./ts-utils";
|
|
90
|
+
export * from "./url-with-slash.vo";
|
|
91
|
+
export * from "./url-without-slash.vo";
|
|
89
92
|
export * from "./visually-unambiguous-characters-generator.service";
|
|
90
93
|
export * from "./week.vo";
|
|
91
94
|
export * from "./week-iso-id.vo";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
|
+
|
|
3
|
+
export const UrlWithSlashError = { Invalid: "url.with.slash.invalid" } as const;
|
|
4
|
+
|
|
5
|
+
export const UrlWithSlash = z
|
|
6
|
+
.url({ error: UrlWithSlashError.Invalid })
|
|
7
|
+
.refine((value) => value.endsWith("/"), UrlWithSlashError.Invalid)
|
|
8
|
+
.brand("UrlWithSlash");
|
|
9
|
+
|
|
10
|
+
export type UrlWithSlashType = z.infer<typeof UrlWithSlash>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
|
+
|
|
3
|
+
export const UrlWithoutSlashError = { Invalid: "url.without.slash.invalid" } as const;
|
|
4
|
+
|
|
5
|
+
export const UrlWithoutSlash = z
|
|
6
|
+
.url({ error: UrlWithoutSlashError.Invalid })
|
|
7
|
+
.refine((value) => !value.endsWith("/"), UrlWithoutSlashError.Invalid)
|
|
8
|
+
.brand("UrlWithoutSlash");
|
|
9
|
+
|
|
10
|
+
export type UrlWithoutSlashType = z.infer<typeof UrlWithoutSlash>;
|