Open pdehaan opened 9 years ago
I handled the email whitespace trim()
problems in #3.
Still not sure what to do about the invalid emails in the list. I can fix them, but not sure what your long-term strategy is for keeping your static files and the remote list in sync.
I guess technically you could add the isemail
module into package.json and do something like this where you only add the [trimmed] email address to the known-good list if it is actually an email address (and ignore everything that isn't email address-esque):
default:
email = email.trim();
if (isEmail(email)) {
lists.push(email);
}
break;
There is still no valid solution for "houria.chaji@hotmail.combasma_darif66@hotmail.com" since that looks bad in the source link.
I think you may be safer just blocking all emails using a variant of this regex /@hotmail\.com$/i
.
I have special eyes...
(Where the parenthesis'ed digits are approximate line numbers.)
And here's my magical linting code:
Note: You'll need to do a
npm i isemail -D
to install the isemail module.There are a few interesting results:
trim()
)Obviously, all easy to fix locally, but if you're [manually] scraping this from the remote blogspot site, it may be moot (unless you can get it changed upstream).