rajgoesout / poirot

:mag: Asynchronously find usernames across social networks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

not checking for undefined username

cdrani opened this issue · 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
commented

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

commented

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.

commented

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