hasprotocol
v1.0.3
Published
Returns true/false if string starts protocol such as http://
Downloads
4
Readme
hasprotocol
Returns true/false if string starts with a protocol such as http
hasProtocol('http://') //true
hasProtocol('http://hello') //true
hasProtocol('helloworldhttp://hello') //false
hasProtocol('https://') //true
hasProtocol('https://hello') //true
hasProtocol('helloworldhttps://hello') //false
hasProtocol('localhost://') //true
hasProtocol('localhost://hello') //true
hasProtocol('helloworldlocalhost://hello') //false
hasProtocol('file:///') //true
hasProtocol('file:///') //true
hasProtocol('helloworldfile:///') //false