Get the protocols of an input url.
$ npm i --save protocols
// Dependenciesconst protocols = ;console;// ["git", "ssh"]console;// "http"
There are few ways to get help:
Returns the protocols of an input url.
input: The input url.
true, the first protocol will be returned. If number, it will represent the zero-based index of the protocols array.
Have an idea? Found a bug? See how to contribute.
I open-source almost everything I can, and I try to reply everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).
However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
Starring and sharing the projects you like 🚀
Bitcoin—You can send me bitcoins at this address (or scanning the code below):
If you are using this library in one of your projects, add it in this list. ✨
bb-parse-url—An advanced url parser supporting git urls too.
is-ssh—Check if an input value is a ssh url or not.
parse-path—Parse paths (local paths, urls: ssh/git/etc)
parse-url—An advanced url parser supporting git urls too.