disposable-domains 1.0.0 → 1.0.2

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 CHANGED
@@ -1,10 +1,11 @@
1
- # disposable-email-domains
1
+ # Disposable Email Domains
2
2
 
3
- A list of [disposable email domains](http://en.wikipedia.org/wiki/Disposable_email_address) like `mailinator.com`. You can use it to detect or block disposable accounts in your signup process. Exact domain matches are found in [index.json](https://github.com/tompec/disposable-email-domains/blob/master/index.json) and wildcard domains (ex: `*.33mail.com`) are in [wildcard.json](https://github.com/tompec/disposable-email-domains/blob/master/wildcard.json).
4
3
 
5
- # Examples
4
+ A list of [disposable email domains](http://en.wikipedia.org/wiki/Disposable_email_address) like `mailinator.com`. You can use it to detect or block disposable accounts in your signup process. Exact domain matches are found in [index.json](https://github.com/tompec/disposable-email-domains/blob/main/index.json) and wildcard domains (ex: `*.33mail.com`) are in [wildcard.json](https://github.com/tompec/disposable-email-domains/blob/main/wildcard.json).
6
5
 
7
- ## Node.JS
6
+ ## Examples
7
+
8
+ ### Node.JS
8
9
  ```js
9
10
  var domains = require('disposable-email-domains');
10
11
  var wildcards = require('disposable-email-domains/wildcard.json');
@@ -12,24 +13,33 @@ var wildcards = require('disposable-email-domains/wildcard.json');
12
13
  // ... your code here
13
14
  ```
14
15
 
15
- # Installation
16
+ ## Installation
16
17
 
17
18
  ```
18
- $ npm install disposable-email-domains
19
+ $ npm install disposable-domains
19
20
  ```
20
21
 
21
- # Contributing
22
-
23
- Add new disposable domains to [index.json](https://github.com/tompec/disposable-email-domains/blob/master/index.json) and wildcard disposable domains to [wildcard.json](https://github.com/tompec/disposable-email-domains/blob/master/wildcard.json).
22
+ ## Contributing
24
23
 
25
- To easily add new domains, insert them into [index.txt](https://github.com/tompec/disposable-email-domains/blob/master/contributions/index.txt) and/or [wildcard.txt](https://github.com/tompec/disposable-email-domains/blob/master/contributions/wildcard.txt) and run `npm run add`.
26
- The domains will be added to the respective files and some validation will be made to ensure they pass the tests.
24
+ 1. Install dependencies:
25
+ ```
26
+ npm install
27
+ ```
27
28
 
28
- Please run `npm run test` before creating a Pull Request to ensure all tests are passing.
29
+ 2. Add your disposable domains to [contributions/index.txt](https://github.com/tompec/disposable-email-domains/blob/main/contributions/index.txt) (one domain per line, without any additional formatting)
29
30
 
30
- You can also run `npm run prod` to add new domains and run the tests at the same time.
31
+ 3. Run the [domain manager script](https://github.com/tompec/disposable-email-domains/blob/main/scripts/domain-manager.js):
32
+ ```
33
+ npm run process
34
+ ```
35
+ That script will:
36
+ - Add your domains to index.json
37
+ - Validate domains using the FQDN (Fully Qualified Domain Name) standard
38
+ - Move domains to wildcard.json if they have 2 or more subdomains
39
+ - Sort and deduplicate all entries
40
+ - Run the tests to ensure everything is working correctly
31
41
 
32
- # License
42
+ ## License
33
43
 
34
44
  ```
35
45
  WWWWWW||WWWWWW