forked from rluiten/mailcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExample2.elm
63 lines (32 loc) · 1.2 KB
/
Example2.elm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
module Main exposing (domains, input1, input2, input3, mailcheckResult1, mailcheckResult2, mailcheckResult3, secondLevelDomains, test1Pass, test2Pass, test3Pass, topLevelDomains)
import Mailcheck exposing (suggestWith)
domains =
[ "yohomail.com" ]
secondLevelDomains =
[ "supamail" ]
topLevelDomains =
[ "cosmic" ]
input1 =
mailcheckResult1 =
suggestWith domains secondLevelDomains topLevelDomains input1
test1Pass =
mailcheckResult1 == Just ( "test", "yohomail.com", "[email protected]" )
input2 =
mailcheckResult2 =
suggestWith domains secondLevelDomains topLevelDomains input2
test2Pass =
mailcheckResult2 == Just ( "test", "fakedomain.cosmic", "[email protected]" )
input3 =
mailcheckResult3 =
suggestWith domains secondLevelDomains topLevelDomains input3
test3Pass =
mailcheckResult3 == Just ( "test", "supamail.tld", "[email protected]" )
d1 =
Debug.log "mailcheckResult1" ( input1, mailcheckResult1, test1Pass )
d2 =
Debug.log "mailcheckResult2" ( input2, mailcheckResult2, test2Pass )
d3 =
Debug.log "mailcheckResult3" ( input3, mailcheckResult3, test3Pass )