Parse protocol from url
从 url 中解析协议
parseProtocol('http://example.com') // => httpparseProtocol('mailto:[email protected]') // => mailto Copy
parseProtocol('http://example.com') // => httpparseProtocol('mailto:[email protected]') // => mailto
Parse protocol from url
从 url 中解析协议