Check if URL is HTTP.
检查 URL 是否为 HTTP。
The URL to check. 要检查的 URL
True if the URL is HTTP, false otherwise. 如果 URL 是 HTTP 则返回 true,否则返回 false
isHttp('http://example.com') // trueisHttp('https://example.com') // trueisHttp('//example.com') // trueisHttp('ftp://example.com') // falseisHttp('example.com') // falseisHttp('mailto:username@example.com') // false Copy
isHttp('http://example.com') // trueisHttp('https://example.com') // trueisHttp('//example.com') // trueisHttp('ftp://example.com') // falseisHttp('example.com') // falseisHttp('mailto:username@example.com') // false
Check if URL is HTTP.
检查 URL 是否为 HTTP。