Since I recently started development of a command line tool that searches a source file for URLs and check their status, I decided to review an existing one while I'm at it. My tool is written in Python, but I'm interested to see how the same task could be done using JavaScript.
danishalim / URLChecker
Bulk check URL status codes
My one criticism of URLChecker is the regular expression it uses to find URLs in a file. I ran into the same issue myself during development and fixing it ended up opening up a whole other can of worms. Once the regex includes characters like [] and () then:
"http://some(web).site" // matches http://some(web).site
"(http://someweb.site)" // matches http://someweb.site)
Although URLChecker will need to update its regex so it includes all valid URL characters, I am extremely envious of how fast it produces its results.
Top comments (0)