diginext-utils 3.13.10 → 3.13.14
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/Slug.js +1 -0
- package/dist/email/index.d.ts +1 -1
- package/dist/email/index.js +2 -1
- package/esm/Slug.js +1 -0
- package/esm/email/index.d.ts +1 -1
- package/esm/email/index.js +2 -1
- package/package.json +1 -1
package/dist/Slug.js
CHANGED
|
@@ -301,6 +301,7 @@ const makeSlug = (s, opt = {}) => {
|
|
|
301
301
|
s = s.replace(/ú|ù|ủ|ũ|ụ|ư|ứ|ừ|ử|ữ|ự/gi, "u");
|
|
302
302
|
s = s.replace(/ý|ỳ|ỷ|ỹ|ỵ/gi, "y");
|
|
303
303
|
s = s.replace(/đ/gi, "d");
|
|
304
|
+
s = s.replace(/_/gi, "-");
|
|
304
305
|
s = s.replace(/\-\-\-\-\-/gi, "-");
|
|
305
306
|
s = s.replace(/\-\-\-\-/gi, "-");
|
|
306
307
|
s = s.replace(/\-\-\-/gi, "-");
|
package/dist/email/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ValidatorOptions } from "deep-email-validator/dist/options/options";
|
|
2
|
-
export declare const emailValidator: (email: string, opts?: ValidatorOptions) => Promise<{
|
|
2
|
+
export declare const emailValidator: (email: string, opts?: Omit<ValidatorOptions, "email">) => Promise<{
|
|
3
3
|
status: boolean;
|
|
4
4
|
reason?: undefined;
|
|
5
5
|
} | {
|
package/dist/email/index.js
CHANGED
|
@@ -17,6 +17,7 @@ function extractReasons(emailValidatorOutput) {
|
|
|
17
17
|
}
|
|
18
18
|
return reasons;
|
|
19
19
|
}
|
|
20
|
+
// SMTP Error: The mail address that you specified was not syntactically correct.
|
|
20
21
|
const emailValidator = async (email, opts) => {
|
|
21
22
|
email = `${(0, lodash_1.toString)(email)}`;
|
|
22
23
|
const res = await (0, deep_email_validator_1.default)({
|
|
@@ -26,7 +27,7 @@ const emailValidator = async (email, opts) => {
|
|
|
26
27
|
validateMx: true,
|
|
27
28
|
validateTypo: false,
|
|
28
29
|
validateDisposable: true,
|
|
29
|
-
validateSMTP:
|
|
30
|
+
validateSMTP: false,
|
|
30
31
|
...opts,
|
|
31
32
|
});
|
|
32
33
|
if (res.valid)
|
package/esm/Slug.js
CHANGED
|
@@ -298,6 +298,7 @@ export const makeSlug = (s, opt = {}) => {
|
|
|
298
298
|
s = s.replace(/ú|ù|ủ|ũ|ụ|ư|ứ|ừ|ử|ữ|ự/gi, "u");
|
|
299
299
|
s = s.replace(/ý|ỳ|ỷ|ỹ|ỵ/gi, "y");
|
|
300
300
|
s = s.replace(/đ/gi, "d");
|
|
301
|
+
s = s.replace(/_/gi, "-");
|
|
301
302
|
s = s.replace(/\-\-\-\-\-/gi, "-");
|
|
302
303
|
s = s.replace(/\-\-\-\-/gi, "-");
|
|
303
304
|
s = s.replace(/\-\-\-/gi, "-");
|
package/esm/email/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ValidatorOptions } from "deep-email-validator/dist/options/options";
|
|
2
|
-
export declare const emailValidator: (email: string, opts?: ValidatorOptions) => Promise<{
|
|
2
|
+
export declare const emailValidator: (email: string, opts?: Omit<ValidatorOptions, "email">) => Promise<{
|
|
3
3
|
status: boolean;
|
|
4
4
|
reason?: undefined;
|
|
5
5
|
} | {
|
package/esm/email/index.js
CHANGED
|
@@ -11,6 +11,7 @@ function extractReasons(emailValidatorOutput) {
|
|
|
11
11
|
}
|
|
12
12
|
return reasons;
|
|
13
13
|
}
|
|
14
|
+
// SMTP Error: The mail address that you specified was not syntactically correct.
|
|
14
15
|
export const emailValidator = async (email, opts) => {
|
|
15
16
|
email = `${toString(email)}`;
|
|
16
17
|
const res = await validate({
|
|
@@ -20,7 +21,7 @@ export const emailValidator = async (email, opts) => {
|
|
|
20
21
|
validateMx: true,
|
|
21
22
|
validateTypo: false,
|
|
22
23
|
validateDisposable: true,
|
|
23
|
-
validateSMTP:
|
|
24
|
+
validateSMTP: false,
|
|
24
25
|
...opts,
|
|
25
26
|
});
|
|
26
27
|
if (res.valid)
|