inferred-types 0.50.17 → 0.50.18
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.
|
@@ -2,7 +2,12 @@ import { Email } from "src/types/index";
|
|
|
2
2
|
/**
|
|
3
3
|
* **isEmail**`(val)`
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* type guard which validates that the value passed in
|
|
6
|
+
* in the correct shape to be an email address. It checks:
|
|
7
|
+
*
|
|
8
|
+
* 1. that leads with alphabetic char
|
|
9
|
+
* 2. has a `@` character
|
|
10
|
+
* 3. has at least one `.` char after the `@`
|
|
6
11
|
*/
|
|
7
|
-
export declare const isEmail:
|
|
12
|
+
export declare const isEmail: (val: unknown) => val is Email;
|
|
8
13
|
//# sourceMappingURL=isEmail.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isEmail.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isEmail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAGvC
|
|
1
|
+
{"version":3,"file":"isEmail.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isEmail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAGvC;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO,QAAS,OAAO,KAAG,GAAG,IAAI,KAa7C,CAAA"}
|
|
@@ -2,7 +2,12 @@ import { isString } from "src/runtime/index";
|
|
|
2
2
|
/**
|
|
3
3
|
* **isEmail**`(val)`
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* type guard which validates that the value passed in
|
|
6
|
+
* in the correct shape to be an email address. It checks:
|
|
7
|
+
*
|
|
8
|
+
* 1. that leads with alphabetic char
|
|
9
|
+
* 2. has a `@` character
|
|
10
|
+
* 3. has at least one `.` char after the `@`
|
|
6
11
|
*/
|
|
7
12
|
export const isEmail = (val) => {
|
|
8
13
|
if (!isString(val)) {
|