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
- * Tests to see if a string is shaped as an email address.
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: <T>(val: T) => val is T & Email;
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;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,CAAC,OAAO,CAAC,KAAG,GAAG,IAAI,CAAC,GAAG,KAa9C,CAAA"}
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
- * Tests to see if a string is shaped as an email address.
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)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inferred-types",
3
- "version": "0.50.17",
3
+ "version": "0.50.18",
4
4
  "description": "Functions which provide useful type inference on TS projects",
5
5
  "license": "MIT",
6
6
  "author": "Ken Snyder<ken@ken.net>",