@itrocks/email-address 0.1.0 → 0.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/cjs/email-address.d.ts +3 -3
- package/cjs/email-address.js +2 -1
- package/package.json +3 -3
package/cjs/email-address.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function EmailAddress<T extends object>(value?: boolean): import("@itrocks/decorator/property").DecorateCaller<T
|
|
3
|
-
export declare function emailAddressOf<T extends object>(target: ObjectOrType<T>, property:
|
|
1
|
+
import { ObjectOrType } from '@itrocks/class-type';
|
|
2
|
+
export declare function EmailAddress<T extends object>(value?: boolean): import("@itrocks/decorator/property").DecorateCaller<T, Extract<keyof T, string | symbol>>;
|
|
3
|
+
export declare function emailAddressOf<T extends object>(target: ObjectOrType<T>, property: keyof T): boolean;
|
package/cjs/email-address.js
CHANGED
|
@@ -3,11 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EmailAddress = EmailAddress;
|
|
4
4
|
exports.emailAddressOf = emailAddressOf;
|
|
5
5
|
const property_1 = require("@itrocks/decorator/property");
|
|
6
|
+
const property_2 = require("@itrocks/decorator/property");
|
|
6
7
|
const EMAIL_ADDRESS = Symbol('email-address');
|
|
7
8
|
function EmailAddress(value = true) {
|
|
8
9
|
return (0, property_1.decorate)(EMAIL_ADDRESS, value);
|
|
9
10
|
}
|
|
10
11
|
function emailAddressOf(target, property) {
|
|
11
|
-
return (0,
|
|
12
|
+
return (0, property_2.decoratorOf)(target, property, EMAIL_ADDRESS, false);
|
|
12
13
|
}
|
|
13
14
|
//# sourceMappingURL=email-address.js.map
|
package/package.json
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"email": "baptiste@pillot.fr"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@itrocks/
|
|
8
|
-
"@itrocks/
|
|
7
|
+
"@itrocks/class-type": "latest",
|
|
8
|
+
"@itrocks/decorator": "latest"
|
|
9
9
|
},
|
|
10
10
|
"description": "An @EmailAddress() decorator to validate that a property contains a valid email address",
|
|
11
11
|
"devDependencies": {
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"build": "tsc"
|
|
43
43
|
},
|
|
44
44
|
"types": "./cjs/email-address.d.ts",
|
|
45
|
-
"version": "0.
|
|
45
|
+
"version": "0.2.0"
|
|
46
46
|
}
|