@email-utils/validator-syntax 0.0.1-0 → 0.0.1-1
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/Readme.md +3 -100
- package/Readme.old.md +103 -0
- package/bin/tag.sh +1 -1
- package/package.json +2 -2
package/Readme.md
CHANGED
|
@@ -1,102 +1,5 @@
|
|
|
1
|
-
#
|
|
2
|
-
## A Robust Tool for Validating Emails
|
|
1
|
+
# Email Syntax Validator
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
[](https://codecov.io/gh/ssmith-wombatweb/is-valid-email/branch/master)
|
|
6
|
-
[](https://david-dm.org/ssmith-wombatweb/is-valid-email.svg)
|
|
7
|
-
[](https://badge.fury.io/js/ssmith-is-valid-email)
|
|
3
|
+
## **THIS IS NOT READY FOR PRODUCTION**
|
|
8
4
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
This script checks the validity of a wide range of email types. It follows most of the rules outlined here: [Email Address - Wikipedia](https://en.wikipedia.org/wiki/Email_address). It was created because of performance issues with RegEx when working with emails in React.
|
|
12
|
-
|
|
13
|
-
### Author
|
|
14
|
-
Written by Simeon Smith.
|
|
15
|
-
|
|
16
|
-
[Portfolio](https://www.simeonsmith.me) | [Resume](https://resume.simeonsmith.me) | [Github](https://github.com/ssmith-wombatweb)
|
|
17
|
-
|
|
18
|
-
## Installation
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
npm i -S ssmith-is-valid-email
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Using the Function
|
|
25
|
-
|
|
26
|
-
This function supports all modern browser including IE9+.
|
|
27
|
-
|
|
28
|
-
### Importing
|
|
29
|
-
|
|
30
|
-
#### ES6 JS
|
|
31
|
-
|
|
32
|
-
```javascript
|
|
33
|
-
import isValidEmail from 'ssmith-is-valid-email';
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
#### Common JS Import
|
|
37
|
-
```javascript
|
|
38
|
-
const isValidEmail = require('ssmith-is-valid-email');
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### Calling the Function
|
|
42
|
-
|
|
43
|
-
```javascript
|
|
44
|
-
isValidEmail('test@google.com');
|
|
45
|
-
// Returns true or false.
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Testing
|
|
49
|
-
|
|
50
|
-
The following emails were tested. It follows most of the rules outlined here: [Email Address - Wikipedia](https://en.wikipedia.org/wiki/Email_address).
|
|
51
|
-
|
|
52
|
-
### Valid Emails
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
simple@example.com
|
|
56
|
-
very.common@example.com
|
|
57
|
-
disposable.style.email.with+symbol@example.com
|
|
58
|
-
other.email-with-hyphen@example.com
|
|
59
|
-
user.name+tag+sorting@example.com
|
|
60
|
-
x@example.com
|
|
61
|
-
example-indeed@strange-example.com
|
|
62
|
-
example@s.example
|
|
63
|
-
admin@test.co
|
|
64
|
-
" "@example.org
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### Invalid Emails
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
Abc.example.com
|
|
71
|
-
@Abc.example.com
|
|
72
|
-
james@google
|
|
73
|
-
james@google.c
|
|
74
|
-
james richards@google.com
|
|
75
|
-
james" richards@google.com
|
|
76
|
-
james@cb$.com
|
|
77
|
-
A@b@c@example.com
|
|
78
|
-
a"b(c)d,e:f;g<h>i[j\\k]l@example.com
|
|
79
|
-
just"not"right@example.com
|
|
80
|
-
just."not"right@example.com
|
|
81
|
-
1234567890123456789012345678901234567890123456789012345678901234+x@example.com
|
|
82
|
-
john..doe@example.com
|
|
83
|
-
john.doe@example..com
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### Not Yet Supported
|
|
87
|
-
|
|
88
|
-
#### Should Be Valid
|
|
89
|
-
|
|
90
|
-
```
|
|
91
|
-
"very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
#### Not Useful to Support
|
|
95
|
-
|
|
96
|
-
```
|
|
97
|
-
admin@mailserver1
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## Performance
|
|
101
|
-
|
|
102
|
-
This script will run 1000 times on a valid or invalid email in less than 20 milliseconds.
|
|
5
|
+
This has not been fully documented or tested. Do not use for production.
|
package/Readme.old.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Email Syntax Validator
|
|
2
|
+
|
|
3
|
+
## A Robust Tool for Validating Emails
|
|
4
|
+
|
|
5
|
+
[ ](https://app.codeship.com/projects/297684)
|
|
6
|
+
[](https://codecov.io/gh/ssmith-wombatweb/is-valid-email/branch/master)
|
|
7
|
+
[](https://david-dm.org/ssmith-wombatweb/is-valid-email.svg)
|
|
8
|
+
[](https://badge.fury.io/js/ssmith-is-valid-email)
|
|
9
|
+
|
|
10
|
+
[Project Repo](https://github.com/ssmith-wombatweb/is-valid-email)
|
|
11
|
+
|
|
12
|
+
This script checks the validity of a wide range of email types. It follows most of the rules outlined here: [Email Address - Wikipedia](https://en.wikipedia.org/wiki/Email_address). It was created because of performance issues with RegEx when working with emails in React.
|
|
13
|
+
|
|
14
|
+
### Author
|
|
15
|
+
Written by Simeon Smith.
|
|
16
|
+
|
|
17
|
+
[Portfolio](https://www.simeonsmith.me) | [Resume](https://resume.simeonsmith.me) | [Github](https://github.com/ssmith-wombatweb)
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
npm i -S ssmith-is-valid-email
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Using the Function
|
|
26
|
+
|
|
27
|
+
This function supports all modern browser including IE9+.
|
|
28
|
+
|
|
29
|
+
### Importing
|
|
30
|
+
|
|
31
|
+
#### ES6 JS
|
|
32
|
+
|
|
33
|
+
```javascript
|
|
34
|
+
import isValidEmail from 'ssmith-is-valid-email';
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
#### Common JS Import
|
|
38
|
+
```javascript
|
|
39
|
+
const isValidEmail = require('ssmith-is-valid-email');
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Calling the Function
|
|
43
|
+
|
|
44
|
+
```javascript
|
|
45
|
+
isValidEmail('test@google.com');
|
|
46
|
+
// Returns true or false.
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Testing
|
|
50
|
+
|
|
51
|
+
The following emails were tested. It follows most of the rules outlined here: [Email Address - Wikipedia](https://en.wikipedia.org/wiki/Email_address).
|
|
52
|
+
|
|
53
|
+
### Valid Emails
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
simple@example.com
|
|
57
|
+
very.common@example.com
|
|
58
|
+
disposable.style.email.with+symbol@example.com
|
|
59
|
+
other.email-with-hyphen@example.com
|
|
60
|
+
user.name+tag+sorting@example.com
|
|
61
|
+
x@example.com
|
|
62
|
+
example-indeed@strange-example.com
|
|
63
|
+
example@s.example
|
|
64
|
+
admin@test.co
|
|
65
|
+
" "@example.org
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Invalid Emails
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
Abc.example.com
|
|
72
|
+
@Abc.example.com
|
|
73
|
+
james@google
|
|
74
|
+
james@google.c
|
|
75
|
+
james richards@google.com
|
|
76
|
+
james" richards@google.com
|
|
77
|
+
james@cb$.com
|
|
78
|
+
A@b@c@example.com
|
|
79
|
+
a"b(c)d,e:f;g<h>i[j\\k]l@example.com
|
|
80
|
+
just"not"right@example.com
|
|
81
|
+
just."not"right@example.com
|
|
82
|
+
1234567890123456789012345678901234567890123456789012345678901234+x@example.com
|
|
83
|
+
john..doe@example.com
|
|
84
|
+
john.doe@example..com
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Not Yet Supported
|
|
88
|
+
|
|
89
|
+
#### Should Be Valid
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
"very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
#### Not Useful to Support
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
admin@mailserver1
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Performance
|
|
102
|
+
|
|
103
|
+
This script will run 1000 times on a valid or invalid email in less than 20 milliseconds.
|
package/bin/tag.sh
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@email-utils/validator-syntax",
|
|
3
|
-
"version": "0.0.1-
|
|
3
|
+
"version": "0.0.1-1",
|
|
4
4
|
"description": "Configurable email syntax validator.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
|
-
"url": "git+https://github.com/
|
|
13
|
+
"url": "git+https://github.com/email-utils/validator-syntax.git"
|
|
14
14
|
},
|
|
15
15
|
"keywords": [
|
|
16
16
|
"email",
|