rajgoesout/poirot

not checking for undefined username

cdrani opened this issue · 4 comments

node poirot.js uses undefined as the username. There should be a check for a valid username, and if there isn't then the help message should be logged. The help should also be more informative. Once again, if this package is not making use of yargs, then the package should be removed as a dependency.
I propose this new help message:

Usage: poirot <username> [-s | --save]
       poirot [-v | --version] [-h | --help]  

username                 account to search for across social networks

Options: 
-s | --save              save logged data into <username>.txt
-h | --help              show this message
-v | --version           show this package's version

Looks good! You can send a pr if you want to

By 'valid username' do you mean whether that provided username is valid for a particular website or not? For that, we will might need something like a regex checker

I just meant that there is one, but I suppose we could check that there are no hyphens as most usernames prefer the use of underscores.

We can implement regex checkers for each of the websites (because most of them have different conditions for checking validity).