Hi,
First of all, I want to congratulate the author because I believe this is a very promising project. And you've obviously put a lot of time into this. If there is any way I can help, please let me know.
Now, to the point: I've been looking into the code and I've found that the isURL function is not always working as expected. For example, the following code returns true:
const DW = require("deep-waters");
console.log(DW.isURL("www.google"));
As you mentioned in the comments of isURL.js, the code for this function is derived from this Stackoverflow question. The example I've used above was also already mentioned in the comments on Stackoverflow as an invalid example.
Now, the question "what is a valid URL?" is indeed quire ambiguous. But to me, "www.google" should return false for this function. In any case, it would be best to either include specific documentation/examples to explain what works and what not. Were you thinking about also adding more documentation to this project?
As a second measure, we can try to improve the regular expression so that it returns false for these type of cases.
What do you think?
Hi,
First of all, I want to congratulate the author because I believe this is a very promising project. And you've obviously put a lot of time into this. If there is any way I can help, please let me know.
Now, to the point: I've been looking into the code and I've found that the isURL function is not always working as expected. For example, the following code returns true:
As you mentioned in the comments of isURL.js, the code for this function is derived from this Stackoverflow question. The example I've used above was also already mentioned in the comments on Stackoverflow as an invalid example.
Now, the question "what is a valid URL?" is indeed quire ambiguous. But to me, "www.google" should return false for this function. In any case, it would be best to either include specific documentation/examples to explain what works and what not. Were you thinking about also adding more documentation to this project?
As a second measure, we can try to improve the regular expression so that it returns false for these type of cases.
What do you think?