mirror of
https://github.com/disposable-email-domains/disposable-email-domains.git
synced 2024-11-23 00:58:11 +08:00
fix indentation an boldness
This commit is contained in:
parent
297ea24c8e
commit
ce30459982
25
README.md
25
README.md
@ -57,31 +57,32 @@ def reject_email_blacklist
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
**NodeJs ** contributed by @martin-fogelman
|
**NodeJs** contributed by @martin-fogelman
|
||||||
|
|
||||||
```Node
|
```Node
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const readline = require('readline'),
|
const readline = require('readline'),
|
||||||
fs = require('fs');
|
fs = require('fs');
|
||||||
|
|
||||||
const input = fs.createReadStream('./disposable_email_blacklist.conf'),
|
const input = fs.createReadStream('./disposable_email_blacklist.conf'),
|
||||||
output = [],
|
output = [],
|
||||||
rl = readline.createInterface({input});
|
rl = readline.createInterface({input});
|
||||||
|
|
||||||
// PROCESS LINES
|
// PROCESS LINES
|
||||||
rl.on('line', (line) => {
|
rl.on('line', (line) => {
|
||||||
console.log(`Processing line ${output.length}`);
|
console.log(`Processing line ${output.length}`);
|
||||||
output.push(line);
|
output.push(line);
|
||||||
});
|
});
|
||||||
|
|
||||||
// SAVE AS JSON
|
// SAVE AS JSON
|
||||||
rl.on('close', () => {
|
rl.on('close', () => {
|
||||||
try {
|
try {
|
||||||
const json = JSON.stringify(output);
|
const json = JSON.stringify(output);
|
||||||
fs.writeFile('disposable_email_blacklist.json', json, () => console.log('--- FINISHED ---'));
|
fs.writeFile('disposable_email_blacklist.json', json, () => console.log('--- FINISHED ---'));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user